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

Export test output dir via ENV #3922

Merged
merged 1 commit into from
Apr 28, 2015
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Apr 17, 2015

This allows custom testem launchers to discover the location of the build output. Browser-based launchers don't need this because they all point at the server URL, but process-based launchers have no other way of finding the build.

For example, I have a project that outputs some node-formatted tests alongside the usual browser-formatted stuff. With this PR I can add a node-based launcher to testem.json:

  "launchers": {
    "NodeTests": {
      "command": "mocha -R tap $EMBER_CLI_TEST_OUTPUT/node-tests",
      "protocol": "tap"
    }

This gives you a way for custom testem launchers to discover where the
built output is. For example, if your build contains tests that node can
run you can put a launcher like this into testem.json:

```js
  "launchers": {
    "NodeTests": {
      "command": "mocha -R tap $EMBER_CLI_TEST_OUTPUT/node_modules/tests",
      "protocol": "tap"
    }
```
@rwjblue
Copy link
Member

rwjblue commented Apr 17, 2015

👍

@stefanpenner
Copy link
Contributor

thoughts on --output-path ?

@rwjblue
Copy link
Member

rwjblue commented Apr 17, 2015

Output path is already configurable, this exposes the specified output path to yhe custom testem runners.

@stefanpenner
Copy link
Contributor

Output path is already configurable, this exposes the specified output path to yhe custom testem run

i get it now... /me hides

@stefanpenner
Copy link
Contributor

does this form of environment variable work in windows?

@rwjblue
Copy link
Member

rwjblue commented Apr 18, 2015

Yes, setting an environment variable like this does work on windows. The custom testem.json launcher config may be slightly different than in the description above, but that should be fine for us here (since we aren't actually adding that by default).

@stefanpenner
Copy link
Contributor

the npm/node_modules cache was stale

stefanpenner added a commit that referenced this pull request Apr 28, 2015
Export test output dir via ENV
@stefanpenner stefanpenner merged commit d36a41e into ember-cli:master Apr 28, 2015
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.

None yet

4 participants