dawn.node: Make run-cts disable disallow_unsafe_apis

Bug: dawn:1123
Change-Id: I2696dedf8249f5cfd8fe0138b7ee43e567a4ddf5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85504
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2022-04-01 17:14:56 +00:00 committed by Dawn LUCI CQ
parent 75cc17f2d1
commit 359b82da43
1 changed files with 13 additions and 0 deletions

View File

@ -199,11 +199,24 @@ func run() error {
}
}
// Forward the backend to use, if specified.
if backend != "default" {
fmt.Println("Forcing backend to", backend)
flags = append(flags, fmt.Sprint("dawn-backend=", backend))
}
// While running the CTS, always allow unsafe APIs so they can be tested.
disableDawnFeaturesFound := false
for i, flag := range flags {
if strings.HasPrefix(flag, "disable-dawn-features=") {
flags[i] = flag + ",disallow_unsafe_apis"
disableDawnFeaturesFound = true
}
}
if !disableDawnFeaturesFound {
flags = append(flags, "disable-dawn-features=disallow_unsafe_apis")
}
r := runner{
numRunners: numRunners,
verbose: verbose,