diff options
author | Benjamin Pasero <benjpas@microsoft.com> | 2021-06-15 09:33:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 09:33:26 +0300 |
commit | 2ddc1e4fc5678c19a423009a607567b9d9b8e3dc (patch) | |
tree | 8f6ef24672ea3af073d318e150cbf0eb764a47b5 /scripts | |
parent | 71be3b3641329d5f22b54f9223deba436b47ee03 (diff) |
Produce logs during test runs (integration, smoke) and publish as artefacts (#126065)
* first cut upload log files from integration test runs
* always publish log files
* move logs into integration-tests folder
* also produce logs for smoke tests
* store remote log files
* wire in logspath arg properly
* always publish logs
* enable logs for browser based smoke tests
* log only in verbose
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/test-integration.bat | 5 | ||||
-rwxr-xr-x | scripts/test-integration.sh | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index c9055f4051a..da958984dd9 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -5,6 +5,7 @@ pushd %~dp0\.. set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2% set VSCODECRASHDIR=%~dp0\..\.build\crashes +set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests :: Figure out which Electron to use for running tests if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( @@ -14,6 +15,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1 echo Storing crash reports into '%VSCODECRASHDIR%'. + echo Storing log files into '%VSCODELOGSDIR%'. echo Running integration tests out of sources. ) else ( :: Run from a built: need to compile all test extensions @@ -37,6 +39,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( set ELECTRON_ENABLE_LOGGING=1 echo Storing crash reports into '%VSCODECRASHDIR%'. + echo Storing log files into '%VSCODELOGSDIR%'. echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build. ) @@ -46,7 +49,7 @@ if %errorlevel% neq 0 exit /b %errorlevel% :: Tests in the extension host -set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR% +set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR% call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS% if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index f88bcb2d0d3..efbdb1ea29c 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -14,6 +14,7 @@ fi VSCODEUSERDATADIR=`mktemp -d 2>/dev/null` VSCODECRASHDIR=$ROOT/.build/crashes +VSCODELOGSDIR=$ROOT/.build/logs/integration-tests cd $ROOT # Figure out which Electron to use for running tests @@ -23,6 +24,7 @@ then INTEGRATION_TEST_ELECTRON_PATH="./scripts/code.sh" echo "Storing crash reports into '$VSCODECRASHDIR'." + echo "Storing log files into '$VSCODELOGSDIR'." echo "Running integration tests out of sources." else # Run from a built: need to compile all test extensions @@ -47,6 +49,7 @@ else export ELECTRON_ENABLE_LOGGING=1 echo "Storing crash reports into '$VSCODECRASHDIR'." + echo "Storing log files into '$VSCODELOGSDIR'." echo "Running integration tests with '$INTEGRATION_TEST_ELECTRON_PATH' as build." fi @@ -62,7 +65,7 @@ after_suite # Tests in the extension host -ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --crash-reporter-directory=$VSCODECRASHDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR" +ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR" "$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $ROOT/extensions/vscode-api-tests/testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS after_suite |