selftest/prservice.py: Sanitize package version when looking for stamp
Currently when using a git version the check for the stamp, using regex, will fail because of plus sign in the version. With this change the version is escaped before adding it to the regex. (From OE-Core rev: 1aefa6a4dec84a5581aab70451bb84801b3b3615) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
cbd87f3198
commit
dce7290a4f
|
@ -27,7 +27,7 @@ class BitbakePrTests(oeSelfTest):
|
|||
package_stamps_path = "/".join(stampdata[:-1])
|
||||
stamps = []
|
||||
for stamp in os.listdir(package_stamps_path):
|
||||
find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (prefix, recipe_task), stamp)
|
||||
find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
|
||||
if find_stamp:
|
||||
stamps.append(find_stamp.group(1))
|
||||
self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name))
|
||||
|
|
Loading…
Reference in New Issue