Преглед изворни кода

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 ;;