Use TEST_JUNIT_XML_ROOT instead of the CircleCI-specific root

This commit is contained in:
Ash Wilson
2017-07-29 16:35:00 -04:00
parent 3e581d4936
commit 830038f1ac
2 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ machine:
XCODE_SCHEME: test
XCODE_WORKSPACE: test
XCODE_PROJECT: test
TEST_JUNIT_XML_ROOT: ${CIRCLE_TEST_REPORTS}
xcode:
version: 7.3

View File

@@ -35,10 +35,10 @@ if (process.platform === 'darwin') {
function prepareEnv (suiteName) {
const env = {}
if (process.env.CIRCLE_TEST_REPORTS) {
// CircleCI
// Tell Jasmine to output this suite's results to the directory that Circle expects to find JUnit XML files in.
const outputPath = path.join(process.env.CIRCLE_TEST_REPORTS, suiteName, 'test-results.xml')
if (process.env.TEST_JUNIT_XML_ROOT) {
// Tell Jasmine to output this suite's results as a JUnit XML file to a subdirectory of the root, so that a
// CI system can interpret it.
const outputPath = path.join(process.env.TEST_JUNIT_XML_ROOT, suiteName, 'test-results.xml')
env.TEST_JUNIT_XML_PATH = outputPath
}