clean up test scripts, bring back html server tests

This commit is contained in:
Martin Aeschlimann 2017-11-15 11:15:41 +01:00
parent d08a44a960
commit 68c6182b83
7 changed files with 19 additions and 26 deletions

View file

@ -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

View file

@ -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

View file

@ -1 +0,0 @@
.\scripts\test.bat --runGlob **\*.integrationTest.js -g integration %*

View file

@ -1 +0,0 @@
./scripts/test.sh --runGlob **/*.integrationTest.js -g integration "$@"

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,2 @@
--delay
--ui tdd
--timeout 10000
test/all.js
--timeout 10000