mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add config for running extension tests (#4495)
* Add .bat for running extension tests (currently only Notebook) and set up launch.json with 2 new launch configs for running & debugging extension tests. * Rename files to make it clear these aren't the integration tests * Update launch.config too * Fix spacing and missed file name update
This commit is contained in:
25
.vscode/launch.json
vendored
25
.vscode/launch.json
vendored
@@ -147,7 +147,23 @@
|
|||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js"
|
"${workspaceFolder}/out/**/*.js"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"type": "chrome",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Run Extension Unit Tests",
|
||||||
|
"windows": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/test-extensions-unit.bat"
|
||||||
|
},
|
||||||
|
"osx": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/test-extensions-unit.sh"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/test-extensions-unit.sh"
|
||||||
|
},
|
||||||
|
"webRoot": "${workspaceFolder}",
|
||||||
|
"timeout": 45000
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"compounds": [
|
"compounds": [
|
||||||
{
|
{
|
||||||
@@ -157,6 +173,13 @@
|
|||||||
"Run Unit Tests"
|
"Run Unit Tests"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug Extension Unit Tests",
|
||||||
|
"configurations": [
|
||||||
|
"Attach to Extension Host",
|
||||||
|
"Run Extension Unit Tests"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Debug azuredatastudio Main and Renderer",
|
"name": "Debug azuredatastudio Main and Renderer",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
|||||||
22
scripts/test-extensions-unit.bat
Normal file
22
scripts/test-extensions-unit.bat
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
:: Runs unit tests for Extensions
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
pushd %~dp0\..
|
||||||
|
|
||||||
|
set VSCODEUSERDATADIR=%TMP%\adsuser-%RANDOM%-%TIME:~6,5%
|
||||||
|
set VSCODEEXTENSIONSDIR=%TMP%\adsext-%RANDOM%-%TIME:~6,5%
|
||||||
|
echo %VSCODEUSERDATADIR%
|
||||||
|
echo %VSCODEEXTENSIONSDIR%
|
||||||
|
@echo OFF
|
||||||
|
|
||||||
|
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\notebook --extensionTestsPath=%~dp0\..\extensions\notebook\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
rmdir /s /q %VSCODEUSERDATADIR%
|
||||||
|
rmdir /s /q %VSCODEEXTENSIONSDIR%
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
endlocal
|
||||||
2
scripts/test-extensions.sh → scripts/test-extensions-unit.sh
Executable file → Normal file
2
scripts/test-extensions.sh → scripts/test-extensions-unit.sh
Executable file → Normal file
@@ -1,4 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Runs unit tests for Extensions
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
Reference in New Issue
Block a user