Skip to content

Commit 4f80429

Browse files
author
Daniel Zagaynov
committed
Add tests runner for macos
1 parent 5b2fbff commit 4f80429

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ install_data(
2121
)
2222

2323
python_paths = [join_paths(meson.current_build_dir(), '../src/')]
24-
run_tests = find_program('tests/run_tests.sh')
24+
if host_machine.system() == 'darwin'
25+
run_tests = find_program('tests/run_tests_macos.sh')
26+
else
27+
run_tests = find_program('tests/run_tests.sh')
28+
endif
2529
test('unit-tests',
2630
run_tests,
2731
args: ['../tests'],

tests/run_tests_macos.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
mkdir -p /tmp/test_env
4+
DESTDIR=/tmp/test_env meson install
5+
PYTHONPATH=$(find /tmp/test_env -name pyxcrypt -exec dirname {} +) python3 -P -m unittest discover -s "$1" -v

0 commit comments

Comments
 (0)