Просмотр исходного кода

Merge pull request #637 from exercism/cross-reference-ignore-annotation-stripping

Add cross-referencing comments r.e. stripping ignores
FridaTveit 9 лет назад
Родитель
Сommit
4f843a334e
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"