diff --git a/.travis.yml b/.travis.yml index 39e2d97287d..dab9855ce0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,7 @@ script: - gulp electron --silent - gulp compile --silent --max_old_space_size=4096 - gulp optimize-vscode --silent --max_old_space_size=4096 - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --reporter dot --coverage; else ./scripts/test.sh --reporter dot; fi - - ./scripts/test-electron.sh + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage; else ./scripts/test.sh; fi - ./scripts/test-integration.sh after_success: diff --git a/appveyor.yml b/appveyor.yml index f7b9e1f5ae5..3e386132b45 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,5 +16,4 @@ test_script: - node --version - npm --version - .\scripts\test.bat - - .\scripts\test-electron.bat - .\scripts\test-integration.bat diff --git a/scripts/test-electron.bat b/scripts/test-mocha.bat similarity index 51% rename from scripts/test-electron.bat rename to scripts/test-mocha.bat index 0f7ce8e9a85..e1aa4bef47f 100644 --- a/scripts/test-electron.bat +++ b/scripts/test-mocha.bat @@ -1,7 +1,7 @@ @echo off setlocal -set ELECTRON_RUN_AS_NODE= +set ELECTRON_RUN_AS_NODE=1 pushd %~dp0\.. @@ -10,10 +10,16 @@ set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" -rem Run tests in electron -%CODE% .\test\electron\index.js %* +rem TFS Builds +if not "%BUILD_BUILDID%" == "" ( + %CODE% .\node_modules\mocha\bin\_mocha %* +) +rem Otherwise +if "%BUILD_BUILDID%" == "" ( + %CODE% .\node_modules\mocha\bin\_mocha --reporter dot %* +) popd endlocal -exit /b %errorlevel% +exit /b %errorlevel% \ No newline at end of file diff --git a/scripts/test-electron.sh b/scripts/test-mocha.sh similarity index 85% rename from scripts/test-electron.sh rename to scripts/test-mocha.sh index c8318a434dd..9aa16fa3241 100755 --- a/scripts/test-electron.sh +++ b/scripts/test-mocha.sh @@ -28,15 +28,15 @@ test -d node_modules || ./scripts/npm.sh install # Build test -d out || ./node_modules/.bin/gulp compile -echo "code $CODE" + # Unit Tests export VSCODE_DEV=1 if [[ "$OSTYPE" == "darwin"* ]]; then - cd $ROOT ; ulimit -n 4096 ; \ + cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ - test/electron/index.js "$@" + node_modules/mocha/bin/_mocha "$@" else - cd $ROOT ; \ + cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ - test/electron/index.js "$@" + node_modules/mocha/bin/_mocha "$@" fi diff --git a/scripts/test.bat b/scripts/test.bat index e1aa4bef47f..0f7ce8e9a85 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -1,7 +1,7 @@ @echo off setlocal -set ELECTRON_RUN_AS_NODE=1 +set ELECTRON_RUN_AS_NODE= pushd %~dp0\.. @@ -10,16 +10,10 @@ set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" -rem TFS Builds -if not "%BUILD_BUILDID%" == "" ( - %CODE% .\node_modules\mocha\bin\_mocha %* -) +rem Run tests in electron +%CODE% .\test\electron\index.js %* -rem Otherwise -if "%BUILD_BUILDID%" == "" ( - %CODE% .\node_modules\mocha\bin\_mocha --reporter dot %* -) popd endlocal -exit /b %errorlevel% \ No newline at end of file +exit /b %errorlevel% diff --git a/scripts/test.sh b/scripts/test.sh index 9aa16fa3241..c8318a434dd 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -28,15 +28,15 @@ test -d node_modules || ./scripts/npm.sh install # Build test -d out || ./node_modules/.bin/gulp compile - +echo "code $CODE" # Unit Tests export VSCODE_DEV=1 if [[ "$OSTYPE" == "darwin"* ]]; then - cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \ + cd $ROOT ; ulimit -n 4096 ; \ "$CODE" \ - node_modules/mocha/bin/_mocha "$@" + test/electron/index.js "$@" else - cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \ + cd $ROOT ; \ "$CODE" \ - node_modules/mocha/bin/_mocha "$@" + test/electron/index.js "$@" fi