forked from rpms/leapp-repository
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 3128ca5df81b4c7591af189c9e2ae02f96c88fb4 Mon Sep 17 00:00:00 2001
|
|
From: Matej Matuska <mmatuska@redhat.com>
|
|
Date: Fri, 17 Oct 2025 09:00:20 +0200
|
|
Subject: [PATCH 24/55] Makefile: Do not copy unnecessary files to test
|
|
containers
|
|
|
|
In addition to tut/, docs/, packaging/, .git/ and all the __pycache__
|
|
directories (and .pyc files) are excluded. This makes for a significant
|
|
speedup in container setup (output with -v added to rsync) as a lot less
|
|
needs to be copied:
|
|
|
|
Without this patch:
|
|
sent 2,405,488 bytes received 19,754 bytes 194,019.36 bytes/sec
|
|
total size is 165,333,162 speedup is 68.17
|
|
|
|
With this patch:
|
|
sent 551,179 bytes received 4,067 bytes 100,953.82 bytes/sec
|
|
total size is 23,280,513 speedup is 41.93
|
|
|
|
Some other small files and directories are still unnecessarily copied,
|
|
but those don't really affect the copied size that much.
|
|
---
|
|
Makefile | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index 754c2c63..1bfbc3ac 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*" /repo/ /repocopy && \
|
|
+ $(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude 'tut/' --exclude 'docs/' --exclude '**/__pycache__/' --exclude 'packaging/' --exclude '.git/' /repo/ /repocopy && \
|
|
export res=0; \
|
|
case $$_VENV in \
|
|
python3.6) \
|
|
--
|
|
2.51.1
|
|
|