summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/framework/TestRuntest.py10
-rw-r--r--testing/framework/TestSCons.py4
-rw-r--r--testing/framework/TestSCons_time.py4
3 files changed, 14 insertions, 4 deletions
diff --git a/testing/framework/TestRuntest.py b/testing/framework/TestRuntest.py
index 7b3bb52..faf5d60 100644
--- a/testing/framework/TestRuntest.py
+++ b/testing/framework/TestRuntest.py
@@ -27,6 +27,7 @@ from TestCommon import __all__
__all__.extend([ 'TestRuntest',
'pythonstring',
+ 'pythonflags',
])
if re.search('\s', python):
@@ -34,7 +35,9 @@ if re.search('\s', python):
else:
pythonstring = python
pythonstring = pythonstring.replace('\\', '\\\\')
-
+pythonflags = ''
+if sys.version_info[0] < 3:
+ pythonflags = ' -tt'
failing_test_template = """\
import sys
@@ -104,7 +107,10 @@ class TestRuntest(TestCommon):
if 'program' not in kw:
kw['program'] = 'runtest.py'
if 'interpreter' not in kw:
- kw['interpreter'] = [python, '-tt']
+ kw['interpreter'] = [python,]
+ if sys.version_info[0] < 3:
+ kw['interpreter'].append('-tt')
+
if 'match' not in kw:
kw['match'] = match_exact
if 'workdir' not in kw:
diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py
index 7fe48e8..57b300d 100644
--- a/testing/framework/TestSCons.py
+++ b/testing/framework/TestSCons.py
@@ -247,7 +247,9 @@ class TestSCons(TestCommon):
elif not self.external and not os.path.isabs(kw['program']):
kw['program'] = os.path.join(self.orig_cwd, kw['program'])
if 'interpreter' not in kw and not os.environ.get('SCONS_EXEC'):
- kw['interpreter'] = [python, '-tt']
+ kw['interpreter'] = [python,]
+ if sys.version_info[0] < 3:
+ kw['interpreter'].append('-tt')
if 'match' not in kw:
kw['match'] = match_exact
if 'workdir' not in kw:
diff --git a/testing/framework/TestSCons_time.py b/testing/framework/TestSCons_time.py
index 6299f51..8260bef 100644
--- a/testing/framework/TestSCons_time.py
+++ b/testing/framework/TestSCons_time.py
@@ -186,7 +186,9 @@ class TestSCons_time(TestCommon):
kw['program'] = p
if 'interpreter' not in kw:
- kw['interpreter'] = [python, '-tt']
+ kw['interpreter'] = [python,]
+ if sys.version_info[0] < 3:
+ kw['interpreter'].append('-tt')
if 'match' not in kw:
kw['match'] = match_exact