aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/rosa_test.go')
-rw-r--r--internal/rosa/rosa_test.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/internal/rosa/rosa_test.go b/internal/rosa/rosa_test.go
index 0eef8334..f9dcb1a2 100644
--- a/internal/rosa/rosa_test.go
+++ b/internal/rosa/rosa_test.go
@@ -28,7 +28,7 @@ var (
)
func TestMain(m *testing.M) {
- rosa.DropCaches("", rosa.OptLLVMNoLTO)
+ rosa.Native().DropCaches("", rosa.OptLLVMNoLTO)
container.TryArgv0(nil)
code := m.Run()
@@ -77,10 +77,9 @@ func TestCureAll(t *testing.T) {
cache := getCache(t)
t.Parallel()
- for i := range rosa.PresetEnd {
- p := rosa.PArtifact(i)
- meta := rosa.GetMetadata(p)
- a := rosa.Std.Load(p)
+ for _, p := range rosa.Native().Collect() {
+ a, _ := rosa.Native().Load(rosa.Std, p)
+ meta := rosa.Native().MustGet(p)
t.Run(meta.Name, func(t *testing.T) {
t.Parallel()
@@ -94,14 +93,13 @@ func TestCureAll(t *testing.T) {
}
func BenchmarkStage3(b *testing.B) {
- arch, flags := rosa.Arch(), rosa.Flags()
- b.Cleanup(func() { rosa.DropCaches(arch, flags) })
+ s := rosa.Native().Clone()
for b.Loop() {
- rosa.Std.Load(rosa.LLVM)
+ s.Load(rosa.Std, rosa.LLVM)
b.StopTimer()
- rosa.DropCaches("", 0)
+ s.DropCaches("", 0)
b.StartTimer()
}
}