diff options
author | Dan Crosta <dcrosta@10gen.com> | 2012-07-10 11:40:09 -0400 |
---|---|---|
committer | Dan Crosta <dcrosta@10gen.com> | 2012-07-10 11:40:48 -0400 |
commit | 455986e93daa3fbcbc7bf2e3d7e25bbb36857cef (patch) | |
tree | 5e5c5f9dfc7989c7ea324cf6a06f41a69ceb1fd7 /buildscripts | |
parent | 14437a41de691351aede2efd6d73b4733e50092d (diff) | |
download | mongo-455986e93daa3fbcbc7bf2e3d7e25bbb36857cef.tar.gz |
smoke.py: run cleanbb before each test phase
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/smoke.py | 7 | ||||
-rw-r--r-- | buildscripts/utils.py | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 949b5e45a92..3042da505e1 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -775,6 +775,9 @@ def main(): parser.add_option('--reset-old-fails', dest='reset_old_fails', default=False, action="store_true", help='Clear the failfile. Do this if all tests pass') + parser.add_option('--with-cleanbb', dest='with_cleanbb', default=False, + action="store_true", + help='Clear database files from previous smoke.py runs') # Buildlogger invocation from command line parser.add_option('--buildlogger-builder', dest='buildlogger_builder', default=None, @@ -831,6 +834,10 @@ def main(): if not tests: raise Exception( "no tests specified" ) + if options.with_cleanbb: + dbroot = os.path.join(options.smoke_db_prefix, 'data', 'db') + call([utils.find_python(), "buildscripts/cleanbb.py", "--nokill", dbroot]) + try: run_tests(tests) finally: diff --git a/buildscripts/utils.py b/buildscripts/utils.py index ac6b3ed70be..1f04d7b6af4 100644 --- a/buildscripts/utils.py +++ b/buildscripts/utils.py @@ -193,7 +193,10 @@ def smoke_command(*args): # invocation of smoke.py here = os.path.dirname(__file__) smoke_py = os.path.abspath(os.path.join(here, 'smoke.py')) - return [find_python(), smoke_py] + list(args) + # the --with-cleanbb argument causes smoke.py to run + # buildscripts/cleanbb.py before each test phase; this + # prevents us from running out of disk space on slaves + return [find_python(), smoke_py, '--with-cleanbb'] + list(args) def run_smoke_command(*args): # to run a command line script from a scons Alias (or any |