浏览代码

Add cross-referencing comments r.e. stripping ignores

Stuart Kent 9 年前
父节点
当前提交
b237ad32f1
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3
    0
      bin/journey-test.sh
  2. 3
    0
      exercises/build.gradle

+ 3
- 0
bin/journey-test.sh 查看文件

236
     "$EXECPATH"/gradlew compileTestJava
236
     "$EXECPATH"/gradlew compileTestJava
237
     # Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
237
     # Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
238
     for testfile in `find . -name "*Test.${TRACK_SRC_EXT}"`; do
238
     for testfile in `find . -name "*Test.${TRACK_SRC_EXT}"`; do
239
+      # Strip @Ignore annotations to ensure we run the tests (as delivered, all but the first is @Ignore'd).
240
+      # Note that unit-test.sh also strips @Ignore annotations via the Gradle task copyTestsFilteringIgnores.
241
+      # The stripping implementations here and in copyTestsFilteringIgnores should be kept consistent.
239
       sed 's/@Ignore\(\(.*\)\)\{0,1\}//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
242
       sed 's/@Ignore\(\(.*\)\)\{0,1\}//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
240
     done
243
     done
241
     "$EXECPATH"/gradlew test
244
     "$EXECPATH"/gradlew test

+ 3
- 0
exercises/build.gradle 查看文件

29
     }
29
     }
30
   }
30
   }
31
 
31
 
32
+  // Note that journey-test.sh also strips @Ignore annotations using sed. The
33
+  // stripping implementations here and in journey-test.sh should be kept
34
+  // consistent.
32
   task copyTestsFilteringIgnores(type: Copy) {
35
   task copyTestsFilteringIgnores(type: Copy) {
33
     from "src/test/java"
36
     from "src/test/java"
34
     into "build/gen/test/java"
37
     into "build/gen/test/java"