@@ -49,7 +49,10 @@ export async function setupVSCodeTestInstance(): Promise<string> {
49
49
50
50
export async function invokeVSCodeCli ( vsCodeExecutablePath : string , args : string [ ] ) : Promise < string > {
51
51
const [ cli , ...cliArgs ] = resolveCliArgsFromVSCodeExecutablePath ( vsCodeExecutablePath )
52
- const cmdArgs = [ ...cliArgs , ...args ]
52
+ // Disable sandbox to avoid: "Running as root without --no-sandbox is not supported".
53
+ // https://github.com/aws/aws-toolkit-vscode/issues/3550
54
+ // https://crbug.com/638180
55
+ const cmdArgs = [ '--no-sandbox' , ...cliArgs , ...args ]
53
56
54
57
// Workaround: set --user-data-dir to avoid this error in CI:
55
58
// "You are trying to start Visual Studio Code as a super user …"
@@ -130,6 +133,11 @@ async function setupVSCode(): Promise<string> {
130
133
}
131
134
132
135
export async function runToolkitTests ( suiteName : string , relativeEntryPoint : string ) {
136
+ // Disable sandbox to avoid: "Running as root without --no-sandbox is not supported".
137
+ // https://github.com/aws/aws-toolkit-vscode/issues/3550
138
+ // https://crbug.com/638180
139
+ const noSandboxArgs = [ '--no-sandbox' , '--disable-gpu-sandbox' ]
140
+
133
141
try {
134
142
console . log ( `Running ${ suiteName } test suite...` )
135
143
const vsCodeExecutablePath = await setupVSCode ( )
@@ -154,7 +162,7 @@ export async function runToolkitTests(suiteName: string, relativeEntryPoint: str
154
162
vscodeExecutablePath : vsCodeExecutablePath ,
155
163
extensionDevelopmentPath : cwd ,
156
164
extensionTestsPath : testEntrypoint ,
157
- launchArgs : [ ...disableExtensions , workspacePath , disableWorkspaceTrust ] ,
165
+ launchArgs : [ ...noSandboxArgs , ... disableExtensions , workspacePath , disableWorkspaceTrust ] ,
158
166
extensionTestsEnv : {
159
167
[ 'DEVELOPMENT_PATH' ] : cwd ,
160
168
[ 'AWS_TOOLKIT_AUTOMATION' ] : suiteName ,
0 commit comments