// Copyright 2024 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. package manager import ( "testing" ) func TestRequires(t *testing.T) { { requires := parseRequires([]byte("# requires: manual arch=amd64")) if !checkArch(requires, "amd64") { t.Fatalf("amd64 does not pass check") } if checkArch(requires, "riscv64") { t.Fatalf("riscv64 passes check") } } { requires := parseRequires([]byte("# requires: -arch=arm64 manual -arch=riscv64")) if !checkArch(requires, "amd64") { t.Fatalf("amd64 does not pass check") } if checkArch(requires, "riscv64") { t.Fatalf("riscv64 passes check") } } }