Print descriptive error message if test file does not exist
Added verification that test file or directory exists for the command: run_tests.sh -t <test file> If a test file (or directory) does not exist, run_tests.sh prints error message: ERROR: File or directory <test file> not found and exits with status 1 Change-Id: Ia0b11efe434daf7f040943ea8622bad496074563 Closes-Bug: #1397916
This commit is contained in:
parent
d31b59a7ed
commit
c3df5c2b52
|
@ -137,6 +137,11 @@ function run_tests {
|
|||
if [ $certain_tests -eq 1 ]; then
|
||||
for testfile in $testrargs; do
|
||||
local testfile=`readlink -f $testfile`
|
||||
local tf=`echo $testfile | cut -d':' -f1`
|
||||
if [ ! -e $tf ]; then
|
||||
echo "ERROR: File or directory $tf not found"
|
||||
exit 1
|
||||
fi
|
||||
guess_test_run $testfile
|
||||
done
|
||||
exit
|
||||
|
|
Loading…
Reference in New Issue