From bf62a50ee3c8e0dd9a0ab6f19496fd8a9477c28f Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Thu, 22 May 2025 11:41:40 +0800 Subject: [PATCH 1/3] ci:check llgo test's stderr to exit --- .github/workflows/go.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6d20777f..bce22466 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -35,7 +35,16 @@ jobs: # llgo test ./_xtool/internal/parser/... # got go/bin/parser.test: exit code -1 cd _xtool/internal/parser - llgo test ./... + # check exit code outout for temporary fix + # with the latest update can exit in llgo test + # only with llgo test ./... with llgo update + # https://github.com/goplus/llgo/pull/1128 + output=$(llgo test ./... 2>&1) + echo "$output" + if echo "$output" | grep -q "exit code [^0]"; then + echo "llgo test fail" + exit 1 + fi - name: Test llcppsymg & llcppsigfetch run: | From 91b4538a0df6607f643ff63503b523b149c63509 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Thu, 22 May 2025 11:44:56 +0800 Subject: [PATCH 2/3] chore:check fail expect --- _xtool/internal/parser/parser_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_xtool/internal/parser/parser_test.go b/_xtool/internal/parser/parser_test.go index 709ad465..32884527 100644 --- a/_xtool/internal/parser/parser_test.go +++ b/_xtool/internal/parser/parser_test.go @@ -397,7 +397,7 @@ func TestBuiltinType(t *testing.T) { typ clang.Type expected ast.BuiltinType }{ - {"Void", btType(clang.TypeVoid), ast.BuiltinType{Kind: ast.Void}}, + {"Void", btType(clang.TypeVoid), ast.BuiltinType{Kind: ast.Bool}}, {"Bool", btType(clang.TypeBool), ast.BuiltinType{Kind: ast.Bool}}, {"Char_S", btType(clang.TypeCharS), ast.BuiltinType{Kind: ast.Char, Flags: ast.Signed}}, {"Char_U", btType(clang.TypeCharU), ast.BuiltinType{Kind: ast.Char, Flags: ast.Unsigned}}, From a071b691eadf3be031d26340180fa30453c37361 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Thu, 22 May 2025 11:51:10 +0800 Subject: [PATCH 3/3] chore:rm fail check --- _xtool/internal/parser/parser_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_xtool/internal/parser/parser_test.go b/_xtool/internal/parser/parser_test.go index 32884527..709ad465 100644 --- a/_xtool/internal/parser/parser_test.go +++ b/_xtool/internal/parser/parser_test.go @@ -397,7 +397,7 @@ func TestBuiltinType(t *testing.T) { typ clang.Type expected ast.BuiltinType }{ - {"Void", btType(clang.TypeVoid), ast.BuiltinType{Kind: ast.Bool}}, + {"Void", btType(clang.TypeVoid), ast.BuiltinType{Kind: ast.Void}}, {"Bool", btType(clang.TypeBool), ast.BuiltinType{Kind: ast.Bool}}, {"Char_S", btType(clang.TypeCharS), ast.BuiltinType{Kind: ast.Char, Flags: ast.Signed}}, {"Char_U", btType(clang.TypeCharU), ast.BuiltinType{Kind: ast.Char, Flags: ast.Unsigned}},