From 77caeb1b193404e76beb27a1aa81321e8eb1cf1f Mon Sep 17 00:00:00 2001 From: Maxime Peim Date: Tue, 14 Nov 2023 15:26:41 +0100 Subject: tests: preload api files When sanity test is not done, API files are not loaded until the first test case is run. Hence, it is not possible to use enums, etc. outside of a test class. By preloading API files before running any tests, it prevents its issue. Type: fix Change-Id: I8730150374e6c5f8d6933ec037811372ac2a8da0 Signed-off-by: Maxime Peim --- test/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index 281c7bd8b44..7ea83acfff7 100644 --- a/test/Makefile +++ b/test/Makefile @@ -259,6 +259,12 @@ ifneq ($(findstring $(DECODE_PCAPS),1 y yes),) ARG18=--decode-pcaps endif +ifneq ($(findstring $(API_PRELOAD),1 y yes),) +ARG19=--api-preload +else +ARG19= +endif + EXC_PLUGINS_ARG= ifneq ($(VPP_EXCLUDED_PLUGINS),) # convert the comma-separated list into N invocations of the argument to exclude a plugin @@ -267,7 +273,7 @@ endif -EXTRA_ARGS=$(ARG0) $(ARG1) $(ARG2) $(ARG3) $(ARG4) $(ARG5) $(ARG6) $(ARG7) $(ARG8) $(ARG9) $(ARG10) $(ARG11) $(ARG12) $(ARG13) $(ARG14) $(ARG15) $(ARG16) $(ARG17) $(ARG18) +EXTRA_ARGS=$(ARG0) $(ARG1) $(ARG2) $(ARG3) $(ARG4) $(ARG5) $(ARG6) $(ARG7) $(ARG8) $(ARG9) $(ARG10) $(ARG11) $(ARG12) $(ARG13) $(ARG14) $(ARG15) $(ARG16) $(ARG17) $(ARG18) $(ARG19) RUN_TESTS_ARGS=--failed-dir=$(FAILED_DIR) --verbose=$(V) --jobs=$(TEST_JOBS) --filter=$(TEST) --retries=$(RETRIES) --venv-dir=$(VENV_PATH) --vpp-ws-dir=$(WS_ROOT) --vpp-tag=$(TAG) --rnd-seed=$(RND_SEED) --vpp-worker-count="$(VPP_WORKER_COUNT)" --keep-pcaps $(PLUGIN_PATH_ARGS) $(EXC_PLUGINS_ARG) $(TEST_PLUGIN_PATH_ARGS) $(EXTRA_ARGS) RUN_SCRIPT_ARGS=--python-opts=$(PYTHON_OPTS) -- cgit 1.2.3-korg