mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <randy.reddig@fastly.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user