hs-test: point gdb to vpp source files
Type: test Change-Id: Ie5867737e5d49fd45cc15b690af3493263fb2f6f Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
3b770881b9
commit
109f3ce4eb
@@ -23,6 +23,10 @@ ifeq ($(CPUS),)
|
|||||||
CPUS=1
|
CPUS=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(VPPSRC),)
|
||||||
|
VPPSRC=$(shell pwd)/../..
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(UBUNTU_CODENAME),)
|
ifeq ($(UBUNTU_CODENAME),)
|
||||||
UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
|
UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
|
||||||
endif
|
endif
|
||||||
@@ -55,6 +59,7 @@ help:
|
|||||||
@echo " DEBUG=[true|false] - attach VPP to GDB"
|
@echo " DEBUG=[true|false] - attach VPP to GDB"
|
||||||
@echo " TEST=[test-name] - specific test to run"
|
@echo " TEST=[test-name] - specific test to run"
|
||||||
@echo " CPUS=[n-cpus] - number of cpus to run with vpp"
|
@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
|
||||||
@echo "List of all tests:"
|
@echo "List of all tests:"
|
||||||
$(call list_tests)
|
$(call list_tests)
|
||||||
@@ -72,7 +77,8 @@ build-vpp-debug:
|
|||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: .deps.ok .build.vpp
|
test: .deps.ok .build.vpp
|
||||||
@bash ./test --persist=$(PERSIST) --verbose=$(VERBOSE) \
|
@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:
|
build-go:
|
||||||
go build ./tools/http_server
|
go build ./tools/http_server
|
||||||
|
@@ -129,6 +129,9 @@ func (c *Container) getContainerArguments() string {
|
|||||||
args := "--ulimit nofile=90000:90000 --cap-add=all --privileged --network host --rm"
|
args := "--ulimit nofile=90000:90000 --cap-add=all --privileged --network host --rm"
|
||||||
args += c.getVolumesAsCliOption()
|
args += c.getVolumesAsCliOption()
|
||||||
args += c.getEnvVarsAsCliOption()
|
args += c.getEnvVarsAsCliOption()
|
||||||
|
if *vppSourceFileDir != "" {
|
||||||
|
args += fmt.Sprintf(" -v %s:%s", *vppSourceFileDir, *vppSourceFileDir)
|
||||||
|
}
|
||||||
args += " --name " + c.name + " " + c.image
|
args += " --name " + c.name + " " + c.image
|
||||||
args += " " + c.extraRunningArgs
|
args += " " + c.extraRunningArgs
|
||||||
return args
|
return args
|
||||||
|
@@ -25,6 +25,7 @@ var isVerbose = flag.Bool("verbose", false, "verbose test output")
|
|||||||
var isUnconfiguring = flag.Bool("unconfigure", false, "remove topology")
|
var isUnconfiguring = flag.Bool("unconfigure", false, "remove topology")
|
||||||
var isVppDebug = flag.Bool("debug", false, "attach gdb to vpp")
|
var isVppDebug = flag.Bool("debug", false, "attach gdb to vpp")
|
||||||
var nConfiguredCpus = flag.Int("cpus", 1, "number of CPUs assigned 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 {
|
type HstSuite struct {
|
||||||
suite.Suite
|
suite.Suite
|
||||||
|
@@ -7,6 +7,7 @@ single_test=0
|
|||||||
persist_set=0
|
persist_set=0
|
||||||
unconfigure_set=0
|
unconfigure_set=0
|
||||||
debug_set=0
|
debug_set=0
|
||||||
|
vppsrc=
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
@@ -41,6 +42,9 @@ case "${i}" in
|
|||||||
--cpus=*)
|
--cpus=*)
|
||||||
args="$args -cpus ${i#*=}"
|
args="$args -cpus ${i#*=}"
|
||||||
;;
|
;;
|
||||||
|
--vppsrc=*)
|
||||||
|
args="$args -vppsrc ${i#*=}"
|
||||||
|
;;
|
||||||
--test=*)
|
--test=*)
|
||||||
tc_name="${i#*=}"
|
tc_name="${i#*=}"
|
||||||
if [ $tc_name != "all" ]; then
|
if [ $tc_name != "all" ]; then
|
||||||
|
Reference in New Issue
Block a user