audit2allow: tests should use local copy not system

The tests currently just executed "audit2allow" which meant search in
$PATH. They should instead test the one in the pwd. The files in the
repo are not executable so prefix with "python" also.

Signed-off-by: Jason Zaman <jason@perfinion.com>
This commit is contained in:
Jason Zaman 2016-08-19 11:45:17 +08:00 committed by Stephen Smalley
parent 0a150ca94d
commit b5002d54d7

View file

@ -33,7 +33,7 @@ class Audit2allowTests(unittest.TestCase):
def test_audit2allow(self):
"Verify audit2allow works"
p = Popen(['audit2allow', "-i", "test.log"], stdout=PIPE)
p = Popen(['python', './audit2allow', "-i", "test.log"], stdout=PIPE)
out, err = p.communicate()
if err:
print(out, err)
@ -41,7 +41,7 @@ class Audit2allowTests(unittest.TestCase):
def test_audit2why(self):
"Verify audit2why works"
p = Popen(['audit2why', "-i", "test.log"], stdout=PIPE)
p = Popen(['python', './audit2why', "-i", "test.log"], stdout=PIPE)
out, err = p.communicate()
if err:
print(out, err)