summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py12
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):
15 return l 15 return l
16 16
17 @OETestID(789) 17 @OETestID(789)
18 # Test bitbake can run from the <builddir>/conf directory
18 def test_run_bitbake_from_dir_1(self): 19 def test_run_bitbake_from_dir_1(self):
19 os.chdir(os.path.join(self.builddir, 'conf')) 20 os.chdir(os.path.join(self.builddir, 'conf'))
20 self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir") 21 self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
21 22
22 @OETestID(790) 23 @OETestID(790)
24 # Test bitbake can run from the <builddir>'s parent directory
23 def test_run_bitbake_from_dir_2(self): 25 def test_run_bitbake_from_dir_2(self):
24 my_env = os.environ.copy() 26 my_env = os.environ.copy()
25 my_env['BBPATH'] = my_env['BUILDDIR'] 27 my_env['BBPATH'] = my_env['BUILDDIR']
26 os.chdir(os.path.dirname(os.environ['BUILDDIR'])) 28 os.chdir(os.path.dirname(os.environ['BUILDDIR']))
27 self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir") 29 self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir's parent directory")
30
31 # Test bitbake can run from some other random system location (we use /tmp/)
32 def test_run_bitbake_from_dir_3(self):
33 my_env = os.environ.copy()
34 my_env['BBPATH'] = my_env['BUILDDIR']
35 os.chdir("/tmp/")
36 self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from /tmp/")
37
28 38
29 @OETestID(806) 39 @OETestID(806)
30 def test_event_handler(self): 40 def test_event_handler(self):