Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] move creation of required unit test resources into separate shell script #35

Closed
wants to merge 4 commits into from
Closed

[Java] move creation of required unit test resources into separate shell script #35

wants to merge 4 commits into from

Conversation

rendner
Copy link

@rendner rendner commented Sep 21, 2018

This PR fixes #30 and #36

The maven project java/messaging/mqtt/joynr-mqtt-client requires additional files during the unit tests. These files are only created through docker/joynr-android/scripts/build/java-android-clean-build. If this script wasn't executed in the past, the files are not available and some tests will fail. This PR moves the creation of the required files from docker/joynr-android/scripts/build/java-android-clean-build into a separate shell script.

The maven project (java/messaging/mqtt/joynr-mqtt-client) itself executes this new shell script during the maven phase generate-test-resources to ensure the files are available during the tests. With this change it doesn't matter how the unit tests are started.

…ell script

   This is needed because these required resources are only created
   through 'docker/joynr-android/scripts/build/java-android-clean-build'.
   If 'java-android-clean-build' wasn't executed in the past the resources
   aren't available and some tests from 'java/messaging/mqtt/joynr-mqtt-client'
   will fail.

   With these changes it doesn't matter from which 'clean-build' script the
   maven build process was started.
…ssful status

   The script always exits with return code 0 to not break the maven build.
   Without this change, running the unit tests of 'java/messaging/mqtt/joynr-mqtt-client'
   outside of the joynr docker container would fail and therefore break the maven build.
   The shell script 'gen-java-keystore-truststore.sh' only works
   correctly if it is executed inside a joynr-docker-container.
   On a windows system it would break the maven build, because
   in most cases running shell scripts isn't supported or requires
   additional configurations.

   The environment variable 'JOYNR_DOCKER_ENVIRONMENT' can be checked
   by maven or shell scripts to determine if it is save to do some
   magic which would only work inside the joynr-docker-containers.
@rendner
Copy link
Author

rendner commented Oct 31, 2019

PR withdrawn.

@rendner rendner closed this Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant