Skip to content

Commit

Permalink
ElektraInitiative#3713 fixed test exclusion mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Tucek committed Mar 31, 2021
1 parent d003221 commit 1a4988c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/bindings/jna/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set (MIN_JAVA_VERSION "1.8.0")
set (MIN_GRADLE_VERSION "6.8.0")

macro (java_exclude_test test)
string (APPEND GRADLE_TEST_EXCLUDES "\texclude '**/${test}.class'\n")
string (APPEND GRADLE_TEST_EXCLUDES "\t\texcludeTestsMatching '*.${test}'\n")
endmacro ()

macro (java_test_needs_plugin test plugin)
Expand Down
7 changes: 7 additions & 0 deletions src/bindings/jna/java-shared.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ tasks.named('test').configure {
}
}

// apply optional test override
File testExclusions = new File(project.projectDir, 'test-exclusion.gradle')
if (testExclusions.exists()) {
apply from: testExclusions
logger.lifecycle("Test exclusions have been applied.")
}

// eclipse IDE integration
eclipse {
classpath {
Expand Down

This file was deleted.

5 changes: 3 additions & 2 deletions src/bindings/jna/libelektra/test-exclusion.gradle.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
test {
@GRADLE_TEST_EXCLUDES@
tasks.named('test').configure {
filter {
@GRADLE_TEST_EXCLUDES@ }
}

0 comments on commit 1a4988c

Please sign in to comment.