Skip to content

Commit 26d9fed

Browse files
unittest.sh: check file exists
1 parent e9e24dd commit 26d9fed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unittest.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ chmod +x "$binary"
2525

2626
one_test() {
2727
file="$1"
28+
if [ ! -f "$file" ]; then
29+
echo "ERROR: $file is not a regular, existing file!"
30+
exit 1
31+
fi
2832
pushd "$fs"
2933
echo "Testing $file"
3034
if [ -z "$ondevice" ]; then

0 commit comments

Comments
 (0)