summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2024-11-25 20:43:54 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2024-11-25 20:43:54 (GMT)
commit0b5ab8b6e4ab4fab4206220c593d9e7d88b0ebf9 (patch)
tree3892907895158d78488fd147f102201642489875 /testing
parent8999666f07311ba025ee91e801c04dd2fd5adb96 (diff)
downloadSCons-0b5ab8b6e4ab4fab4206220c593d9e7d88b0ebf9.zip
SCons-0b5ab8b6e4ab4fab4206220c593d9e7d88b0ebf9.tar.gz
SCons-0b5ab8b6e4ab4fab4206220c593d9e7d88b0ebf9.tar.bz2
updated so TestSCons.NINJA_BINARY is set and used by all such tests
Diffstat (limited to 'testing')
-rw-r--r--testing/framework/TestCmd.py3
-rw-r--r--testing/framework/TestSCons.py18
2 files changed, 11 insertions, 10 deletions
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index 7307078..56c282c 100644
--- a/testing/framework/TestCmd.py
+++ b/testing/framework/TestCmd.py
@@ -337,6 +337,9 @@ except AttributeError:
IS_ROOT = False
NEED_HELPER = os.environ.get('SCONS_NO_DIRECT_SCRIPT')
+
+
+
# sentinel for cases where None won't do
_Null = object()
diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py
index d6c5125..5c95c24 100644
--- a/testing/framework/TestSCons.py
+++ b/testing/framework/TestSCons.py
@@ -74,7 +74,8 @@ __all__.extend([
'lib_',
'_lib',
'dll_',
- '_dll'
+ '_dll',
+ 'NINJA_BINARY'
])
machine_map = {
@@ -103,6 +104,12 @@ lib_ = lib_prefix
_dll = dll_suffix
dll_ = dll_prefix
+try:
+ import ninja
+ NINJA_BINARY = os.path.abspath(os.path.join(ninja.BIN_DIR, 'ninja' + _exe))
+except ImportError:
+ NINJA_BINARY = None
+
if sys.platform == 'cygwin':
# On Cygwin, os.path.normcase() lies, so just report back the
# fact that the underlying Win32 OS is case-insensitive.
@@ -1087,15 +1094,6 @@ class TestSCons(TestCommon):
result.append(os.path.join(dirpath, fname))
return sorted(result)
- def ninja_binary(self):
- try:
- import ninja
- except ImportError:
- return False
-
- return os.path.abspath(os.path.join(ninja.BIN_DIR, 'ninja' + _exe))
-
-
def Qt_dummy_installation(self, dir: str = 'qt') -> None:
# create a dummy qt installation