aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2024-07-02 07:02:03 -0700
committerGitHub <[email protected]>2024-07-02 07:02:03 -0700
commit9cb263479c4b98f2d28889ca1acc297454e0d875 (patch)
treea30bcf8ef9086c5b8edfcee3b42bef352f396878 /main_test.go
parentf18c6e342f834988caf43fd652b2baae9c3093f0 (diff)
downloadtinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.tar.gz
tinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.zip
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <[email protected]>
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
index 1ea16cd14..a4ec3c810 100644
--- a/main_test.go
+++ b/main_test.go
@@ -181,6 +181,10 @@ func TestBuild(t *testing.T) {
t.Parallel()
runPlatTests(optionsFromTarget("wasip1", sema), tests, t)
})
+ t.Run("WASIp2", func(t *testing.T) {
+ t.Parallel()
+ runPlatTests(optionsFromTarget("wasip2", sema), tests, t)
+ })
}
}
@@ -235,6 +239,14 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) {
default:
}
}
+ if options.Target == "wasip2" {
+ switch name {
+ case "cgo/":
+ // waisp2 use our own libc; cgo tests fail
+ continue
+ }
+ }
+
name := name // redefine to avoid race condition
t.Run(name, func(t *testing.T) {
t.Parallel()