From 38929ed6a4630d2b8f3efa00616800b4012ea0d7 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Wed, 28 Oct 2015 13:30:10 +0100 Subject: Initial commit result of splitting up meta-enea Signed-off-by: Adrian Dudau --- recipes-enea/count-ticks/count-ticks/run-ptest | 23 +++++++++++++++++++++++ recipes-enea/count-ticks/count-ticks_1.1.bb | 25 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 recipes-enea/count-ticks/count-ticks/run-ptest create mode 100644 recipes-enea/count-ticks/count-ticks_1.1.bb (limited to 'recipes-enea/count-ticks') 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 @@ +#!/bin/sh -eu + +fail () { + printf "%s\n" "$*" + exit +} + +count_ticks --cpu 0 --start || fail "Failed starting tick counting" +find /usr -name dummy 2>&1 > /dev/null + +nr_ticks=$(count_ticks --batch --cpu 0 --end) + +if [ $? -ne 0 ]; then + echo "FAIL: count_ticks failed execution" + exit +fi + +if [ $nr_ticks == 0 ]; then + echo "FAIL: count_ticks didn't see any ticks" + exit +fi + +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 @@ +SUMMARY = "Tick count tool" +DESCRIPTION = "Count number of kernel ticks during command execution." +SECTION = "utils" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" + +PR = "r1" + +RDEPENDS_${PN} = "bash" + +SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ + file://run-ptest \ + " + +SRCREV = "0fa0a8e084fe68e77a1f0968f2fbfa993292ae9c" + +inherit ptest + +S = "${WORKDIR}/git" + +FILES_${PN} += "/bin/*" + +do_install() { + install -D ${S}/install/bin/count_ticks ${D}/usr/bin/count_ticks +} -- cgit v1.2.3-54-g00ecf