From 787d04b8233ae1782c66da5b5039f9e185450960 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 15 Sep 2023 10:46:27 +0200 Subject: [PATCH] TT#81700 fix warning errors in jenkins Since we are mounting in read-only mode the code, we are getting warnings from pytest executions not able to generate .pytest_cache directory. Just define CACHE_DIR in a volumen that is mounted as read-write Change-Id: I9949877f4d86873f47778ae9a7cddffb45f3932c --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ad8d6639..0e9d4f1a 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ PERL_SCRIPTS = bin/*.pl SHELL_SCRIPTS = tests/do_test_yaml_format.sh RESULTS ?= reports +CACHE_DIR ?= $(RESULTS)/.pytest_cache # do nothing as default all: @@ -72,19 +73,19 @@ test_check: tests/test_check.py test_detect_network: tests/test_detect_network.py mkdir -p $(RESULTS) - pytest-3 --junitxml=${RESULTS}/$(@).xml $(<) + pytest-3 -o cache_dir=$(CACHE_DIR) --junitxml=${RESULTS}/$(@).xml $(<) test_generate_test_tt2: tests/test_generate_test_tt2.py mkdir -p $(RESULTS) - pytest-3 --junitxml=${RESULTS}/$(@).xml $(<) + pytest-3 -o cache_dir=$(CACHE_DIR) --junitxml=${RESULTS}/$(@).xml $(<) test_generate_test_tt2_sipp: tests/test_generate_test_tt2_sipp.py mkdir -p $(RESULTS) - pytest-3 --junitxml=${RESULTS}/$(@).xml $(<) + pytest-3 -o cache_dir=$(CACHE_DIR) --junitxml=${RESULTS}/$(@).xml $(<) test_generate_test_tt2_cfgt: tests/test_generate_test_tt2_cfgt.py mkdir -p $(RESULTS) - pytest-3 --junitxml=${RESULTS}/$(@).xml $(<) + pytest-3 -o cache_dir=$(CACHE_DIR) --junitxml=${RESULTS}/$(@).xml $(<) # run this in parallel!! -j is your friend test: $(TESTS) test_check test_detect_network test_generate_test_tt2 test_generate_test_tt2_sipp test_generate_test_tt2_cfgt