mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 13:10:43 +00:00
build - set no-sandbox everywhere (#81096)
This commit is contained in:
parent
c3d611c7ad
commit
afde7913eb
6 changed files with 12 additions and 8 deletions
|
@ -100,7 +100,7 @@ steps:
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --tfs --no-sandbox "Unit Tests"
|
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
||||||
displayName: Run unit tests
|
displayName: Run unit tests
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Name=@@NAME_LONG@@ - URL Handler
|
Name=@@NAME_LONG@@ - URL Handler
|
||||||
Comment=Code Editing. Redefined.
|
Comment=Code Editing. Redefined.
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
Exec=@@EXEC@@ --open-url %U
|
Exec=@@EXEC@@ --no-sandbox --open-url %U
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
Type=Application
|
Type=Application
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Name=@@NAME_LONG@@
|
Name=@@NAME_LONG@@
|
||||||
Comment=Code Editing. Redefined.
|
Comment=Code Editing. Redefined.
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
Exec=@@EXEC@@ --unity-launch %F
|
Exec=@@EXEC@@ --no-sandbox --unity-launch %F
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
|
@ -14,5 +14,5 @@ Keywords=vscode;
|
||||||
|
|
||||||
[Desktop Action new-empty-window]
|
[Desktop Action new-empty-window]
|
||||||
Name=New Empty Window
|
Name=New Empty Window
|
||||||
Exec=@@EXEC@@ --new-window %F
|
Exec=@@EXEC@@ --no-sandbox --new-window %F
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
|
|
|
@ -8,7 +8,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
else
|
else
|
||||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||||
VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
|
VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
|
||||||
LINUX_NO_SANDBOX="--no-sandbox" # workaround Electron 6 issue on Linux when running tests in container
|
LINUX_NO_SANDBOX="--no-sandbox" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
|
@ -34,7 +34,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Integration tests in AMD
|
# Integration tests in AMD
|
||||||
./scripts/test.sh $LINUX_NO_SANDBOX --runGlob **/*.integrationTest.js "$@"
|
./scripts/test.sh --runGlob **/*.integrationTest.js "$@"
|
||||||
|
|
||||||
# Tests in the extension host
|
# Tests in the extension host
|
||||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX $ROOT/extensions/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --skip-getting-started --disable-inspect --user-data-dir=$VSCODEUSERDATADIR
|
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX $ROOT/extensions/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --skip-getting-started --disable-inspect --user-data-dir=$VSCODEUSERDATADIR
|
||||||
|
|
|
@ -34,5 +34,5 @@ else
|
||||||
cd $ROOT ; \
|
cd $ROOT ; \
|
||||||
ELECTRON_ENABLE_LOGGING=1 \
|
ELECTRON_ENABLE_LOGGING=1 \
|
||||||
"$CODE" \
|
"$CODE" \
|
||||||
test/electron/index.js "$@"
|
test/electron/index.js --no-sandbox "$@" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox.
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { whenDeleted, writeFileSync } from 'vs/base/node/pfs';
|
||||||
import { findFreePort, randomPort } from 'vs/base/node/ports';
|
import { findFreePort, randomPort } from 'vs/base/node/ports';
|
||||||
import { resolveTerminalEncoding } from 'vs/base/node/encoding';
|
import { resolveTerminalEncoding } from 'vs/base/node/encoding';
|
||||||
import * as iconv from 'iconv-lite';
|
import * as iconv from 'iconv-lite';
|
||||||
import { isWindows } from 'vs/base/common/platform';
|
import { isWindows, isLinux } from 'vs/base/common/platform';
|
||||||
import { ProfilingSession, Target } from 'v8-inspect-profiler';
|
import { ProfilingSession, Target } from 'v8-inspect-profiler';
|
||||||
import { isString } from 'vs/base/common/types';
|
import { isString } from 'vs/base/common/types';
|
||||||
|
|
||||||
|
@ -360,6 +360,10 @@ export async function main(argv: string[]): Promise<any> {
|
||||||
options['stdio'] = 'ignore';
|
options['stdio'] = 'ignore';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isLinux) {
|
||||||
|
addArg(argv, '--no-sandbox'); // Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox
|
||||||
|
}
|
||||||
|
|
||||||
const child = spawn(process.execPath, argv.slice(2), options);
|
const child = spawn(process.execPath, argv.slice(2), options);
|
||||||
|
|
||||||
if (args.wait && waitMarkerFilePath) {
|
if (args.wait && waitMarkerFilePath) {
|
||||||
|
|
Loading…
Reference in a new issue