summaryrefslogtreecommitdiffstats
path: root/recipes-enea/count-ticks
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2015-10-28 13:30:10 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2015-10-28 13:30:10 +0100
commit38929ed6a4630d2b8f3efa00616800b4012ea0d7 (patch)
tree22bd8dca4994cd3d73f7f959f57f0bc7137d04cf /recipes-enea/count-ticks
downloadmeta-nfv-access-common-38929ed6a4630d2b8f3efa00616800b4012ea0d7.tar.gz
Initial commit
result of splitting up meta-enea Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-enea/count-ticks')
-rw-r--r--recipes-enea/count-ticks/count-ticks/run-ptest23
-rw-r--r--recipes-enea/count-ticks/count-ticks_1.1.bb25
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
3fail () {
4 printf "%s\n" "$*"
5 exit
6}
7
8count_ticks --cpu 0 --start || fail "Failed starting tick counting"
9find /usr -name dummy 2>&1 > /dev/null
10
11nr_ticks=$(count_ticks --batch --cpu 0 --end)
12
13if [ $? -ne 0 ]; then
14 echo "FAIL: count_ticks failed execution"
15 exit
16fi
17
18if [ $nr_ticks == 0 ]; then
19 echo "FAIL: count_ticks didn't see any ticks"
20 exit
21fi
22
23echo "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 @@
1SUMMARY = "Tick count tool"
2DESCRIPTION = "Count number of kernel ticks during command execution."
3SECTION = "utils"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4"
6
7PR = "r1"
8
9RDEPENDS_${PN} = "bash"
10
11SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \
12 file://run-ptest \
13 "
14
15SRCREV = "0fa0a8e084fe68e77a1f0968f2fbfa993292ae9c"
16
17inherit ptest
18
19S = "${WORKDIR}/git"
20
21FILES_${PN} += "/bin/*"
22
23do_install() {
24 install -D ${S}/install/bin/count_ticks ${D}/usr/bin/count_ticks
25}