dcavalca / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0001-Set-top-level-directory-for-unittest.patch

52b19a
From 423c987b6b14ec0a6277181ac7c038b50033296d Mon Sep 17 00:00:00 2001
0d2313
From: Pavla Kratochvilova <pkratoch@redhat.com>
0d2313
Date: Wed, 19 May 2021 12:58:30 +0200
0d2313
Subject: [PATCH] Set top-level directory for unittest
0d2313
0d2313
In some build environments, the top-level directory is not added to
0d2313
the sys.path and the tests fail. This fixes the issue.
0d2313
---
0d2313
 tests/CMakeLists.txt | 2 +-
0d2313
 1 file changed, 1 insertion(+), 1 deletion(-)
0d2313
0d2313
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
52b19a
index b15cc62b..dedc46fd 100644
0d2313
--- a/tests/CMakeLists.txt
0d2313
+++ b/tests/CMakeLists.txt
0d2313
@@ -1,6 +1,6 @@
0d2313
 ADD_TEST(
0d2313
     NAME test
0d2313
-    COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s tests
0d2313
+    COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s tests -t ${PROJECT_SOURCE_DIR}
0d2313
     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
0d2313
 
0d2313
 # For libdnf built with sanitizers, has no effect otherwise.
52b19a
-- 
52b19a
2.35.1
0d2313