google / kati

An experimental GNU make clone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"make test" fails on clean build

stefanb2 opened this issue · comments

Test case:

$ make clean
...
$ git clean -xfd
...

# GOPATH is required on my system to access glog package
$ GOPATH=/usr/share/gocode make test
g++ -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o affinity.o affinity.cc
g++ -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o command.o command.cc
...
GOPATH=$(pwd)/out:${GOPATH} go test *.go
ok      command-line-arguments  0.011s
ruby runtest.rb
abspath.mk: FAIL
...
multi_explicit_output_patterns.mk: FAIL
--- out.make    2016-04-27 10:31:55.930860676 +0300
+++ out.kati    2016-04-27 10:31:55.930860676 +0300
@@ -1,10 +1,5 @@
 === test ===
-echo azz
-azz
-echo zza
-zza
-echo zzz
-zzz
+sh: ../../kati: No such file or directory

 === FILES ===

multi_explicit_output_patterns_double_colon.mk: FAIL (expected)
multi_implicit_output_patterns.mk has a string "FAIL" in its expectation
Makefile:21: recipe for target 'test' failed
make: *** [test] Error 1

I have to work-around this with

$ make clean
...
$ git clean -xfd
...
$ make kati
...
$ GOPATH=/usr/share/gocode make test
...

BTW: simply adding the missing target won't work if you have to use GOPATH, because

$ GOPATH=/usr/share/gocode make kati test 2>&1 | tee build.log
rm -rf out/src out/pkg
mkdir -p out/src/github.com/google/kati
cp -a .... cmd out/src/github.com/google/kati
GOPATH=$(pwd)/out:${GOPATH} go get github.com/google/kati/cmd/kati
go install github.com/golang/glog: mkdir /usr/share/gocode/pkg: permission denied
Makefile.kati:29: recipe for target 'go_src_stamp' failed
make: *** [go_src_stamp] Error 1

I have no idea why Go wants to install kati in my system directory.

Go version is actively maintained. I've just pushed a mitigation. Hopefully this works for you? a8fafa4

Yes, if I fix $PATH so that "ninja" and GNU Make 3.81 "make" are found.

But I still get 3 test failures, but that would be another issue...