blob: d683c4a5012692ff76978fa4732538314fb3dd8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// 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")
}
}
}
|