diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-25 13:44:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-25 16:48:13 +0100 |
commit | 662be652ed39f32c3c7bee6539a9e91af191557e (patch) | |
tree | fc5f40fe49fc9ac3337fa2a479192e5909e7c7c8 | |
parent | f2d32bdf3f27a9ef62fe3abb7fdd2e04ab84b5f3 (diff) | |
download | openembedded-core-662be652ed39f32c3c7bee6539a9e91af191557e.tar.gz openembedded-core-662be652ed39f32c3c7bee6539a9e91af191557e.tar.bz2 openembedded-core-662be652ed39f32c3c7bee6539a9e91af191557e.zip |
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@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/bbtests.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index 350614967c..005fdd0964 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): |