diff --git a/build/azure-pipelines/darwin/sql-product-build-darwin.yml b/build/azure-pipelines/darwin/sql-product-build-darwin.yml index ad9a3f21f8..4bd1d990cf 100644 --- a/build/azure-pipelines/darwin/sql-product-build-darwin.yml +++ b/build/azure-pipelines/darwin/sql-product-build-darwin.yml @@ -112,19 +112,18 @@ steps: displayName: Run unit tests condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) - # {{SQL CARBON TODO}} - reenable - # - script: | - # # Figure out the full absolute path of the product we just built - # # including the remote server and configure the integration tests - # # to run with these builds instead of running out of sources. - # set -e - # APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin-x64 - # APP_NAME="`ls $APP_ROOT | head -n 1`" - # INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \ - # VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-darwin" \ - # ./scripts/test-integration.sh --build --tfs "Integration Tests" - # displayName: Run integration tests (Electron) - # condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) + - script: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the integration tests + # to run with these builds instead of running out of sources. + set -e + APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin-x64 + APP_NAME="`ls $APP_ROOT | head -n 1`" + INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \ + VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-darwin" \ + ./scripts/test-integration.sh --build --tfs "Integration Tests" + displayName: Run integration tests (Electron) + condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) - script: | set -e diff --git a/build/azure-pipelines/linux/sql-product-build-linux.yml b/build/azure-pipelines/linux/sql-product-build-linux.yml index 284f1f52e8..40b97ae0d4 100644 --- a/build/azure-pipelines/linux/sql-product-build-linux.yml +++ b/build/azure-pipelines/linux/sql-product-build-linux.yml @@ -123,19 +123,18 @@ steps: displayName: Run unit tests (Electron) condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSIONS_ONLY'], 'true')) - # {{SQL CARBON TODO}} -- reenable - # - script: | - # # Figure out the full absolute path of the product we just built - # # including the remote server and configure the integration tests - # # to run with these builds instead of running out of sources. - # set -e - # APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 - # APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") - # INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ - # VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ - # DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests" - # displayName: Run integration tests (Electron) - # condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSIONS_ONLY'], 'true')) + - script: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the integration tests + # to run with these builds instead of running out of sources. + set -e + APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 + APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") + INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ + VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ + DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests" + displayName: Run integration tests (Electron) + condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSIONS_ONLY'], 'true')) - script: | # Figure out the full absolute path of the product we just built diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 9f1e60cf98..c9a1a294be 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -8,9 +8,9 @@ else ROOT=$(dirname $(dirname $(readlink -f $0))) # {{SQL CARBON EDIT}} Completed disable sandboxing via --no-sandbox since we still see failures on our test runs # --disable-setuid-sandbox: setuid sandboxes requires root and is used in containers so we disable this - # --disable-dev-shm-usage: when run on docker containers where size of /dev/shm + # --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm # partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory - LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader" + LINUX_EXTRA_ARGS="--no-sandbox --disable-dev-shm-usage --use-gl=swiftshader" fi VSCODEUSERDATADIR=`mktemp -d 2>/dev/null` @@ -51,6 +51,7 @@ else # Configuration for more verbose output export VSCODE_CLI=1 + export ELECTRON_ENABLE_STACK_DUMPING=1 export ELECTRON_ENABLE_LOGGING=1 echo "Storing crash reports into '$VSCODECRASHDIR'." @@ -58,6 +59,11 @@ else echo "Running integration tests with '$INTEGRATION_TEST_ELECTRON_PATH' as build." fi +if [ -z "$INTEGRATION_TEST_APP_NAME" ]; then + after_suite() { true; } +else + after_suite() { killall $INTEGRATION_TEST_APP_NAME || true; } +fi print_subprocesses() { echo "Subprocesses:" @@ -71,6 +77,7 @@ echo "### node.js integration tests" echo print_subprocesses ./scripts/test.sh --runGlob **/*.integrationTest.js "$@" +after_suite print_subprocesses # Tests in the extension host @@ -102,7 +109,7 @@ echo print_subprocesses "$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $(mktemp -d 2>/dev/null) --enable-proposed-api=vscode.git --extensionDevelopmentPath=$ROOT/extensions/git --extensionTestsPath=$ROOT/extensions/git/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS print_subprocesses -kill_app +after_suite print_subprocesses @@ -112,7 +119,7 @@ echo print_subprocesses "$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $ROOT/extensions/azurecore/test-fixtures --extensionDevelopmentPath=$ROOT/extensions/azurecore --extensionTestsPath=$ROOT/extensions/azurecore/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS print_subprocesses -kill_app +after_suite print_subprocesses