Adjust rpmdb path in python tests
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 1 Apr 2011 14:44:35 +0000 (17:44 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 1 Apr 2011 14:44:35 +0000 (17:44 +0300)
- We can't run python easily in the chroot so override the dbpath
  to our test area instead of potentially accessing the system db
  for keyring etc

tests/local.at

index b299a77..b90855b 100644 (file)
@@ -11,6 +11,8 @@ rm -rf "${abs_builddir}"/testing`run rpm --eval '%_dbpath'`/*
 m4_define([RPMPY_RUN],[
 cat << EOF > test.py
 import rpm, sys
+dbpath=rpm.expandMacro('%_dbpath')
+rpm.addMacro('_dbpath', '${abs_builddir}/testing%s' % dbpath)
 def myprint(msg = ''):
     sys.stdout.write('%s\n' % msg)
 $1