ソースを参照

Run "API test" only against own modules

Until TFKit is able to run tests in sandbox (instead of running tests
against installed SUT), this test will throw false positives in case
any other Shellfu modules are present.

This commit adds workaround that should be removed when new TFKit
version is installed.
Alois Mahdal 8 年 前
コミット
ffc81041b2
共有1 個のファイルを変更した21 個の追加0 個の削除を含む
  1. 21
    0
      tests/shellfu_api/TF_RUN

+ 21
- 0
tests/shellfu_api/TF_RUN ファイルの表示

@@ -3,9 +3,30 @@
3 3
 . "$TF_DIR/include/subtest.sh"
4 4
 . "$TF_DIR/include/tools.sh"
5 5
 
6
+flt_ours() {
7
+    #
8
+    # Filter list of modules on stdin; allow only ours
9
+    #
10
+    grep -xF \
11
+        -e _pretty_plain \
12
+        -e _pretty_journald \
13
+        -e _pretty_html \
14
+        -e sync \
15
+        -e _pretty_color \
16
+        -e inigrep \
17
+        -e _pretty_notify \
18
+        -e charmenu \
19
+        -e exit \
20
+        -e termcolors \
21
+        -e pretty \
22
+        -e mdfmt \
23
+    #FIXME: remove the filter when TFKit learns to test in sandbox
24
+}
25
+
6 26
 shellfu_get_all() {
7 27
     local t=$1      # type (functions, variables, modules)
8 28
     shellfu-doc --all --lsmod \
29
+      | flt_ours \
9 30
       | case $t in
10 31
             modules)    cat ;;
11 32
             variables)  xargs -L1 shellfu-doc --all --lsvar ;;