without it, the tests try to open $PWD/github.com/xddxdd/bird-lg-go/frontend/test_data/etc diff --git a/frontend/bgpmap_test.go b/frontend/bgpmap_test.go index 3450410..b830f26 100644 --- a/frontend/bgpmap_test.go +++ b/frontend/bgpmap_test.go @@ -3,15 +3,12 @@ package main import ( "io/ioutil" "path" - "runtime" "strings" "testing" ) func readDataFile(t *testing.T, filename string) string { - _, sourceName, _, _ := runtime.Caller(0) - projectRoot := path.Join(path.Dir(sourceName), "..") - dir := path.Join(projectRoot, filename) + dir := path.Join("..", filename) data, err := ioutil.ReadFile(dir) if err != nil {