[osinfo-db PATCH v2 6/7] makefile: Fix out-of-tree build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let's set an ABS_TOPDIR and use it to run our tests, fixing then
the out-of-tree build.

https://gitlab.com/libosinfo/osinfo-db/issues/25
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4f6f8d4..ee4ff46 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,8 @@ INTLTOOL_MERGE_OPTS = $(INTLTOOL_MERGE_OPTS_$(V))
 INTLTOOL_MERGE_OPTS_0 = -q
 INTLTOOL_MERGE_OPTS_1 =
 
+ABS_TOPDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+
 all: $(ARCHIVE) osinfo-db.spec mingw-osinfo-db.spec
 
 install: $(ARCHIVE)
@@ -121,4 +123,4 @@ update-po:
         done
 
 check: $(DATA_FILES) $(SCHEMA_FILES)
-	$(PYTHON) -m pytest
+	INTERNAL_OSINFO_DB_DATA_DIR=data INTERNAL_OSINFO_DB_DATA_SRC_DIR=$(ABS_TOPDIR)data $(PYTHON) -m pytest $(ABS_TOPDIR)tests
-- 
2.21.0

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux