mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Sanity tests for Linux (#290072)
Added Linux containers for supported platforms. Updated tests to run and pass on all targets.
This commit is contained in:
54
test/sanity/scripts/run-docker.cmd
Normal file
54
test/sanity/scripts/run-docker.cmd
Normal file
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set ROOT=%~dp0..
|
||||
set CONTAINER=
|
||||
set ARCH=amd64
|
||||
set BASE_IMAGE=
|
||||
set ARGS=
|
||||
|
||||
:parse_args
|
||||
if "%~1"=="" goto :done_parsing
|
||||
if "%~1"=="--container" (
|
||||
set CONTAINER=%~2
|
||||
shift & shift
|
||||
goto :parse_args
|
||||
)
|
||||
if "%~1"=="--arch" (
|
||||
set ARCH=%~2
|
||||
shift & shift
|
||||
goto :parse_args
|
||||
)
|
||||
if "%~1"=="--base-image" (
|
||||
set BASE_IMAGE=%~2
|
||||
shift & shift
|
||||
goto :parse_args
|
||||
)
|
||||
set "ARGS=!ARGS! %~1"
|
||||
shift
|
||||
goto :parse_args
|
||||
|
||||
:done_parsing
|
||||
if "%CONTAINER%"=="" (
|
||||
echo Error: --container is required
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set BASE_IMAGE_ARG=
|
||||
if not "%BASE_IMAGE%"=="" set BASE_IMAGE_ARG=--build-arg "BASE_IMAGE=%BASE_IMAGE%"
|
||||
|
||||
echo Building container image: %CONTAINER%
|
||||
docker buildx build ^
|
||||
--platform "linux/%ARCH%" ^
|
||||
%BASE_IMAGE_ARG% ^
|
||||
--tag "%CONTAINER%" ^
|
||||
--file "%ROOT%\containers\%CONTAINER%.dockerfile" ^
|
||||
"%ROOT%\containers"
|
||||
|
||||
echo Running sanity tests in container
|
||||
docker run ^
|
||||
--rm ^
|
||||
--platform "linux/%ARCH%" ^
|
||||
--volume "%ROOT%:/root" ^
|
||||
"%CONTAINER%" ^
|
||||
%ARGS%
|
||||
Reference in New Issue
Block a user