瀏覽代碼

Fix test discovery by id

Alois Mahdal 6 年之前
父節點
當前提交
3782d2ec20
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      src/libexec/jattool-runtest

+ 4
- 2
src/libexec/jattool-runtest 查看文件

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