diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 7b2608a5..0d40a5d0 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -132,7 +132,10 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Integration test run: | - PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} PATH=$(pkg-config --variable=bindir thapi):${PATH} bats integration_tests/ + export PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} + bats integration_tests/ + # Run the tests twice to make sure we do a proper cleanup + bats integration_tests/ build-in-tree-and-check: needs: efficios_dep diff --git a/integration_tests/general.bats b/integration_tests/general.bats index 5bcd8321..cb33996c 100644 --- a/integration_tests/general.bats +++ b/integration_tests/general.bats @@ -1,9 +1,5 @@ bats_require_minimum_version 1.5.0 -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - @test "pkg-config_file" { pkg-config --modversion thapi } diff --git a/integration_tests/parallel_execution.bats b/integration_tests/parallel_execution.bats index d603098b..2fd139d0 100644 --- a/integration_tests/parallel_execution.bats +++ b/integration_tests/parallel_execution.bats @@ -1,7 +1,3 @@ -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - launch_mpi() { # timeout just to avoid burning too much hours when bug are introduced timeout 40s $MPIRUN "$@" diff --git a/integration_tests/sampling.bats b/integration_tests/sampling.bats index acd090af..07efcb8b 100644 --- a/integration_tests/sampling.bats +++ b/integration_tests/sampling.bats @@ -1,10 +1,9 @@ -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - @test "sampling_heartbeat" { + rm -rf heartbeat_trace + LTTNG_UST_ZE_SAMPLING_ENERGY=0 LTTNG_UST_SAMPLING_HEARTBEAT=1 \ iprof --no-analysis --sample --trace-output heartbeat_trace -- bash -c 'sleep 2' + babeltrace_thapi --no-restrict heartbeat_trace | grep "{foo: 16}" [ $(babeltrace_thapi --no-restrict heartbeat_trace | grep -c "{foo: 32}") == 1 ] } @@ -32,5 +31,4 @@ teardown_file() { # assert there is at least one CXI counter sample reporting the difference from the initial babeltrace_thapi --no-restrict cxi_trace_test | grep -a "value: 9999" - } diff --git a/integration_tests/setup_suite.bash b/integration_tests/setup_suite.bash index 31807f50..96a61643 100644 --- a/integration_tests/setup_suite.bash +++ b/integration_tests/setup_suite.bash @@ -3,6 +3,8 @@ setup_suite() { export MPIRUN=${MPIRUN:-mpirun} + export PATH=$(pkg-config --variable=bindir thapi):${PATH} + missing_tools=() # Check for mpirun