1
2
3
4
5 package cryptotest
6
7 import (
8 "crypto/internal/boring"
9 "internal/asan"
10 "internal/msan"
11 "internal/race"
12 "internal/testenv"
13 "runtime"
14 "testing"
15 )
16
17
18
19 func SkipTestAllocations(t *testing.T) {
20
21 if boring.Enabled {
22 t.Skip("skipping allocations test with BoringCrypto")
23 }
24
25
26 if race.Enabled || msan.Enabled || asan.Enabled {
27 t.Skip("skipping allocations test with sanitizers")
28 }
29
30
31 if runtime.GOOS == "plan9" {
32 t.Skip("skipping allocations test on plan9")
33 }
34
35
36
37 if runtime.GOARCH == "s390x" {
38 t.Skip("skipping allocations test on s390x")
39 }
40
41
42 testenv.SkipIfOptimizationOff(t)
43 }
44
View as plain text