diff options
Diffstat (limited to 'recipes-enea/count-ticks')
-rw-r--r-- | recipes-enea/count-ticks/count-ticks/run-ptest | 23 | ||||
-rw-r--r-- | recipes-enea/count-ticks/count-ticks_1.1.bb | 25 |
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-enea/count-ticks/count-ticks/run-ptest b/recipes-enea/count-ticks/count-ticks/run-ptest new file mode 100644 index 0000000..b54364a --- /dev/null +++ b/recipes-enea/count-ticks/count-ticks/run-ptest | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/sh -eu | ||
2 | |||
3 | fail () { | ||
4 | printf "%s\n" "$*" | ||
5 | exit | ||
6 | } | ||
7 | |||
8 | count_ticks --cpu 0 --start || fail "Failed starting tick counting" | ||
9 | find /usr -name dummy 2>&1 > /dev/null | ||
10 | |||
11 | nr_ticks=$(count_ticks --batch --cpu 0 --end) | ||
12 | |||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: count_ticks failed execution" | ||
15 | exit | ||
16 | fi | ||
17 | |||
18 | if [ $nr_ticks == 0 ]; then | ||
19 | echo "FAIL: count_ticks didn't see any ticks" | ||
20 | exit | ||
21 | fi | ||
22 | |||
23 | echo "PASS: count_ticks" | ||
diff --git a/recipes-enea/count-ticks/count-ticks_1.1.bb b/recipes-enea/count-ticks/count-ticks_1.1.bb new file mode 100644 index 0000000..caa6ed7 --- /dev/null +++ b/recipes-enea/count-ticks/count-ticks_1.1.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Tick count tool" | ||
2 | DESCRIPTION = "Count number of kernel ticks during command execution." | ||
3 | SECTION = "utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | RDEPENDS_${PN} = "bash" | ||
10 | |||
11 | SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ | ||
12 | file://run-ptest \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "0fa0a8e084fe68e77a1f0968f2fbfa993292ae9c" | ||
16 | |||
17 | inherit ptest | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | FILES_${PN} += "/bin/*" | ||
22 | |||
23 | do_install() { | ||
24 | install -D ${S}/install/bin/count_ticks ${D}/usr/bin/count_ticks | ||
25 | } | ||