Skip to content

Commit 6dfc8f6

Browse files
committed
test: regenerate mock data for each platform
1 parent c321ead commit 6dfc8f6

18 files changed

Lines changed: 6 additions & 3 deletions

File tree

_xtool/llcppsymg/internal/symg/symg.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func GetCommonSymbols(syms []*nm.Symbol, headerSymbols map[string]*SymbolInfo) [
161161
if _, ok := processedSymbols[symName]; ok {
162162
continue
163163
}
164-
165164
if symInfo, ok := headerSymbols[symName]; ok {
166165
symbolInfo := &llcppg.SymbolInfo{
167166
Mangle: symName,

_xtool/llcppsymg/internal/symg/symg_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,19 @@ func TestGen(t *testing.T) {
448448
t.Fatal(err)
449449
}
450450
libName := filepath.Base(projPath)
451+
libDir := filepath.Join(projPath, runtime.GOOS)
451452

452-
cfg.Libs = fmt.Sprintf("-L%s -l%s", projPath, libName)
453+
cfg.Libs = fmt.Sprintf("-L%s -l%s", libDir, libName)
453454
cfg.CFlags = "-I" + projPath
454455

455456
gen := false
456457

457458
if gen {
458459
cFiles, hasCpp := scanCFiles(projPath)
459-
staticLibFile := filepath.Join(projPath, "lib"+filepath.Base(projPath)+".a")
460+
461+
// make sure we have this dir
462+
os.MkdirAll(libDir, 0700)
463+
staticLibFile := filepath.Join(libDir, "lib"+filepath.Base(projPath)+".a")
460464

461465
compileCommand := []string{cfg.CFlags, "-o", staticLibFile, "-c"}
462466
if !hasCpp {
1.63 KB
Binary file not shown.
2.35 KB
Binary file not shown.
720 Bytes
Binary file not shown.
1.29 KB
Binary file not shown.
1.38 KB
Binary file not shown.
1.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)