Enable running jni test during gradle build #1553
Open
+33
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Earlier the jni tests were not running as part of ./gradlew build, with this change the tests will run as part of
./gradlew build
.To enable the tests I added a new gradle task
jniTest
, which can be run via./gradlew jniTest
. I also added the dependency ofcheck
task of gradle on this test. As check already runs integTest and test so it make sense to run jni test as part of check.check
task is already a dependency ofbuild
task.Also validated that on doing
./gradlew build --dry-run
I can seejniTest
task.How to run jni test with gradle?
Same is added in docs.
Why Jni Test is not added as part of test task?
The test task currently runs all the Java unit test. My initial plan was to do that only, but what it will lead to is if a user just want to run specific unit test via
--tests
, then also the jni test will run. We can add a parameter that can skip the tests if explicitly passed but this also creates a huddle as on failure of unit test we cannot just copy paste the command provided by gradle to run the failed unit test.Issues Resolved
#1453
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.