hs-test: fix LDPreloadIperfVppTest

- fixed ldpreload path (debug build)

Type: test

Change-Id: Ib2ab58b32ffd87a78189464b599f7bbc4f05c175
Signed-off-by: Adrian Villin <avillin@cisco.com>
This commit is contained in:
Adrian Villin
2024-06-19 06:20:00 -04:00
committed by Florin Coras
parent 05fbc3569c
commit b4516bbccf
4 changed files with 16 additions and 3 deletions

View File

@@ -126,7 +126,7 @@ test-debug: .deps.ok .build_debug.ok
@# necessary so gmake won't skip executing the bash script
@-bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \
--unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
--vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT)
--vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --debug_build=true
@bash ./script/compress.sh
.PHONY: test-cov

View File

@@ -7,6 +7,7 @@ single_test=0
persist_set=0
unconfigure_set=0
debug_set=0
debug_build=
ginkgo_args=
for i in "$@"
@@ -26,6 +27,12 @@ case "${i}" in
debug_set=1
fi
;;
--debug_build=*)
debug_build="${i#*=}"
if [ "$debug_build" = "true" ]; then
args="$args -debug_build"
fi
;;
--verbose=*)
verbose="${i#*=}"
if [ "$verbose" = "true" ]; then
@@ -80,7 +87,7 @@ if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
fi
if [ $single_test -eq 0 ] && [ $debug_set -eq 1 ]; then
echo "VPP debug flag is not supperted while running all tests!"
echo "VPP debug flag is not supported while running all tests!"
exit 1
fi

View File

@@ -32,6 +32,7 @@ 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")
var IsDebugBuild = flag.Bool("debug_build", false, "some paths are different with debug build")
var SuiteTimeout time.Duration
type HstSuite struct {

View File

@@ -14,6 +14,7 @@ func init() {
func LDPreloadIperfVppTest(s *VethsSuite) {
var clnVclConf, srvVclConf Stanza
var ldpreload string
serverContainer := s.GetContainerByName("server-vpp")
serverVclFileName := serverContainer.GetHostWorkDir() + "/vcl_srv.conf"
@@ -21,7 +22,11 @@ func LDPreloadIperfVppTest(s *VethsSuite) {
clientContainer := s.GetContainerByName("client-vpp")
clientVclFileName := clientContainer.GetHostWorkDir() + "/vcl_cln.conf"
ldpreload := "LD_PRELOAD=../../build-root/build-vpp-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
if *IsDebugBuild {
ldpreload = "LD_PRELOAD=../../build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
} else {
ldpreload = "LD_PRELOAD=../../build-root/build-vpp-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
}
stopServerCh := make(chan struct{}, 1)
srvCh := make(chan error, 1)