aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTobias Deiminger <tdmg@linutronix.de>2024-01-08 22:11:00 +0100
committerTom Rini <trini@konsulko.com>2024-01-18 20:23:37 -0500
commit2d30b293c8e105279fdab0a83029483dbd49b42e (patch)
tree8e0d97ba8a405a6c97bc61764fcfe7d81b14b81f /test
parent3c3270b5696aa4c4bbd6e837730e5e14b801a1b6 (diff)
downloadu-boot-2d30b293c8e105279fdab0a83029483dbd49b42e.zip
u-boot-2d30b293c8e105279fdab0a83029483dbd49b42e.tar.gz
u-boot-2d30b293c8e105279fdab0a83029483dbd49b42e.tar.bz2
test: Skip cleanup test if not built out of tree
With commit 42c0e5bb054d ("test: Find leftovers after clean/mrproper") we assume that we are performing out of tree builds. test_clean and test_mrproper fail if the assumption isn't met. However there are valid scenarios where tests run with in source builds (i.e., test.py --build-dir=.). Automatically skip cleanup tests in such scenarios to prevent false positives. Signed-off-by: Tobias Deiminger <tdmg@linutronix.de> Reviewed-by: Harald Seiler <u-boot@rahix.de>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_cleanup_build.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/py/tests/test_cleanup_build.py b/test/py/tests/test_cleanup_build.py
index 5206ff7..aca90cb 100644
--- a/test/py/tests/test_cleanup_build.py
+++ b/test/py/tests/test_cleanup_build.py
@@ -17,6 +17,11 @@ import pytest
@pytest.fixture
def tmp_copy_of_builddir(u_boot_config, tmp_path):
"""For each test, provide a temporary copy of the initial build directory."""
+ if os.path.realpath(u_boot_config.source_dir) == os.path.realpath(
+ u_boot_config.build_dir
+ ):
+ pytest.skip("Leftover detection requires out of tree build.")
+ return None
shutil.copytree(
u_boot_config.build_dir,
tmp_path,