4
.github/workflows/go.yml
vendored
4
.github/workflows/go.yml
vendored
@@ -44,11 +44,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: ${{!startsWith(matrix.os, 'macos')}}
|
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||||
run: go test -v ./...
|
run: go test ./...
|
||||||
|
|
||||||
- name: Test with coverage
|
- name: Test with coverage
|
||||||
if: startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'macos')
|
||||||
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
run: go test -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
|
|||||||
@@ -17,9 +17,6 @@
|
|||||||
package cl_test
|
package cl_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/goplus/llgo/compiler/cl"
|
"github.com/goplus/llgo/compiler/cl"
|
||||||
@@ -27,13 +24,6 @@ import (
|
|||||||
"github.com/goplus/llgo/compiler/internal/build"
|
"github.com/goplus/llgo/compiler/internal/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
devNull, _ := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
|
|
||||||
os.Stderr = devNull
|
|
||||||
os.Stdout = devNull
|
|
||||||
log.SetOutput(io.Discard)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testCompile(t *testing.T, src, expected string) {
|
func testCompile(t *testing.T, src, expected string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
cltest.TestCompileEx(t, src, "foo.go", expected, false)
|
cltest.TestCompileEx(t, src, "foo.go", expected, false)
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ package ssa_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"go/types"
|
"go/types"
|
||||||
"io"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/goplus/llgo/compiler/cl/cltest"
|
"github.com/goplus/llgo/compiler/cl/cltest"
|
||||||
@@ -29,10 +26,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
devNull, _ := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
|
|
||||||
os.Stderr = devNull
|
|
||||||
os.Stdout = devNull
|
|
||||||
log.SetOutput(io.Discard)
|
|
||||||
ssa.SetDebug(ssa.DbgFlagAll)
|
ssa.SetDebug(ssa.DbgFlagAll)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user