mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-25 05:11:49 +00:00
aedi: run tests in build directory
if test creates a file, it should be placed to a directory ignored by git
This commit is contained in:
parent
345e7e1c30
commit
0076cd5f0a
1 changed files with 7 additions and 7 deletions
|
@ -92,23 +92,23 @@ class TestDepsTarget(BuildTarget):
|
||||||
|
|
||||||
test_name = entry.stem
|
test_name = entry.stem
|
||||||
pkg_config_output = state.run_pkg_config('--cflags', '--libs', test_name)
|
pkg_config_output = state.run_pkg_config('--cflags', '--libs', test_name)
|
||||||
exe_name = state.build_path / test_name
|
exe_path = state.build_path / test_name
|
||||||
|
|
||||||
print('Testing ' + test_name)
|
print('Testing ' + test_name)
|
||||||
|
|
||||||
args = [
|
build_args = [
|
||||||
'clang++',
|
'clang++',
|
||||||
'-arch', 'x86_64',
|
'-arch', 'x86_64',
|
||||||
'-arch', 'arm64',
|
'-arch', 'arm64',
|
||||||
'-std=c++17',
|
'-std=c++17',
|
||||||
'-include', test_path / 'aedi.h',
|
'-include', test_path / 'aedi.h',
|
||||||
'-o', exe_name,
|
'-o', exe_path,
|
||||||
entry,
|
entry,
|
||||||
]
|
]
|
||||||
args += shlex.split(pkg_config_output)
|
build_args += shlex.split(pkg_config_output)
|
||||||
|
|
||||||
if state.verbose:
|
if state.verbose:
|
||||||
print(' '.join(str(arg) for arg in args))
|
print(' '.join(str(arg) for arg in build_args))
|
||||||
|
|
||||||
|
for args in (build_args, (exe_path,)):
|
||||||
subprocess.run(args, check=True, cwd=state.build_path, env=state.environment)
|
subprocess.run(args, check=True, cwd=state.build_path, env=state.environment)
|
||||||
subprocess.run((exe_name,), check=True, env=state.environment)
|
|
||||||
|
|
Loading…
Reference in a new issue