Skip to content

Commit

Permalink
Use TEST_JUNIT_XML_ROOT instead of the CircleCI-specific root
Browse files Browse the repository at this point in the history
  • Loading branch information
smashwilson committed Aug 1, 2017
1 parent 3e581d4 commit 830038f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 830038f

Please sign in to comment.