summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/oprofile/oprofile/run-ptest
diff options
context:
space:
mode:
authorChong Lu <Chong.Lu@windriver.com>2014-06-06 09:25:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-10 17:24:18 +0100
commitdf956a6dcdf79086517c7c956f1deb7824c222b7 (patch)
treef130f2002859f67f54e14b608e7bc36332d58b0d /meta/recipes-kernel/oprofile/oprofile/run-ptest
parent54f1528f93ec0e8a62365f2cdce7e6db16cb62ff (diff)
downloadpoky-df956a6dcdf79086517c7c956f1deb7824c222b7.tar.gz
oprofile: Add PTEST regression testing to oprofile
The commit changes the oe-core oprofile recipe by adding the PTEST interface, implementing do_compile_ptest() and do_install_ptest(). The install routine adds several files that only the regression tests require. Also, a patch is necessary to inhibit executing the tests on the build host and to point to the correct target directory for the libutil++ test 'file-manip-tests'. That test requires the recipe to set SRCDIR in the build environment instead of determining the value from build-time host paths as for a self-hosted build. (From OE-Core rev: ac5a9835075a04726a64dbd669b9c89270b23865) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile/run-ptest')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/run-ptest18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest
new file mode 100644
index 0000000000..583ee1b8a8
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/run-ptest
@@ -0,0 +1,18 @@
1#!/bin/bash
2saved_dir=$PWD
3for dir in */tests ; do
4 cd $dir
5 for atest in * ; do
6 if [ \( -x $atest \) -a \( -f $atest \) ] ; then
7 ./$atest > ${atest}.stdout 2> ${atest}.stderr
8 if [ $? = 0 ] ; then
9 echo "PASS: $dir $atest"
10 rm ${atest}.stdout ${atest}.stderr
11 else
12 echo "FAIL: ${dir}/${atest}"
13 fi
14 fi
15 done
16 cd $saved_dir
17done
18