[oe-commits] [openembedded-core] 02/03: selftest/bbtests: Add test for bitbake execution outside the build directory

git at git.openembedded.org git at git.openembedded.org
Wed Jul 25 14:49:59 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 476f37bc3e27c44bf7a5daf3a1df54dd42092683
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 25 13:44:11 2018 +0000

    selftest/bbtests: Add test for bitbake execution outside the build directory
    
    Also fix a related test's error message to match what it does.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 3506149..005fdd0 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -15,16 +15,26 @@ class BitbakeTests(OESelftestTestCase):
                 return l
 
     @OETestID(789)
+    # Test bitbake can run from the <builddir>/conf directory
     def test_run_bitbake_from_dir_1(self):
         os.chdir(os.path.join(self.builddir, 'conf'))
         self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
 
     @OETestID(790)
+    # Test bitbake can run from the <builddir>'s parent directory
     def test_run_bitbake_from_dir_2(self):
         my_env = os.environ.copy()
         my_env['BBPATH'] = my_env['BUILDDIR']
         os.chdir(os.path.dirname(os.environ['BUILDDIR']))
-        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir")
+        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir's parent directory")
+
+    # Test bitbake can run from some other random system location (we use /tmp/)
+    def test_run_bitbake_from_dir_3(self):
+        my_env = os.environ.copy()
+        my_env['BBPATH'] = my_env['BUILDDIR']
+        os.chdir("/tmp/")
+        self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from /tmp/")
+
 
     @OETestID(806)
     def test_event_handler(self):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list