dcavalca / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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