mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Add unstable test params for core and extension tests (#7513)
* Add unstable test params for core and extension tests * unset invert options for unstable script runs * Fix copypasta * Add nogpu to dacpac tests
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
setlocal
|
||||
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
set ADS_TEST_INVERT_GREP=
|
||||
|
||||
echo Running unstable tests
|
||||
echo Running UNSTABLE ADS Extension Integration tests
|
||||
|
||||
call %~dp0\sql-test-integration.bat
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ fi
|
||||
cd $ROOT
|
||||
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
export ADS_TEST_INVERT_GREP=
|
||||
|
||||
echo Running unstable tests
|
||||
echo Running UNSTABLE ADS Extension Integration tests
|
||||
|
||||
./scripts/sql-test-integration.sh
|
||||
|
||||
@@ -7,6 +7,7 @@ set VSCODEEXTENSIONSDIR=%TMP%\adsext-%RANDOM%-%TIME:~6,5%
|
||||
echo VSCODEUSERDATADIR=%VSCODEUSERDATADIR%
|
||||
echo VSCODEEXTENSIONSDIR=%VSCODEEXTENSIONSDIR%
|
||||
|
||||
:: Default to only running stable tests if test grep isn't set
|
||||
if "%ADS_TEST_GREP%" == "" (
|
||||
echo Running stable tests only
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
|
||||
@@ -12,6 +12,7 @@ else
|
||||
VSCODEEXTDIR=`mktemp -d 2>/dev/null`
|
||||
fi
|
||||
|
||||
# Default to only running stable tests if test grep isn't set
|
||||
if [[ "$ADS_TEST_GREP" == "" ]]; then
|
||||
echo Running stable tests only
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
|
||||
12
scripts/test-extensions-unstable.bat
Normal file
12
scripts/test-extensions-unstable.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
:: Runs UNSTABLE Extension Tests
|
||||
|
||||
setlocal
|
||||
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
set ADS_TEST_INVERT_GREP=
|
||||
|
||||
echo Running UNSTABLE Extension Tests
|
||||
|
||||
call %~dp0\test-extensions.bat
|
||||
|
||||
endlocal
|
||||
17
scripts/test-extensions-unstable.sh
Normal file
17
scripts/test-extensions-unstable.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||
else
|
||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||
fi
|
||||
|
||||
cd $ROOT
|
||||
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
export ADS_TEST_INVERT_GREP=
|
||||
echo Running UNSTABLE Extension Tests
|
||||
|
||||
./scripts/test-extensions.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
:: Runs unit tests for Extensions
|
||||
:: Runs Extension tests
|
||||
|
||||
setlocal
|
||||
|
||||
@@ -8,23 +8,54 @@ set VSCODEUSERDATADIR=%TMP%\adsuser-%RANDOM%-%TIME:~6,5%
|
||||
set VSCODEEXTENSIONSDIR=%TMP%\adsext-%RANDOM%-%TIME:~6,5%
|
||||
echo %VSCODEUSERDATADIR%
|
||||
echo %VSCODEEXTENSIONSDIR%
|
||||
|
||||
:: Default to only running stable tests if test grep isn't set
|
||||
if "%ADS_TEST_GREP%" == "" (
|
||||
echo Running stable tests only
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
SET ADS_TEST_INVERT_GREP=1
|
||||
)
|
||||
|
||||
@echo OFF
|
||||
|
||||
echo starting admin tool extension windows tests
|
||||
echo ***************************************************
|
||||
echo *** starting admin tool extension windows tests ***
|
||||
echo ***************************************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\admin-tool-ext-win --extensionTestsPath=%~dp0\..\extensions\admin-tool-ext-win\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --disableExtensions --remote-debugging-port=9222
|
||||
echo starting agent tests
|
||||
|
||||
echo ****************************
|
||||
echo *** starting agent tests ***
|
||||
echo ****************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\agent --extensionTestsPath=%~dp0\..\extensions\agent\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting azurecore tests
|
||||
|
||||
echo ********************************
|
||||
echo *** starting azurecore tests ***
|
||||
echo ********************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\azurecore --extensionTestsPath=%~dp0\..\extensions\azurecore\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting cms tests
|
||||
|
||||
echo **************************
|
||||
echo *** starting cms tests ***
|
||||
echo **************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\cms --extensionTestsPath=%~dp0\..\extensions\cms\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting dacpac tests
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting schema compare tests
|
||||
|
||||
echo *****************************
|
||||
echo *** starting dacpac tests ***
|
||||
echo *****************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\schema-compare --extensionTestsPath=%~dp0\..\extensions\schema-compare\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting notebook tests
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\notebook --extensionTestsPath=%~dp0\..\extensions\notebook\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
echo starting resource deployment tests
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
call .\scripts\code.bat --nogpu --extensionDevelopmentPath=%~dp0\..\extensions\resource-deployment --extensionTestsPath=%~dp0\..\extensions\resource-deployment\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
50
scripts/test-extensions-unit.sh → scripts/test-extensions.sh
Executable file → Normal file
50
scripts/test-extensions-unit.sh → scripts/test-extensions.sh
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Runs unit tests for Extensions
|
||||
# Runs Extension Tests
|
||||
set -e
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
@@ -14,25 +14,55 @@ else
|
||||
VSCODEEXTDIR=`mktemp -d 2>/dev/null`
|
||||
fi
|
||||
|
||||
# Default to only running stable tests if test grep isn't set
|
||||
if [[ "$ADS_TEST_GREP" == "" ]]; then
|
||||
echo Running stable tests only
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
export ADS_TEST_INVERT_GREP=1
|
||||
fi
|
||||
|
||||
cd $ROOT
|
||||
echo $VSCODEUSERDATADIR
|
||||
echo $VSCODEEXTDIR
|
||||
|
||||
echo starting admin tool extension windows tests
|
||||
echo ***************************************************
|
||||
echo *** starting admin tool extension windows tests ***
|
||||
echo ***************************************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/admin-tool-ext-win --extensionTestsPath=$ROOT/extensions/admin-tool-ext-win/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting agent tests
|
||||
|
||||
echo ****************************
|
||||
echo *** starting agent tests ***
|
||||
echo ****************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/agent --extensionTestsPath=$ROOT/extensions/agent/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting azurecore tests
|
||||
|
||||
echo ********************************
|
||||
echo *** starting azurecore tests ***
|
||||
echo ********************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/azurecore --extensionTestsPath=$ROOT/extensions/azurecore/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting cms tests
|
||||
|
||||
echo **************************
|
||||
echo *** starting cms tests ***
|
||||
echo **************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/cms --extensionTestsPath=$ROOT/extensions/cms/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting dacpac tests
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting schema compare tests
|
||||
|
||||
echo *****************************
|
||||
echo *** starting dacpac tests ***
|
||||
echo *****************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/schema-compare --extensionTestsPath=$ROOT/extensions/schema-compare/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting notebook tests
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/notebook --extensionTestsPath=$ROOT/extensions/notebook/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
echo starting resource deployment tests
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
./scripts/code.sh --nogpu --extensionDevelopmentPath=$ROOT/extensions/resource-deployment --extensionTestsPath=$ROOT/extensions/resource-deployment/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
|
||||
rm -r $VSCODEUSERDATADIR
|
||||
10
scripts/test-unstable.bat
Normal file
10
scripts/test-unstable.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
setlocal
|
||||
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
set ADS_TEST_INVERT_GREP=
|
||||
|
||||
echo Running UNSTABLE ADS Core Tests
|
||||
|
||||
call %~dp0\test.bat
|
||||
|
||||
endlocal
|
||||
18
scripts/test-unstable.sh
Normal file
18
scripts/test-unstable.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||
else
|
||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||
fi
|
||||
|
||||
cd $ROOT
|
||||
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
export ADS_TEST_INVERT_GREP=
|
||||
|
||||
echo Running UNSTABLE ADS Core Tests
|
||||
|
||||
./scripts/test.sh
|
||||
@@ -15,9 +15,24 @@ set CODE=".build\electron\%NAMESHORT%"
|
||||
node build\lib\electron.js
|
||||
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
|
||||
|
||||
:: Default to only running stable tests if test grep isn't set
|
||||
if "%ADS_TEST_GREP%" == "" (
|
||||
echo Running stable tests only
|
||||
set ADS_TEST_GREP=@UNSTABLE@
|
||||
set ADS_TEST_INVERT_GREP=1
|
||||
)
|
||||
|
||||
set CODE_ARGS=--grep %ADS_TEST_GREP%
|
||||
|
||||
if "%ADS_TEST_INVERT_GREP%" == "1" (
|
||||
set CODE_ARGS=%CODE_ARGS% --invert
|
||||
) else if "%ADS_TEST_INVERT_GREP%" == "true" (
|
||||
set CODE_ARGS=%CODE_ARGS% --invert
|
||||
)
|
||||
|
||||
:: Run tests
|
||||
set ELECTRON_ENABLE_LOGGING=1
|
||||
%CODE% .\test\electron\index.js %*
|
||||
%CODE% .\test\electron\index.js %CODE_ARGS% %*
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -18,6 +18,19 @@ else
|
||||
CODE=".build/electron/$NAME"
|
||||
fi
|
||||
|
||||
# Default to only running stable tests if test grep isn't set
|
||||
if [[ "$ADS_TEST_GREP" == "" ]]; then
|
||||
echo Running stable tests only
|
||||
export ADS_TEST_GREP=@UNSTABLE@
|
||||
export ADS_TEST_INVERT_GREP=1
|
||||
fi
|
||||
|
||||
CODE_ARGS=--grep %ADS_TEST_GREP%
|
||||
|
||||
if [[ "$ADS_TEST_INVERT_GREP" == "1" ]] || [[ "$ADS_TEST_INVERT_GREP" == "true" ]]; then
|
||||
set CODE_ARGS=$CODE_ARGS --invert
|
||||
fi
|
||||
|
||||
# Node modules
|
||||
test -d node_modules || yarn
|
||||
|
||||
@@ -29,10 +42,10 @@ if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||
cd $ROOT ; ulimit -n 4096 ; \
|
||||
ELECTRON_ENABLE_LOGGING=1 \
|
||||
"$CODE" \
|
||||
test/electron/index.js "$@"
|
||||
test/electron/index.js $CODE_ARGS "$@"
|
||||
else
|
||||
cd $ROOT ; \
|
||||
ELECTRON_ENABLE_LOGGING=1 \
|
||||
"$CODE" \
|
||||
test/electron/index.js "$@"
|
||||
test/electron/index.js $CODE_ARGS "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user