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
@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)
.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
args := "--ulimit nofile=90000:90000 --cap-add=all --privileged --network host --rm"
args += c.getVolumesAsCliOption()
args += c.getEnvVarsAsCliOption()
+ if *vppSourceFileDir != "" {
+ args += fmt.Sprintf(" -v %s:%s", *vppSourceFileDir, *vppSourceFileDir)
+ }
args += " --name " + c.name + " " + c.image
args += " " + c.extraRunningArgs
return args
var isUnconfiguring = flag.Bool("unconfigure", false, "remove topology")
var isVppDebug = flag.Bool("debug", false, "attach gdb to vpp")
var nConfiguredCpus = flag.Int("cpus", 1, "number of CPUs assigned to vpp")
+var vppSourceFileDir = flag.String("vppsrc", "", "vpp source file directory")
type HstSuite struct {
suite.Suite
persist_set=0
unconfigure_set=0
debug_set=0
+vppsrc=
for i in "$@"
do
--cpus=*)
args="$args -cpus ${i#*=}"
;;
+ --vppsrc=*)
+ args="$args -vppsrc ${i#*=}"
+ ;;
--test=*)
tc_name="${i#*=}"
if [ $tc_name != "all" ]; then