blob: cc8ba92016b120466c469f864f43303eea6bf79a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
ptestdir=$(dirname "$(readlink -f "$0")")
cd "$ptestdir"/tests || exit
# executables test cases
tests_exec=$(file $(ls test_*) | grep "ELF" | awk -F: '{print $1}')
for i in ${tests_exec}; do
./$i
done
# POSIX shell script test cases
export srcdir=${ptestdir}/tests
test_shell="test_files.sh test_scripts.sh test_compress.sh"
for j in ${test_shell}; do
if [ $j == "test_compress.sh" ]; then
./$j create_compress_files
else
./$j
fi
if [ $? -eq 0 ]; then
echo "PASS: $j"
else
echo "FAIL: $j"
fi
done
|