diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 00:31:33 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 00:53:44 +0200 |
commit | cd3411088f6bb4393d79c50b5f7eef3f11a83435 (patch) | |
tree | e1b44fd7c353d9018f489d03f3dea78bc876b94a /recipes-enea/count-ticks | |
download | meta-enea-cd3411088f6bb4393d79c50b5f7eef3f11a83435.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
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..a56e64a --- /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" "$*" | ||
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 | } | ||