diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-19 18:41:27 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-19 18:41:27 (GMT) |
commit | bf5bd332e1a3821ee4d78816fa1e1a14954e61b7 (patch) | |
tree | 0d8bf75b9a3c6c3427b30285d19bbd5d02fb9d18 /QMTest/TestCmd.py | |
parent | a9f6cd1ccef091f79f52c210a9c4cea89eaf0a40 (diff) | |
download | SCons-bf5bd332e1a3821ee4d78816fa1e1a14954e61b7.zip SCons-bf5bd332e1a3821ee4d78816fa1e1a14954e61b7.tar.gz SCons-bf5bd332e1a3821ee4d78816fa1e1a14954e61b7.tar.bz2 |
allow setting PRESERVE to 0, or False to disable preserving temporary test directory
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r-- | QMTest/TestCmd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index e76b2e3..448553f 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -901,7 +901,8 @@ class TestCmd(object): self.set_diff_function(diff, diff_stdout, diff_stderr) self._dirlist = [] self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0} - if 'PRESERVE' in os.environ and not os.environ['PRESERVE'] is '': + preserve_value = os.environ.get('PRESERVE',False) + if preserve_value not in [0,'0','False']: self._preserve['pass_test'] = os.environ['PRESERVE'] self._preserve['fail_test'] = os.environ['PRESERVE'] self._preserve['no_result'] = os.environ['PRESERVE'] |