summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/xz/xz/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/xz/xz/run-ptest')
-rw-r--r--meta/recipes-extended/xz/xz/run-ptest26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-extended/xz/xz/run-ptest b/meta/recipes-extended/xz/xz/run-ptest
new file mode 100644
index 0000000000..cc8ba92016
--- /dev/null
+++ b/meta/recipes-extended/xz/xz/run-ptest
@@ -0,0 +1,26 @@
1#!/bin/bash
2
3ptestdir=$(dirname "$(readlink -f "$0")")
4cd "$ptestdir"/tests || exit
5
6# executables test cases
7tests_exec=$(file $(ls test_*) | grep "ELF" | awk -F: '{print $1}')
8for i in ${tests_exec}; do
9 ./$i
10done
11
12# POSIX shell script test cases
13export srcdir=${ptestdir}/tests
14test_shell="test_files.sh test_scripts.sh test_compress.sh"
15for j in ${test_shell}; do
16 if [ $j == "test_compress.sh" ]; then
17 ./$j create_compress_files
18 else
19 ./$j
20 fi
21 if [ $? -eq 0 ]; then
22 echo "PASS: $j"
23 else
24 echo "FAIL: $j"
25 fi
26done