Skip to content

Commit 68c6182

Browse files
committed
clean up test scripts, bring back html server tests
1 parent d08a44a commit 68c6182

7 files changed

Lines changed: 19 additions & 26 deletions

File tree

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,8 @@ set NAMESHORT=%NAMESHORT: "=%
1010
set NAMESHORT=%NAMESHORT:"=%.exe
1111
set CODE=".build\electron\%NAMESHORT%"
1212

13-
rem TFS Builds
14-
if not "%BUILD_BUILDID%" == "" (
15-
%CODE% .\node_modules\mocha\bin\_mocha %*
16-
)
13+
%CODE% %*
1714

18-
rem Otherwise
19-
if "%BUILD_BUILDID%" == "" (
20-
%CODE% .\node_modules\mocha\bin\_mocha --reporter dot %*
21-
)
2215
popd
2316

2417
endlocal
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,17 @@ fi
2020
INTENDED_VERSION="v`node -p "require('./package.json').electronVersion"`"
2121
INSTALLED_VERSION=$(cat .build/electron/version 2> /dev/null)
2222

23-
# Node modules
24-
test -d node_modules || ./scripts/npm.sh install
2523

2624
# Get electron
2725
(test -f "$CODE" && [ $INTENDED_VERSION == $INSTALLED_VERSION ]) || ./node_modules/.bin/gulp electron
2826

29-
# Build
30-
test -d out || ./node_modules/.bin/gulp compile
31-
32-
# Unit Tests
3327
export VSCODE_DEV=1
3428
if [[ "$OSTYPE" == "darwin"* ]]; then
3529
cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \
3630
"$CODE" \
37-
node_modules/mocha/bin/_mocha "$@"
31+
"$@"
3832
else
3933
cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \
4034
"$CODE" \
41-
node_modules/mocha/bin/_mocha "$@"
35+
"$@"
4236
fi

scripts/test-int-mocha.bat

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/test-int-mocha.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/test-integration.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ if not "%APPVEYOR%" == "" (
88
)
99
set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%
1010

11-
:: Integration Tests
11+
:: Tests in the extension host
1212
.\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%
1313
.\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%
14-
.\scripts\test-int-mocha.bat
1514
.\scripts\code.bat $%~dp0\..\extensions\emmet\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disableExtensions --user-data-dir=%VSCODEUSERDATADIR%
1615

16+
:: Integration & performance tests in AMD
17+
.\scripts\test.bat --runGlob **\*.integrationTest.js %*
18+
19+
:: Tests in commonJS (language servers tests...)
20+
.\scripts\mocha-electron.bat .\extensions\html\server\out\test\
21+
1722
rmdir /s /q %VSCODEUSERDATADIR%
1823

1924
popd

scripts/test-integration.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ fi
1212

1313
cd $ROOT
1414

15-
# Integration Tests
15+
# Tests in the extension host
1616
./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
1717
./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
18-
./scripts/test-int-mocha.sh
19-
./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
18+
#./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
19+
20+
# Integration tests in AMD
21+
./scripts/test.sh --runGlob **/*.integrationTest.js "$@"
22+
23+
# Tests in commonJS (language server tests...)
24+
./scripts/node-electron.sh ./node_modules/mocha/bin/_mocha ./extensions/html/server/out/test/
2025

2126
rm -r $VSCODEUSERDATADIR

test/mocha.opts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
--delay
21
--ui tdd
3-
--timeout 10000
4-
test/all.js
2+
--timeout 10000

0 commit comments

Comments
 (0)