diff options
Diffstat (limited to 'meta/recipes-extended/xz/xz/run-ptest')
-rw-r--r-- | meta/recipes-extended/xz/xz/run-ptest | 26 |
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 | |||
3 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
4 | cd "$ptestdir"/tests || exit | ||
5 | |||
6 | # executables test cases | ||
7 | tests_exec=$(file $(ls test_*) | grep "ELF" | awk -F: '{print $1}') | ||
8 | for i in ${tests_exec}; do | ||
9 | ./$i | ||
10 | done | ||
11 | |||
12 | # POSIX shell script test cases | ||
13 | export srcdir=${ptestdir}/tests | ||
14 | test_shell="test_files.sh test_scripts.sh test_compress.sh" | ||
15 | for 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 | ||
26 | done | ||