summaryrefslogtreecommitdiffstats
path: root/extras/hs-test
diff options
context:
space:
mode:
authorAdrian Villin <avillin@cisco.com>2024-06-19 06:20:00 -0400
committerFlorin Coras <florin.coras@gmail.com>2024-06-19 16:14:12 +0000
commitb4516bbccf1fb39fbe1e589296d1162e714862e9 (patch)
tree9eb2c585726fc23c3698d8760dab0cdbc5c5545f /extras/hs-test
parent05fbc3569c60c4b2420cb608756cf7ff582bbab2 (diff)
hs-test: fix LDPreloadIperfVppTest
- fixed ldpreload path (debug build) Type: test Change-Id: Ib2ab58b32ffd87a78189464b599f7bbc4f05c175 Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test')
-rw-r--r--extras/hs-test/Makefile2
-rw-r--r--extras/hs-test/hs_test.sh9
-rw-r--r--extras/hs-test/infra/hst_suite.go1
-rw-r--r--extras/hs-test/ldp_test.go7
4 files changed, 16 insertions, 3 deletions
diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile
index c51f70bfde6..596acb1b57d 100644
--- a/extras/hs-test/Makefile
+++ b/extras/hs-test/Makefile
@@ -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
diff --git a/extras/hs-test/hs_test.sh b/extras/hs-test/hs_test.sh
index 28df3e565fe..4914e6055eb 100644
--- a/extras/hs-test/hs_test.sh
+++ b/extras/hs-test/hs_test.sh
@@ -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
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go
index 46aede7b7ef..a6ba14676d0 100644
--- a/extras/hs-test/infra/hst_suite.go
+++ b/extras/hs-test/infra/hst_suite.go
@@ -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 {
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go
index fc195f1572a..53043aabaf2 100644
--- a/extras/hs-test/ldp_test.go
+++ b/extras/hs-test/ldp_test.go
@@ -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)