]> git.ipfire.org Git - pakfire.git/commitdiff
Merge branch 'master' of ssh://git.ipfire.org/pub/git/pakfire
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Aug 2013 23:03:41 +0000 (01:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Aug 2013 23:03:41 +0000 (01:03 +0200)
.gitignore
Makefile.am
src/pakfire/transaction.py
tests/module-load.py [new file with mode: 0644]

index d5234c6c230de79432c7211ff1f82d3bc53614a6..8fce8f6b53a9ea2bc586b4f492453413ff98790d 100644 (file)
@@ -23,6 +23,7 @@
 *.mo
 *.o
 *.stamp
+*.trs
 *~
 .deps
 .dirstamp
index bd2546bb56e11ad6b814db7cfb5a442dd19495f5..7e924fef15c267622e5ba8f5ab3049f36aae4c57 100644 (file)
@@ -370,3 +370,15 @@ src/scripts/%: src/scripts/%.in Makefile
 
 src/systemd/%: src/systemd/%.in Makefile
        $(SED_PROCESS)
+
+# - testsuite ------------------------------------------------------------------
+
+TESTS_ENVIRONMENT = \
+       PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \
+       topdir="$(shell pwd)"
+
+dist_check_SCRIPTS = \
+       tests/module-load.py
+
+TESTS = \
+       $(dist_check_SCRTIPS)
index 4dadd4f8d3bc7d05adac455e5e4a5e8e1bbdc1ef..2cf14f7f9aa661d8c4ddd4a3013b0408b14c7b9d 100644 (file)
@@ -35,7 +35,7 @@ log = logging.getLogger("pakfire")
 
 from constants import *
 from i18n import _
-from pakfire._pakfire import Transaction, sync
+from _pakfire import Transaction, sync
 _Transaction = Transaction
 
 PKG_DUMP_FORMAT = " %-21s %-8s %-21s %-18s %6s "
diff --git a/tests/module-load.py b/tests/module-load.py
new file mode 100644 (file)
index 0000000..de9a258
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import os
+import sys
+
+# Try to load the _pakfire module.
+import pakfire
+
+# Check that we didn't load the system's version.
+topdir = os.environ.get("topdir")
+
+if not pakfire.__file__.startswith(topdir):
+       print "Wrong module loaded..."
+       sys.exit(1)