leapp-repository/SOURCES/0029-Makefile-Do-copy-commands-dir-in-containerized-tests.patch
2025-12-01 09:14:24 +00:00

37 lines
1.8 KiB
Diff

From bf1b5f5f537ff163470b29d8bb7ba452901368eb Mon Sep 17 00:00:00 2001
From: Matej Matuska <mmatuska@redhat.com>
Date: Wed, 22 Oct 2025 17:52:52 +0200
Subject: [PATCH 29/55] Makefile: Do copy commands/ dir in containerized tests
In 7d9ae2c0 the commands dir copying was changed to copy the dir to
tut/lib/$$_VENV/site-packages/leapp/cli/commands/ instead of the normal
location in the container.
This fixed the problem that modifications on the host were not reflected
in the testing containers. However a new problem was introduced -
modifications to tests in the commands directory are not getting
reflected in the testing containers.
This patch fixes that by copying the entire commands directory both to
the normal location and the virtual env (path above).
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 9774a475..64115006 100644
--- a/Makefile
+++ b/Makefile
@@ -447,7 +447,7 @@ test_container:
export _CONT_NAME="leapp-repo-tests-$(_TEST_CONTAINER)-cont"; \
$(_CONTAINER_TOOL) ps -q -f name=$$_CONT_NAME && { $(_CONTAINER_TOOL) kill $$_CONT_NAME; $(_CONTAINER_TOOL) rm $$_CONT_NAME; }; \
$(_CONTAINER_TOOL) run -di --name $$_CONT_NAME -v "$$PWD":/repo:Z -e PYTHON_VENV=$$_VENV $$TEST_IMAGE && \
- $(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude 'tut/' --exclude 'docs/' --exclude '**/__pycache__/' --exclude 'packaging/' --exclude '.git/' --exclude 'commands/' /repo/ /repocopy && \
+ $(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude 'tut/' --exclude 'docs/' --exclude '**/__pycache__/' --exclude 'packaging/' --exclude '.git/' /repo/ /repocopy && \
$(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude '**/__pycache__/' /repo/commands/ /repocopy/tut/lib/$$_VENV/site-packages/leapp/cli/commands/ && \
export res=0; \
case $$_VENV in \
--
2.51.1