aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-03-13 14:48:14 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-03-13 14:59:28 +0100
commitc6f29fa6d56b8e62b388779790c1cb5831efc7bf (patch)
tree6d1c98204e5bc52dd9eacfa1d8644d308d77ee53
parentc6d1b136d095f10f87ea250e2d0ebe8de46577dd (diff)
downloadsonarqube-c6f29fa6d56b8e62b388779790c1cb5831efc7bf.tar.gz
sonarqube-c6f29fa6d56b8e62b388779790c1cb5831efc7bf.zip
try to fix execution of web tests on windows
-rw-r--r--server/sonar-web/Gruntfile.coffee8
-rw-r--r--server/sonar-web/src/test/lib.js5
2 files changed, 10 insertions, 3 deletions
diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee
index 04fde116c20..868b951f290 100644
--- a/server/sonar-web/Gruntfile.coffee
+++ b/server/sonar-web/Gruntfile.coffee
@@ -7,6 +7,7 @@ module.exports = (grunt) ->
pkg = grunt.file.readJSON('package.json')
expressPort = '<%= grunt.option("port") || 3000 %>'
+ isWindows = process.platform == 'win32'
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
@@ -348,7 +349,9 @@ module.exports = (grunt) ->
test: true
'no-colors': true
'fail-fast': true
+ verbose: true
'log-level': 'debug'
+ parallel: !isWindows
port: expressPort
src: ['src/test/js/**/*.js']
testCoverage:
@@ -356,8 +359,9 @@ module.exports = (grunt) ->
test: true
'no-colors': true
'fail-fast': true
- concise: true
- parallel: true
+ verbose: true
+ 'log-level': 'debug'
+ parallel: !isWindows
port: expressPort
src: ['src/test/js/**/*.js']
testCoverageLight:
diff --git a/server/sonar-web/src/test/lib.js b/server/sonar-web/src/test/lib.js
index 64fff60c3a7..4f706ef3913 100644
--- a/server/sonar-web/src/test/lib.js
+++ b/server/sonar-web/src/test/lib.js
@@ -53,7 +53,10 @@ exports.changeWorkingDirectory = function (dir) {
// Since Casper has control, the invoked script is deep in the argument stack
// commandLineArgs = casper/bin/bootstrap.js,--casper-path=.../casperjs,--cli,--test,[file(s) under test],[options]
var currentFile = commandLineArgs[4];
- var curFilePath = fs.absolute(currentFile).split(fs.separator);
+ console.log('');
+ console.log(currentFile);
+ console.log('');
+ var curFilePath = currentFile.split(fs.separator);
if (curFilePath.length > 1) {
curFilePath.pop(); // test name
curFilePath.pop(); // "js" dir