summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMike Dirolf <mike@10gen.com>2010-08-30 13:34:19 -0400
committerMike Dirolf <mike@10gen.com>2010-08-30 13:34:19 -0400
commit1ae2c584dff17fe5b105aec433b55d91044eee74 (patch)
tree882cd7dde6ed3ed7a77c91f5e55925ae06e551c2 /buildscripts
parente82816917dbccc3d4a99ecaa62f19eb50c8c6e59 (diff)
downloadmongo-1ae2c584dff17fe5b105aec433b55d91044eee74.tar.gz
more smoke.py cleanup - remove global from expand_suites
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/smoke.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py
index 27ee8649b37..c2447c2c54e 100755
--- a/buildscripts/smoke.py
+++ b/buildscripts/smoke.py
@@ -353,12 +353,10 @@ at the end of testing:"""
def expand_suites(suites):
globstr = None
- global tests
+ tests = []
for suite in suites:
if suite == 'all':
- tests = []
- expand_suites(['test', 'perf', 'client', 'js', 'jsPerf', 'jsSlowNightly', 'jsSlowWeekly', 'parallel', 'clone', 'parallel', 'repl', 'auth', 'sharding', 'tool'])
- break
+ return expand_suites(['test', 'perf', 'client', 'js', 'jsPerf', 'jsSlowNightly', 'jsSlowWeekly', 'parallel', 'clone', 'parallel', 'repl', 'auth', 'sharding', 'tool'])
if suite == 'test':
if os.sys.platform == "win32":
program = 'test.exe'
@@ -406,8 +404,6 @@ def expand_suites(suites):
paths = glob.glob(globstr)
paths.sort()
tests += [(path, usedb) for path in paths]
- if not tests:
- raise Exception( "no tests found" )
return tests
def main():
@@ -462,18 +458,15 @@ def main():
tests = f.readlines()
tests = [t.rstrip('\n') for t in tests]
- if not tests:
- raise Exception( "no tests specified" )
# If we're in suite mode, tests is a list of names of sets of tests.
if options.mode == 'suite':
- # Suites: test, perf, js, quota, jsPerf,
- # jsSlow, parallel, clone, repl, disk
- suites = tests
- tests = []
- expand_suites(suites)
+ tests = expand_suites(tests)
elif options.mode == 'files':
tests = [(os.path.abspath(test), True) for test in tests]
+ if not tests:
+ raise Exception( "no tests specified" )
+
run_tests(tests)
global exit_bad
exit_bad = False