diff --git a/scripts/test-mocha.bat b/scripts/node-electron.bat similarity index 57% rename from scripts/test-mocha.bat rename to scripts/node-electron.bat index e1aa4bef47ff2c898e276a3bd87b71f2344684de..4ddb95b3cae33fd278f240f3c4e403888d05d5bf 100644 --- a/scripts/test-mocha.bat +++ b/scripts/node-electron.bat @@ -10,15 +10,8 @@ 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 %* -) +%CODE% %* -rem Otherwise -if "%BUILD_BUILDID%" == "" ( - %CODE% .\node_modules\mocha\bin\_mocha --reporter dot %* -) popd endlocal diff --git a/scripts/test-mocha.sh b/scripts/node-electron.sh similarity index 81% rename from scripts/test-mocha.sh rename to scripts/node-electron.sh index 9aa16fa32410bb99babb3225bc6e36b81f3e42db..a1c2cf469b006c4a6ae06df1d4ce0414d4d9bbdb 100755 --- a/scripts/test-mocha.sh +++ b/scripts/node-electron.sh @@ -20,23 +20,17 @@ fi INTENDED_VERSION="v`node -p "require('./package.json').electronVersion"`" INSTALLED_VERSION=$(cat .build/electron/version 2> /dev/null) -# Node modules -test -d node_modules || ./scripts/npm.sh install # Get electron (test -f "$CODE" && [ $INTENDED_VERSION == $INSTALLED_VERSION ]) || ./node_modules/.bin/gulp electron -# Build -test -d out || ./node_modules/.bin/gulp compile - -# Unit Tests export VSCODE_DEV=1 if [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ - node_modules/mocha/bin/_mocha "$@" + "$@" else cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ - node_modules/mocha/bin/_mocha "$@" + "$@" fi diff --git a/scripts/test-int-mocha.bat b/scripts/test-int-mocha.bat deleted file mode 100644 index 482aadc5bd547c563d45b3764effc1696e55c253..0000000000000000000000000000000000000000 --- a/scripts/test-int-mocha.bat +++ /dev/null @@ -1 +0,0 @@ -.\scripts\test.bat --runGlob **\*.integrationTest.js -g integration %* diff --git a/scripts/test-int-mocha.sh b/scripts/test-int-mocha.sh deleted file mode 100755 index c0a8913886a7ee70871934011f7e55752f3a0a61..0000000000000000000000000000000000000000 --- a/scripts/test-int-mocha.sh +++ /dev/null @@ -1 +0,0 @@ -./scripts/test.sh --runGlob **/*.integrationTest.js -g integration "$@" \ No newline at end of file diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index 0a2b92e00d7c242d13fd66ab21ed97ee15aee01f..3c807be78ae1d7bc2cd519bdf259424d038f50d4 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -8,12 +8,17 @@ if not "%APPVEYOR%" == "" ( ) set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5% -:: Integration Tests +:: Tests in the extension host .\scripts\code.bat %~dp0\..\extensions\vscode-api-tests\testWorkspace --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out --disableExtensions --user-data-dir=%VSCODEUSERDATADIR% .\scripts\code.bat %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --user-data-dir=%VSCODEUSERDATADIR% -.\scripts\test-int-mocha.bat .\scripts\code.bat $%~dp0\..\extensions\emmet\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disableExtensions --user-data-dir=%VSCODEUSERDATADIR% +:: Integration & performance tests in AMD +.\scripts\test.bat --runGlob **\*.integrationTest.js %* + +:: Tests in commonJS (language servers tests...) +.\scripts\mocha-electron.bat .\extensions\html\server\out\test\ + rmdir /s /q %VSCODEUSERDATADIR% popd diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 0a9eea1b077b3d7c53ac2e687d9d3d8a6962dba1..911b411015fb7f9dd881475643c628d3c58208ef 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -12,10 +12,15 @@ fi cd $ROOT -# Integration Tests +# Tests in the extension host ./scripts/code.sh $ROOT/extensions/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out --disableExtensions --user-data-dir=$VSCODEUSERDATADIR --skip-getting-started ./scripts/code.sh $ROOT/extensions/vscode-colorize-tests/test --extensionDevelopmentPath=$ROOT/extensions/vscode-colorize-tests --extensionTestsPath=$ROOT/extensions/vscode-colorize-tests/out --user-data-dir=$VSCODEUSERDATADIR --skip-getting-started -./scripts/test-int-mocha.sh -./scripts/code.sh $ROOT/extensions/emmet/test-fixtures --extensionDevelopmentPath=$ROOT/extensions/emmet --extensionTestsPath=$ROOT/extensions/emmet/out/test --disableExtensions --user-data-dir=$VSCODEUSERDATADIR --skip-getting-started +#./scripts/code.sh $ROOT/extensions/emmet/test-fixtures --extensionDevelopmentPath=$ROOT/extensions/emmet --extensionTestsPath=$ROOT/extensions/emmet/out/test --disableExtensions --user-data-dir=$VSCODEUSERDATADIR --skip-getting-started + +# Integration tests in AMD +./scripts/test.sh --runGlob **/*.integrationTest.js "$@" + +# Tests in commonJS (language server tests...) +./scripts/node-electron.sh ./node_modules/mocha/bin/_mocha ./extensions/html/server/out/test/ rm -r $VSCODEUSERDATADIR diff --git a/test/mocha.opts b/test/mocha.opts index d6b09ce6e07f800aee28949878f4c1eb3517910e..52e4348c3ed48a8dbf354160f9b0e440ca9ceea4 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,4 +1,2 @@ ---delay --ui tdd ---timeout 10000 -test/all.js +--timeout 10000 \ No newline at end of file