Lines Matching refs:dir
100 setupDir(t, func(config *Config, dir string, loadPkg loadPkgFunc) {
102 out := filepath.Join(dir, "out", "test")
106 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
125 modify func(config *Config, dir string, loadPkg loadPkgFunc),
130 setupDir(t, func(config *Config, dir string, loadPkg loadPkgFunc) {
132 out := filepath.Join(dir, "out", "test")
136 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
158 modify(config, dir, loadPkg)
162 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
211 …testBuildAgain(t, false, false, func(config *Config, dir string, loadPkg loadPkgFunc) {}, func(pkg…
218 testBuildAgain(t, false, false, func(config *Config, dir string, loadPkg loadPkgFunc) {
223 os.Chtimes(filepath.Join(dir, "test.fact"), newTime, newTime)
224 os.Chtimes(filepath.Join(dir, "main/main.go"), newTime, newTime)
225 os.Chtimes(filepath.Join(dir, "a/a.go"), newTime, newTime)
226 os.Chtimes(filepath.Join(dir, "a/b.go"), newTime, newTime)
227 os.Chtimes(filepath.Join(dir, "b/a.go"), newTime, newTime)
234 testBuildAgain(t, true, true, func(config *Config, dir string, loadPkg loadPkgFunc) {
235 …if err := ioutil.WriteFile(filepath.Join(dir, "a", "a.go"), []byte(go_a_a+"\n"), 0666); err != nil…
251 testBuildAgain(t, true, true, func(config *Config, dir string, loadPkg loadPkgFunc) {
252 …if err := ioutil.WriteFile(filepath.Join(dir, "main", "main.go"), []byte(go_main_main+"\n"), 0666)…
268 testBuildAgain(t, false, true, func(config *Config, dir string, loadPkg loadPkgFunc) {
269 if err := os.Remove(filepath.Join(dir, "out", "test")); err != nil {
278 testBuildAgain(t, false, true, func(config *Config, dir string, loadPkg loadPkgFunc) {
279 …if err := ioutil.WriteFile(filepath.Join(dir, "main", "main.go"), []byte(go_main_main+"\n"), 0666)…
285 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
298 setupDir(b, func(config *Config, dir string, loadPkg loadPkgFunc) {
300 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
304 if err := pkg.Link(config, filepath.Join(dir, "out", "test")); err != nil {
314 setupDir(b, func(config *Config, dir string, loadPkg loadPkgFunc) {
317 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
321 if err := pkg.Link(config, filepath.Join(dir, "out", "test")); err != nil {
330 if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
334 if err := pkg.Link(config, filepath.Join(dir, "out", "test")); err != nil {
384 func setupDir(t T, test func(config *Config, dir string, loadPkg loadPkgFunc)) {
385 dir, err := ioutil.TempDir("", "test")
389 defer os.RemoveAll(dir)
392 if err := ioutil.WriteFile(filepath.Join(dir, name), []byte(contents), 0666); err != nil {
397 if err := os.Mkdir(filepath.Join(dir, name), 0777); err != nil {
410 config.Map("android/soong", dir)
416 if err := pkg.FindDeps(config, filepath.Join(dir, "main")); err != nil {
422 test(config, dir, loadPkg)