File tree Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 37
37
if : ${{ matrix.compiler == 'g++-12' && matrix.os == 'ubuntu-24.04' && matrix.build-type == 'RelWithDebInfo' && matrix.hw_breakpoint == 'ON' && github.event_name != 'pull_request'}}
38
38
with :
39
39
overwrite : true
40
- path : lo2s*.tar.bz2
40
+ path : lo2s-*.tar.bz2
41
+ - name : Test
42
+ if : ${{ matrix.compiler == 'g++-12' && matrix.os == 'ubuntu-24.04' && matrix.build-type == 'RelWithDebInfo' && matrix.hw_breakpoint == 'ON' && github.event_name != 'pull_request'}}
43
+ run : |
44
+ sudo sysctl kernel.perf_event_paranoid=-1
45
+ ctest --output-on-failure
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ include(cmake/UnsetIfUpdated.cmake)
18
18
include (cmake/CheckNameExists.cmake )
19
19
include (cmake/CheckStructHasBitField.cmake )
20
20
21
+ enable_testing ()
22
+ include (cmake/Tests.cmake )
23
+
21
24
# Intialize git submodules if not done already
22
25
include (cmake/GitSubmoduleUpdate.cmake )
23
26
git_submodule_update ()
Original file line number Diff line number Diff line change
1
+ set (TESTS lo2s_user_sampling )
2
+
3
+ foreach (TEST ${TESTS} )
4
+
5
+ add_test (NAME ${TEST} COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR} /cmake/tests/${TEST}.sh )
6
+ set_tests_properties (${TEST} PROPERTIES SKIP_RETURN_CODE 100 )
7
+ endforeach ()
Original file line number Diff line number Diff line change
1
+ set -euo pipefail
2
+
3
+ paranoid=$( cat /proc/sys/kernel/perf_event_paranoid)
4
+
5
+ echo " perf_event_paranoid is: $paranoid "
6
+ if [ $paranoid -gt 2 ]
7
+ then
8
+ # skip
9
+ exit 100
10
+ fi
11
+
12
+ #! /bin/bash
13
+ rm -rf test_trace
14
+ ./lo2s -c 1 --output-trace test_trace -- sleep 1
15
+
16
+ if otf2-print test_trace/traces.otf2 | grep " SAMPLE"
17
+ then
18
+ exit 0
19
+ else
20
+ echo " Trace did not contain calling context samples!"
21
+ exit 1
22
+ fi
23
+ rm -rf test_trace
24
+
You can’t perform that action at this time.
0 commit comments