Fix runtest.sh: delete ni file and lock correctly (#8081)
authorHyeongseok Oh <hseok82.oh@samsung.com>
Mon, 5 Dec 2016 18:55:40 +0000 (03:55 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 5 Dec 2016 18:55:40 +0000 (19:55 +0100)
tests/runtest.sh

index 51c0192..1c67a70 100755 (executable)
@@ -808,6 +808,7 @@ function finish_remaining_tests {
 
 function prep_test {
     local scriptFilePath=$1
+    local scriptFileDir=$(dirname "$scriptFilePath")
 
     test "$verbose" == 1 && echo "Preparing $scriptFilePath"
 
@@ -820,8 +821,8 @@ function prep_test {
     chmod +x "$scriptFilePath"
 
     #remove any NI and Locks
-    rm -f *.ni.*
-    rm -rf lock
+    rm -f $scriptFileDir/*.ni.*
+    rm -rf $scriptFileDir/lock
 }
 
 function start_test {