add test target in main makefile
This commit is contained in:
@@ -42,10 +42,10 @@ $(TOOLS): $(TOOL_SRC)
|
||||
$(CXX) $(CXXFLAGS) $< $(LIB) $(LD_FLAGS) -o $@
|
||||
|
||||
build-test: $(LIB)
|
||||
$(CXX) -o test $(CXXFLAGS) test.cpp $(LIB) $(LD_FLAGS)
|
||||
$(CXX) -o $(REPO)/test $(CXXFLAGS) test.cpp $(LIB) $(LD_FLAGS)
|
||||
|
||||
test: build-test
|
||||
./test
|
||||
$(REPO)/test
|
||||
|
||||
%.o: src/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@
|
||||
|
@@ -5,7 +5,10 @@ all: clean build
|
||||
build: nntpchand
|
||||
|
||||
nntpchand:
|
||||
GOPATH=$(REPO) go build -v
|
||||
GOROOT=$(GOROOT) GOPATH=$(REPO) go build -v
|
||||
|
||||
test:
|
||||
GOROOT=$(GOROOT) GOPATH=$(REPO) go test ./...
|
||||
|
||||
clean:
|
||||
GOPATH=$(REPO) go clean -v
|
||||
|
@@ -4,10 +4,10 @@ package main
|
||||
|
||||
import (
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/majestrate/srndv2/lib/config"
|
||||
"github.com/majestrate/srndv2/lib/nntp"
|
||||
"github.com/majestrate/srndv2/lib/store"
|
||||
"net"
|
||||
"nntpchan/lib/config"
|
||||
"nntpchan/lib/nntp"
|
||||
"nntpchan/lib/store"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@@ -17,4 +17,4 @@ clean:
|
||||
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) clean -v
|
||||
|
||||
test:
|
||||
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) test -v srnd
|
||||
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) test srnd
|
||||
|
Reference in New Issue
Block a user