pactest: fix test errors being treated as success

Rules return -1 if there was an error with the rule itself. Later this
return value is passed to tap as a bool. Because -1 is a truthy value it
gets treated as success.
This commit is contained in:
morganamilo 2021-09-27 21:03:43 +01:00
parent 1340b5336e
commit 8fa9a69683
No known key found for this signature in database
GPG key ID: E48D0A8326DE47C5

View file

@ -322,7 +322,7 @@ class pmtest(object):
self.result["success"] += 1 self.result["success"] += 1
else: else:
self.result["fail"] += 1 self.result["fail"] += 1
tap.ok(success, i) tap.ok(success == 1, i)
def configfile(self): def configfile(self):
return os.path.join(self.root, util.PACCONF) return os.path.join(self.root, util.PACCONF)