Avoid local path in testsuite expected results, oops

Commit 5bd9f5f580 was relying on a local
path on my laptop, obviously failing anywhere else. In most tests
those messages are not an issue but since python tests run outside
the test-root, they expose local paths. For regular cases we could
just tell autotest to [ignore] the result, but this gets lost somewhere
in the ~three layers of quotes and whatnot of passing python foo around,
in order to be able to escape handle [] sanely in python code. Lovely.
So shut redirect rpmlog() to /dev/null instead.
This commit is contained in:
Panu Matilainen 2017-10-11 16:23:35 +03:00
parent 5bd9f5f580
commit 8683adbdbc
1 changed files with 3 additions and 1 deletions

View File

@ -136,6 +136,9 @@ myprint(h['arch'])
RPMPY_TEST([reading a signed package file 1],[
ts = rpm.ts()
# avoid rpmlog spew with absolute path to package
sink = open('/dev/null', 'w')
rpm.setLogFile(sink)
try:
h = ts.hdrFromFdno('${RPMDATA}/RPMS/hello-2.0-1.x86_64-signed.rpm')
myprint(h['arch'])
@ -144,7 +147,6 @@ except rpm.error, e:
],
[public key not available
],
[warning: /home/pmatilai/repos/rpm/tests/data//RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY]
)
RPMPY_TEST([reading a signed package file 2],[