hs-test: point gdb to vpp source files
[vpp.git] / extras / hs-test / Makefile
index 7a5fb13..f0ec755 100644 (file)
@@ -23,6 +23,10 @@ ifeq ($(CPUS),)
 CPUS=1
 endif
 
+ifeq ($(VPPSRC),)
+VPPSRC=$(shell pwd)/../..
+endif
+
 ifeq ($(UBUNTU_CODENAME),)
 UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
 endif
@@ -55,6 +59,7 @@ help:
        @echo " DEBUG=[true|false]       - attach VPP to GDB"
        @echo " TEST=[test-name]         - specific test to run"
        @echo " CPUS=[n-cpus]            - number of cpus to run with vpp"
+       @echo " VPPSRC=[path-to-vpp-src] - path to vpp source files (for gdb)"
        @echo
        @echo "List of all tests:"
        $(call list_tests)
@@ -72,7 +77,8 @@ build-vpp-debug:
 .PHONY: test
 test: .deps.ok .build.vpp
        @bash ./test --persist=$(PERSIST) --verbose=$(VERBOSE) \
-               --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS)
+               --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
+               --vppsrc=$(VPPSRC)
 
 build-go:
        go build ./tools/http_server