-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix wrong copy command for copying xunit-reports in gradle build
- Loading branch information
Showing
4 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ UNIT_TEST_RESULT_DIR="${BUILD_DIR}/test-results/test" | |
if [ -d "${UNIT_TEST_RESULT_DIR}" ]; then | ||
UNIT_TEST_ARTIFACTS_DIR="${ARTIFACTS_DIR}/xunit-reports" | ||
mkdir -p "${UNIT_TEST_ARTIFACTS_DIR}" | ||
cp "${UNIT_TEST_RESULT_DIR}/"*.xml "${UNIT_TEST_ARTIFACTS_DIR}/${ARTIFACT_PREFIX}report.xml" | ||
cp "${UNIT_TEST_RESULT_DIR}/"*.xml "${UNIT_TEST_ARTIFACTS_DIR}/${ARTIFACT_PREFIX}" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
oalyman
Author
Contributor
|
||
else | ||
echo "Build failed: no unit test results found in ${UNIT_TEST_RESULT_DIR}" | ||
exit 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...tdata/workspaces/gradle-sample-app/src/test/java/ods/java/gradle/sample/app/AppTest2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* This Java source file was generated by the Gradle 'init' task. | ||
*/ | ||
package ods.java.gradle.sample.app; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
// this class exists to have more than one test xml in the end | ||
class AppTest2 { | ||
@Test void appHasAGreetingTwo() { | ||
App classUnderTest = new App(); | ||
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting"); | ||
} | ||
} |
Shouldn't it rather be just
cp "${UNIT_TEST_RESULT_DIR}/"*.xml "${UNIT_TEST_ARTIFACTS_DIR}
considering that further above in the script
$ARTIFACT_PREFIX
is set like this:?