* Fix python unit tests when run as a subproject of another
project, i.e. nvme-cli.
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
- uses: BSFishy/meson-build@v1.0.3
with:
action: test
+ options: --verbose
+ # Preserve meson's log file on failure
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: Linux_Meson_Testlog
+ path: build/meson-logs/testlog.txt
# tests directly from the build directory.
test_env = environment()
test_env.append('MALLOC_PERTURB_', '0')
- test_env.append('PYTHONPATH', meson.build_root())
+ test_env.append('PYTHONPATH', join_paths(meson.current_build_dir(), '..'))
# Test section
test('[Python] import libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env)