summaryrefslogtreecommitdiffstats
path: root/QMTest/TestSConsign.py
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest/TestSConsign.py')
-rw-r--r--QMTest/TestSConsign.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/QMTest/TestSConsign.py b/QMTest/TestSConsign.py
index d144040..fd8ef30 100644
--- a/QMTest/TestSConsign.py
+++ b/QMTest/TestSConsign.py
@@ -54,13 +54,23 @@ class TestSConsign(TestSCons):
'interpreter' : python, # imported from TestSCons
}
- if os.path.exists(self.script_path('sconsign.py')):
- sconsign = 'sconsign.py'
- elif os.path.exists(self.script_path('sconsign')):
- sconsign = 'sconsign'
- else:
- print "Can find neither 'sconsign.py' nor 'sconsign' scripts."
- self.no_result()
+ if not kw.has_key('program'):
+ kw['program'] = os.environ.get('SCONS')
+ if not kw['program']:
+ if os.path.exists('scons'):
+ kw['program'] = 'scons'
+ else:
+ kw['program'] = 'scons.py'
+
+ sconsign = os.environ.get('SCONSIGN')
+ if not sconsign:
+ if os.path.exists(self.script_path('sconsign.py')):
+ sconsign = 'sconsign.py'
+ elif os.path.exists(self.script_path('sconsign')):
+ sconsign = 'sconsign'
+ else:
+ print "Can find neither 'sconsign.py' nor 'sconsign' scripts."
+ self.no_result()
self.set_sconsign(sconsign)
def script_path(self, script):