aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-17 13:07:12 +0900
committerOphestra <cat@gensokyo.uk>2026-05-17 15:56:53 +0900
commit30eb0d6a613ad268f6805ccbcdcabf158e7f526f (patch)
tree07e55baa52748fd139e183017eeb43f5f64cee59 /internal/rosa/rosa_test.go
parentc2ff9c9fa55ea569a5e70ee90d2eb0b2ee2a0540 (diff)
internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration. Signed-off-by: Ophestra <cat@gensokyo.uk>
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()
}
}