mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
fix: add NoSandbox flag to chrome headless that is run during WASM tests, since
this is now required for Ubuntu 23+ and we are using Ubuntu 24+ when running Github Actions. See https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -33,8 +33,16 @@ func runargs(t *testing.T, args ...string) error {
|
||||
}
|
||||
|
||||
func chromectx(t *testing.T) context.Context {
|
||||
// see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
|
||||
opts := append(chromedp.DefaultExecAllocatorOptions[:],
|
||||
chromedp.NoSandbox,
|
||||
)
|
||||
|
||||
allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
||||
t.Cleanup(cancel)
|
||||
|
||||
// looks for locally installed Chrome
|
||||
ctx, ccancel := chromedp.NewContext(context.Background(), chromedp.WithErrorf(t.Errorf), chromedp.WithDebugf(t.Logf), chromedp.WithLogf(t.Logf))
|
||||
ctx, ccancel := chromedp.NewContext(allocCtx, chromedp.WithErrorf(t.Errorf), chromedp.WithDebugf(t.Logf), chromedp.WithLogf(t.Logf))
|
||||
t.Cleanup(ccancel)
|
||||
|
||||
// Wait for browser to be ready.
|
||||
|
||||
Reference in New Issue
Block a user