diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2015-10-28 13:30:10 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2015-10-28 13:30:10 +0100 |
commit | 38929ed6a4630d2b8f3efa00616800b4012ea0d7 (patch) | |
tree | 22bd8dca4994cd3d73f7f959f57f0bc7137d04cf /recipes-enea/count-ticks/count-ticks/run-ptest | |
download | meta-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/count-ticks/run-ptest')
-rw-r--r-- | recipes-enea/count-ticks/count-ticks/run-ptest | 23 |
1 files changed, 23 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" | ||