]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest: relax whitespace matches in search regex
authorRoss Burton <ross.burton@intel.com>
Mon, 15 May 2017 11:11:58 +0000 (12:11 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 May 2017 13:08:15 +0000 (14:08 +0100)
Latest DNF has changed the amount of whitespace it outputs so use matches
instead of hardcoding the exact number of spaces.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/buildoptions.py

index a6e0203f5ab8065d29607ec1b493d7d61c1986ef..ce37ea457c145fa7dbd34cc70f18b56ee08634e6 100644 (file)
@@ -22,12 +22,12 @@ class ImageOptionsTests(oeSelfTest):
         bitbake("core-image-minimal")
         log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
         log_data_created = ftools.read_file(log_data_file)
-        incremental_created = re.search("Installing  : packagegroup-core-ssh-openssh", log_data_created)
+        incremental_created = re.search(r"Installing\s*:\s*packagegroup-core-ssh-openssh", log_data_created)
         self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
         self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
         bitbake("core-image-minimal")
         log_data_removed = ftools.read_file(log_data_file)
-        incremental_removed = re.search("Erasing     : packagegroup-core-ssh-openssh", log_data_removed)
+        incremental_removed = re.search(r"Erasing\s*:\s*packagegroup-core-ssh-openssh", log_data_removed)
         self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
 
     @testcase(286)