Executing backend test before build in deb9

I am building grafana from source on debian 9 (stretch). Prior to build, I am executing backend and frontend test cases.
For backend tests, I executed the following:

ls ./pkg/ | xargs -n1 -I% go test %

I am getting following errors for certain tests:
can’t load package: package bus: cannot find package “bus” in any of:
/usr/local/go/src/bus (from $GOROOT)
/opt/build_workspace/src/bus (from $GOPATH)

I am novice to GO language, let me know if I am wrongly executing test cases or missing something else.

The usual command for executing tests is:

go test ./pkg/...

Could be also be a problem with how you have installed go. Does the above command work?

The above command works.
Thanks !

1 Like