I'm trying to use grunt-exec to run a javascript test runner with a deployed link variable passed in.
I am trying to do so by setting an environment variable grunt.option('link')
using exec:setLink
. In my test_runner.js
I grab the variable with process.env.TEST_LINK
. Unfortunately, it appears that grunt-exec won't run bash commands such as export(?)
Really, I don't care how the variable gets to my test_runner.js
so any other ideas would be welcome.
exec: {
// DOESN'T WORK: Sets env variable with link for selenium tests
setLink: {
cmd: function () {
return "export TEST_LINK=" + "'" + grunt.option('link') + "'";
}
},
// Integration tests, needs TEST_LINK
selenium: {
cmd: function () {
return "node test/runner/jasmine_runner.js";
}
}