Browse Source

Fix test discovery by id

Alois Mahdal 6 years ago
parent
commit
3782d2ec20
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/libexec/jattool-runtest

+ 4
- 2
src/libexec/jattool-runtest View File

41
     #
41
     #
42
     debug -v JATS__PATH
42
     debug -v JATS__PATH
43
     local trypath
43
     local trypath
44
+    local tmatches
44
     for trypath in ${JATS__PATH//:/ }; do
45
     for trypath in ${JATS__PATH//:/ }; do
45
         debug -v trypath
46
         debug -v trypath
46
         test -n "$trypath" || continue
47
         test -n "$trypath" || continue
47
         test -d "$trypath" || continue
48
         test -d "$trypath" || continue
48
-        case $(jattool tfind -f ALL "$trypath" | grep -c " $TestId$") in
49
-            1)  jattool tfind "$trypath"; return 0 ;;
49
+        tmatches=$(jattool tfind -f ALL "$trypath" | grep "^$TestId	" )
50
+        case $(wc -l <<<"$tmatches") in
51
+            1)  cut -d'	' -f3 <<<"$tmatches"; return 0 ;;
50
             *)  continue ;;
52
             *)  continue ;;
51
         esac
53
         esac
52
     done
54
     done