summaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2018-03-04 04:41:49 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:13:58 -0800
commitaeffa15350252489c62cd221b2e0548043fec548 (patch)
tree32e5272bd7e9805225a2a3502003a6a4fa130921 /meta/files
parent8d6869a0a89d8cf3c6e57723fab2750ba2c885db (diff)
downloadopenembedded-core-contrib-aeffa15350252489c62cd221b2e0548043fec548.tar.gz
meta/classes: add ptest-perl.bbclass
* Enable easier testing of perl modules - Installs t/* to PTEST_PATH - Uses common run-ptest script Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/ptest-perl/run-ptest16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/files/ptest-perl/run-ptest b/meta/files/ptest-perl/run-ptest
new file mode 100644
index 00000000000..c9f9ca94d0a
--- /dev/null
+++ b/meta/files/ptest-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done