Skip to contentSkip to conversation

context: allow test execution with buildhistory unless version-going-backwards is present

PATCH In review [email protected] 2 participants 4 messages Jun 8, 2017 – Jun 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 context: allow test execution with buildhistory unless version-going-backwards is present

From: Leonardo Sandoval <[email protected]>

Users constantly running oe-selftest find annoying to disable buildhistory before running 'oe-selftest' then enabling after it. To lessen the buildhistory restriction, allow buildhistory unless 'version-going-backwards' is present on ERROR_QA bitbake variable.

[YOCTO #11580]

---
 meta/lib/oeqa/selftest/context.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +2 -1
index ca73070c0b..f061b987b0 100644
@@ -150,7 +150,8 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
         _check_required_env_variables(["BUILDDIR"])
         _check_presence_meta_selftest()
 
-        if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"]:
+        # buildhistory introduce QA 'version-going-backwards' errors so stop if the latter are enabled
+        if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"] and 'version-going-backwards' in self.tc.td['ERROR_QA']:
             self.tc.logger.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.")
             raise OEQAPreRun
 
Signature · 1 line
2.12.0
#1 lore raw
Quoted 6 lines · On 8 June 2017 at 21:40, <[email protected]> wrote:
(quoted diff) +1 -1
-        if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"]:
+        # buildhistory introduce QA 'version-going-backwards' errors so

stop if the latter are enabled
+ if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"] and
'version-going-backwards' in self.tc.td['ERROR_QA']:

Would it be possible instead to remove version-going-backwards from ERROR_QA?

Ross

#2 lore raw
Quoted 11 lines · Ross

On 8 June 2017 at 21:40, <[email protected]> wrote:
- if "buildhistory.bbclass" in
self.tc.td["BBINCLUDED"]:
+ # buildhistory introduce QA 'version-going-backwards'
errors so stop if the latter are enabled
+ if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"]
and 'version-going-backwards' in self.tc.td['ERROR_QA']:

Quoted 2 lines

Would it be possible instead to remove version-going-backwards from ERROR_QA?

At the bug entry, there is a discussion around this. The idea is to keep buildhistory disable while oe-selftest is executing, but if user really needs this, 'force' the user to remove this check from the ERROR_QA string on his/her local.conf.

Quoted 3 lines

Ross

#3 lore raw
In reply to [email protected]

The proposed approach is not the best one as discussed by RP [1]:

""Just as another note,

ERROR_QA_remove = "version-going-backwards"
WARN_QA_remove = "version-going-backwards"

doesn't work since we can't then enable this check and the test cases test_buildhistory_buildtime_pr_backwards and test_buildhistory_diff then fail."

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11580#c7

Quoted 27 lines · On Thu, 2017-06-08 at 13:40 -0700, [email protected]…

From: Leonardo Sandoval <[email protected]>

Users constantly running oe-selftest find annoying to disable buildhistory before running 'oe-selftest' then enabling after it. To lessen the buildhistory restriction, allow buildhistory unless 'version-going-backwards' is present on ERROR_QA bitbake variable.

[YOCTO #11580]

---
 meta/lib/oeqa/selftest/context.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +2 -1
index ca73070c0b..f061b987b0 100644
@@ -150,7 +150,8 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
         _check_required_env_variables(["BUILDDIR"])
         _check_presence_meta_selftest()
 
-        if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"]:
+        # buildhistory introduce QA 'version-going-backwards' errors so stop if the latter are enabled
+        if "buildhistory.bbclass" in self.tc.td["BBINCLUDED"] and 'version-going-backwards' in self.tc.td['ERROR_QA']:
             self.tc.logger.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.")
             raise OEQAPreRun