From 0a94ac57320a42d72567b3ca92141e11e8d40089 Mon Sep 17 00:00:00 2001 From: nejucomo Date: Fri, 6 Jun 2008 23:19:15 -0700 Subject: [PATCH] fuse: runtests: Make test numbers (and everything in general) 0-indexed for consistency. --- contrib/fuse/runtests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/fuse/runtests.py b/contrib/fuse/runtests.py index ae840955..494a31f2 100644 --- a/contrib/fuse/runtests.py +++ b/contrib/fuse/runtests.py @@ -255,11 +255,11 @@ class SystemTest (object): return results def run_test_layer(self, fbcap, mp): - total = failures = 0 testnames = [n for n in sorted(dir(self)) if n.startswith('test_')] - for name in testnames: - total += 1 - print '\n*** Running test #%d: %s' % (total, name) + + failures = 0 + for testnum, name in enumerate(testnames): + print '\n*** Running test #%d: %s' % (testnum, name) try: testcap = self.create_dirnode() self.attach_node(fbcap, testcap, name) @@ -274,7 +274,7 @@ class SystemTest (object): print 'Error in test code... Cleaning up.' raise - return (failures, total) + return (failures, len(testnames)) # Tests: -- 2.45.2