Path: blob/main/build/azure-pipelines/linux/steps/product-build-linux-test.yml
5313 views
parameters:1- name: VSCODE_RUN_ELECTRON_TESTS2type: boolean3- name: VSCODE_RUN_BROWSER_TESTS4type: boolean5- name: VSCODE_RUN_REMOTE_TESTS6type: boolean78steps:9- script: npm exec -- npm-run-all2 -lp "electron $(VSCODE_ARCH)" "playwright-install"10env:11GITHUB_TOKEN: "$(github-distro-mixin-password)"12displayName: Download Electron and Playwright13retryCountOnTaskFailure: 31415- script: |16set -e17APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)18ELECTRON_ROOT=.build/electron19sudo chown root $APP_ROOT/chrome-sandbox20sudo chown root $ELECTRON_ROOT/chrome-sandbox21sudo chmod 4755 $APP_ROOT/chrome-sandbox22sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox23stat $APP_ROOT/chrome-sandbox24stat $ELECTRON_ROOT/chrome-sandbox25displayName: Change setuid helper binary permission2627- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:28- script: ./scripts/test.sh --build --tfs "Unit Tests"29env:30VSCODE_SKIP_PRELAUNCH: '1'31displayName: �� Run unit tests (Electron)32timeoutInMinutes: 1533- script: npm run test-node -- --build34displayName: �� Run unit tests (node.js)35timeoutInMinutes: 153637- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:38- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"39env:40DEBUG: "*browser*"41displayName: �� Run unit tests (Browser, Chromium)42timeoutInMinutes: 154344- script: |45set -e46npm run gulp \47compile-extension:configuration-editing \48compile-extension:css-language-features-server \49compile-extension:emmet \50compile-extension:git \51compile-extension:github-authentication \52compile-extension:html-language-features-server \53compile-extension:ipynb \54compile-extension:notebook-renderers \55compile-extension:json-language-features-server \56compile-extension:markdown-language-features \57compile-extension-media \58compile-extension:microsoft-authentication \59compile-extension:typescript-language-features \60compile-extension:vscode-api-tests \61compile-extension:vscode-colorize-tests \62compile-extension:vscode-colorize-perf-tests \63compile-extension:vscode-test-resolver64displayName: Build integration tests6566- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:67- script: |68# Figure out the full absolute path of the product we just built69# including the remote server and configure the integration tests70# to run with these builds instead of running out of sources.71set -e72APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)73APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")74INTEGRATION_TEST_APP_NAME="$APP_NAME" \75INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \76./scripts/test-integration.sh --build --tfs "Integration Tests"77env:78VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)79VSCODE_SKIP_PRELAUNCH: '1'80displayName: 🧪 Run integration tests (Electron)81timeoutInMinutes: 208283- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:84- script: ./scripts/test-web-integration.sh --browser chromium85env:86VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web87displayName: �� Run integration tests (Browser, Chromium)88timeoutInMinutes: 208990- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:91- script: |92set -e93APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)94APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")95INTEGRATION_TEST_APP_NAME="$APP_NAME" \96INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \97./scripts/test-remote-integration.sh98env:99VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)100VSCODE_SKIP_PRELAUNCH: '1'101displayName: 🧪 Run integration tests (Remote)102timeoutInMinutes: 20103104- script: |105set -e106ps -ef107cat /proc/sys/fs/inotify/max_user_watches108lsof | wc -l109displayName: Diagnostics before smoke test run (processes, max_user_watches, number of opened file handles)110continueOnError: true111condition: succeededOrFailed()112113- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:114- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"115timeoutInMinutes: 20116displayName: �� Run smoke tests (Electron)117118- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:119- script: npm run smoketest-no-compile -- --web --tracing --headless120env:121VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web122timeoutInMinutes: 20123displayName: �� Run smoke tests (Browser, Chromium)124125- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:126- script: |127set -e128APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)129VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \130npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"131timeoutInMinutes: 20132displayName: 🧪 Run smoke tests (Remote)133134- script: |135set -e136ps -ef137cat /proc/sys/fs/inotify/max_user_watches138lsof | wc -l139displayName: Diagnostics after smoke test run (processes, max_user_watches, number of opened file handles)140continueOnError: true141condition: succeededOrFailed()142143- task: PublishTestResults@2144displayName: Publish Tests Results145inputs:146testResultsFiles: "*-results.xml"147searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"148condition: succeededOrFailed()149150151