]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: Error if known problem variables are set
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Apr 2017 18:54:20 +0000 (19:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Apr 2017 22:55:53 +0000 (23:55 +0100)
Setting SANITY_TESTED_DISTROS or PRSERV_HOST are known to break oe-selftest.
Rather than have the user experience this, refuse to execute unless the
environment is correct.

Ideally we'd try and unset these but that is a more invasive change and this
at least makes people aware of the problem.

[YOCTO #11292]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-selftest

index 58d3b1ef8a56a4f2b5e8ca390b2f3996bb967cd9..52366b1c8de685d5899944e0cb5429d8e71fc79a 100755 (executable)
@@ -146,6 +146,14 @@ def preflight_check():
         log.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.")
         return False
 
+    if get_bb_var("PRSERV_HOST"):
+        log.error("Please unset PRSERV_HOST in order to run oe-selftest")
+        return False
+
+    if get_bb_var("SANITY_TESTED_DISTROS"):
+        log.error("Please unset SANITY_TESTED_DISTROS in order to run oe-selftest")
+        return False
+
     log.info("Running bitbake -p")
     runCmd("bitbake -p")