summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2024-11-25 04:47:03 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2024-11-25 04:48:20 (GMT)
commit8999666f07311ba025ee91e801c04dd2fd5adb96 (patch)
tree24df78c610ecef25ecd8f08862cc2aea44ce5658 /test
parentc580a721ccabcf1fc9789e0a3f906cb2c08db0da (diff)
downloadSCons-8999666f07311ba025ee91e801c04dd2fd5adb96.zip
SCons-8999666f07311ba025ee91e801c04dd2fd5adb96.tar.gz
SCons-8999666f07311ba025ee91e801c04dd2fd5adb96.tar.bz2
Fixed ninja binary location logic to use ninja.BIN_DIR. Previous logic no longer works starting with python ninja package version 1.11.1.2
Diffstat (limited to 'test')
-rw-r--r--test/ninja/build_libraries.py9
-rw-r--r--test/ninja/command_line_targets.py7
-rw-r--r--test/ninja/copy_function_command.py7
-rw-r--r--test/ninja/default_targets.py4
-rw-r--r--test/ninja/force_scons_callback.py5
-rw-r--r--test/ninja/generate_and_build.py7
-rw-r--r--test/ninja/generate_and_build_cxx.py7
-rw-r--r--test/ninja/generate_source.py7
-rw-r--r--test/ninja/generated_sources_alias.py5
-rw-r--r--test/ninja/iterative_speedup.py7
-rw-r--r--test/ninja/mingw_command_generator_action.py4
-rw-r--r--test/ninja/mingw_depfile_format.py4
-rw-r--r--test/ninja/mkdir_function_command.py7
-rw-r--r--test/ninja/multi_env.py7
-rw-r--r--test/ninja/ninja_command_line.py7
-rw-r--r--test/ninja/ninja_conftest.py7
-rw-r--r--test/ninja/ninja_file_deterministic.py4
-rw-r--r--test/ninja/ninja_handle_control_c_rebuild.py6
-rw-r--r--test/ninja/no_for_sig_subst.py7
-rw-r--r--test/ninja/response_file.py7
-rw-r--r--test/ninja/shell_command.py7
-rw-r--r--test/ninja/shutdown_scons_daemon.py4
22 files changed, 25 insertions, 111 deletions
diff --git a/test/ninja/build_libraries.py b/test/ninja/build_libraries.py
index 0a1941a..0561f6f 100644
--- a/test/ninja/build_libraries.py
+++ b/test/ninja/build_libraries.py
@@ -23,8 +23,6 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-import os
-
import TestSCons
from TestCmd import IS_WINDOWS, IS_MACOS
from TestSCons import _exe, _lib, lib_, _dll, dll_
@@ -36,12 +34,7 @@ try:
except ImportError:
test.skip_test("Could not find ninja module. Skipping test.\n")
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/command_line_targets.py b/test/ninja/command_line_targets.py
index 9fa77ea..b043f62 100644
--- a/test/ninja/command_line_targets.py
+++ b/test/ninja/command_line_targets.py
@@ -36,12 +36,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/copy_function_command.py b/test/ninja/copy_function_command.py
index 7e999b3..13036ee 100644
--- a/test/ninja/copy_function_command.py
+++ b/test/ninja/copy_function_command.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/default_targets.py b/test/ninja/default_targets.py
index 1b2f2b9..7752d5a 100644
--- a/test/ninja/default_targets.py
+++ b/test/ninja/default_targets.py
@@ -36,9 +36,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(
- os.path.join(ninja.__file__, os.pardir, 'data', 'bin', 'ninja' + _exe)
-)
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/force_scons_callback.py b/test/ninja/force_scons_callback.py
index e0da0dd..b668f92 100644
--- a/test/ninja/force_scons_callback.py
+++ b/test/ninja/force_scons_callback.py
@@ -37,9 +37,8 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(
- os.path.join(ninja.__file__, os.pardir, "data", "bin", "ninja" + _exe)
-)
+ninja_bin = test.ninja_binary()
+
test.dir_fixture("ninja-fixture")
diff --git a/test/ninja/generate_and_build.py b/test/ninja/generate_and_build.py
index e1c26d4..c14af70 100644
--- a/test/ninja/generate_and_build.py
+++ b/test/ninja/generate_and_build.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/generate_and_build_cxx.py b/test/ninja/generate_and_build_cxx.py
index 074a5cb..51f68dc 100644
--- a/test/ninja/generate_and_build_cxx.py
+++ b/test/ninja/generate_and_build_cxx.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/generate_source.py b/test/ninja/generate_source.py
index 8300176..f4bd0c0 100644
--- a/test/ninja/generate_source.py
+++ b/test/ninja/generate_source.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/generated_sources_alias.py b/test/ninja/generated_sources_alias.py
index 2c4ed36..3e7f9d1 100644
--- a/test/ninja/generated_sources_alias.py
+++ b/test/ninja/generated_sources_alias.py
@@ -37,9 +37,8 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.BIN_DIR,
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
+
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/iterative_speedup.py b/test/ninja/iterative_speedup.py
index e5673b0..8190175 100644
--- a/test/ninja/iterative_speedup.py
+++ b/test/ninja/iterative_speedup.py
@@ -39,12 +39,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/mingw_command_generator_action.py b/test/ninja/mingw_command_generator_action.py
index 58c5106..8fc08a8 100644
--- a/test/ninja/mingw_command_generator_action.py
+++ b/test/ninja/mingw_command_generator_action.py
@@ -52,9 +52,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.BIN_DIR,
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/mingw_depfile_format.py b/test/ninja/mingw_depfile_format.py
index 5de7b5f..e9c89a0 100644
--- a/test/ninja/mingw_depfile_format.py
+++ b/test/ninja/mingw_depfile_format.py
@@ -36,9 +36,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.BIN_DIR,
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/mkdir_function_command.py b/test/ninja/mkdir_function_command.py
index 8a17623..c01cb98 100644
--- a/test/ninja/mkdir_function_command.py
+++ b/test/ninja/mkdir_function_command.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.write('SConstruct', """
SetOption('experimental','ninja')
diff --git a/test/ninja/multi_env.py b/test/ninja/multi_env.py
index e5da6cf..6aaeccd 100644
--- a/test/ninja/multi_env.py
+++ b/test/ninja/multi_env.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test = TestSCons.TestSCons()
diff --git a/test/ninja/ninja_command_line.py b/test/ninja/ninja_command_line.py
index d8e3c08..d6744aa 100644
--- a/test/ninja/ninja_command_line.py
+++ b/test/ninja/ninja_command_line.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture', 'src')
diff --git a/test/ninja/ninja_conftest.py b/test/ninja/ninja_conftest.py
index 91d2e03..a92ecd9 100644
--- a/test/ninja/ninja_conftest.py
+++ b/test/ninja/ninja_conftest.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/ninja_file_deterministic.py b/test/ninja/ninja_file_deterministic.py
index 9832f22..232e7ab 100644
--- a/test/ninja/ninja_file_deterministic.py
+++ b/test/ninja/ninja_file_deterministic.py
@@ -39,9 +39,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.BIN_DIR,
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/ninja_handle_control_c_rebuild.py b/test/ninja/ninja_handle_control_c_rebuild.py
index 9f6b413..5635367 100644
--- a/test/ninja/ninja_handle_control_c_rebuild.py
+++ b/test/ninja/ninja_handle_control_c_rebuild.py
@@ -23,7 +23,7 @@
#
"""
This test ensures if ninja gets a control-c (or other interrupting signal) while
-regenerating the build.ninja, it doesn't remove the build.ninja leaving it
+regenerating the build.ninja, it doesn't remove the build.ninja leaving it
in an unworkable state.
"""
import os
@@ -41,9 +41,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(
- os.path.join(ninja.__file__, os.pardir, "data", "bin", "ninja" + _exe)
-)
+ninja_bin = test.ninja_binary()
test.dir_fixture("ninja-fixture")
diff --git a/test/ninja/no_for_sig_subst.py b/test/ninja/no_for_sig_subst.py
index a0292ae..da33f8d 100644
--- a/test/ninja/no_for_sig_subst.py
+++ b/test/ninja/no_for_sig_subst.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/response_file.py b/test/ninja/response_file.py
index 3d23c2b..e9f778a 100644
--- a/test/ninja/response_file.py
+++ b/test/ninja/response_file.py
@@ -42,12 +42,7 @@ _python_ = TestSCons._python_
_exe = TestSCons._exe
_obj = TestSCons._obj
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/shell_command.py b/test/ninja/shell_command.py
index a6c48c4..0ed8f2a 100644
--- a/test/ninja/shell_command.py
+++ b/test/ninja/shell_command.py
@@ -37,12 +37,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(os.path.join(
- ninja.__file__,
- os.pardir,
- 'data',
- 'bin',
- 'ninja' + _exe))
+ninja_bin = test.ninja_binary()
test.dir_fixture('ninja-fixture')
diff --git a/test/ninja/shutdown_scons_daemon.py b/test/ninja/shutdown_scons_daemon.py
index 64ec2c7..25823d7 100644
--- a/test/ninja/shutdown_scons_daemon.py
+++ b/test/ninja/shutdown_scons_daemon.py
@@ -44,9 +44,7 @@ except ImportError:
_python_ = TestSCons._python_
_exe = TestSCons._exe
-ninja_bin = os.path.abspath(
- os.path.join(ninja.__file__, os.pardir, "data", "bin", "ninja" + _exe)
-)
+ninja_bin = test.ninja_binary()
test.dir_fixture("ninja-fixture")