build: make llgen, cltest, gentests call build.Do

This commit is contained in:
Li Jie
2024-11-26 11:20:15 +08:00
parent 25bc84817a
commit d879d0d924
11 changed files with 87 additions and 172 deletions

View File

@@ -30,34 +30,37 @@ func testCompile(t *testing.T, src, expected string) {
}
func TestFromTestgo(t *testing.T) {
cltest.FromDir(t, "", "./_testgo", false)
cltest.FromDir(t, "", "./_testgo")
}
func TestFromTestpy(t *testing.T) {
cltest.FromDir(t, "", "./_testpy", false)
cltest.FromDir(t, "", "./_testpy")
}
func TestFromTestlibgo(t *testing.T) {
cltest.FromDir(t, "", "./_testlibgo", true)
cltest.FromDir(t, "", "./_testlibgo")
}
func TestFromTestlibc(t *testing.T) {
cltest.FromDir(t, "", "./_testlibc", true)
cltest.FromDir(t, "", "./_testlibc")
}
func TestFromTestrt(t *testing.T) {
cl.SetDebug(cl.DbgFlagAll)
cltest.FromDir(t, "", "./_testrt", true)
cltest.FromDir(t, "", "./_testrt")
cl.SetDebug(0)
}
func TestFromTestdata(t *testing.T) {
cltest.FromDir(t, "", "./_testdata", false)
cltest.FromDir(t, "", "./_testdata")
}
func TestGoPkgMath(t *testing.T) {
conf := build.NewDefaultConf(build.ModeInstall)
build.Do([]string{"math"}, conf)
_, err := build.Do([]string{"math"}, conf)
if err != nil {
t.Fatal(err)
}
}
func TestVar(t *testing.T) {