From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 85954760AD for ; Sun, 7 Feb 2016 17:10:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u17HAT4q000450 for ; Sun, 7 Feb 2016 17:10:47 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id P9fSCagXdYDX for ; Sun, 7 Feb 2016 17:10:47 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u17HAi8q000508 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 7 Feb 2016 17:10:45 GMT Message-ID: <1454865043.27087.321.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Sun, 07 Feb 2016 17:10:43 +0000 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: [PATCH] sstatetests: Fix after change to sstate populate_lic SWSPEC X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2016 17:10:48 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9fd214d2e7a931cfb46f40cb76d49aeb07af612e changed SSTATE_SWSPEC, correctly however it did mean that some sstate files now appear where the tests don't expect them. Filter the test results to ignore the correct behaviour. Signed-off-by: Richard Purdie diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py index dd9f44e..643dd38 100644 --- a/meta/lib/oeqa/selftest/sstatetests.py +++ b/meta/lib/oeqa/selftest/sstatetests.py @@ -23,7 +23,16 @@ class SStateTests(SStateBase): bitbake(['-ccleansstate'] + targets) bitbake(targets) - file_tracker = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific) + file_tracker = [] + results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific) + if distro_nonspecific: + for r in results: + if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")): + continue + file_tracker.append(r) + else: + file_tracker = results + if should_pass: self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets))) else: @@ -87,7 +96,13 @@ class SStateTests(SStateBase): bitbake(['-ccleansstate'] + targets) bitbake(targets) - self.assertTrue(self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True) == [], msg="Found distro non-specific sstate for: %s" % ', '.join(map(str, targets))) + results = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True) + filtered_results = [] + for r in results: + if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")): + continue + filtered_results.append(r) + self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results))) file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False) self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))