move debug test into _testdata

This commit is contained in:
Li Jie
2024-09-14 18:46:44 +08:00
parent 1d6eb07c62
commit 1ed798342a
8 changed files with 254 additions and 909 deletions

View File

@@ -64,17 +64,17 @@ func llgenDir(dir string, pkgPath ...string) {
if !fi.IsDir() || strings.HasPrefix(name, "_") {
continue
}
func() {
testDir := dir + "/" + name
fmt.Fprintln(os.Stderr, "llgen", testDir)
os.Chdir(testDir)
dbg := isDbgSymEnabled("flags.txt")
if dbg {
cl.EnableDebugSymbols()
}
defer cl.DisableDebugSymbols()
llgen.SmartDoFile("in.go", pkgPath...)
}()
testDir := dir + "/" + name
fmt.Fprintln(os.Stderr, "llgen", testDir)
os.Chdir(testDir)
dbg := isDbgSymEnabled("flags.txt")
if dbg {
cl.EnableDebugSymbols()
} else {
cl.DisableDebugSymbols()
}
llgen.SmartDoFile("in.go", pkgPath...)
}
}