summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 6815ecfe0b..d730bfd755 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -102,3 +102,55 @@ class BitbakeTests(oeSelfTest):
102 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz'))) 102 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz')))
103 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done'))) 103 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')))
104 bitbake('-ccleanall aspell') 104 bitbake('-ccleanall aspell')
105
106 def test_environment(self):
107 self.append_config("TEST_ENV=\"localconf\"")
108 result = runCmd('bitbake -e | grep TEST_ENV=')
109 self.assertTrue('localconf' in result.output)
110 self.remove_config("TEST_ENV=\"localconf\"")
111
112 def test_dry_run(self):
113 result = runCmd('bitbake -n m4-native')
114 self.assertEqual(0, result.status)
115
116 def test_just_parse(self):
117 result = runCmd('bitbake -p')
118 self.assertEqual(0, result.status)
119
120 def test_version(self):
121 result = runCmd('bitbake -s | grep wget')
122 find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output)
123 self.assertTrue(find)
124
125 def test_prefile(self):
126 preconf = os.path.join(self.builddir, 'conf/prefile.conf')
127 self.track_for_cleanup(preconf)
128 ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
129 result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
130 self.assertTrue('prefile' in result.output)
131 self.append_config("TEST_PREFILE=\"localconf\"")
132 result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
133 self.assertTrue('localconf' in result.output)
134 self.remove_config("TEST_PREFILE=\"localconf\"")
135
136 def test_postfile(self):
137 postconf = os.path.join(self.builddir, 'conf/postfile.conf')
138 self.track_for_cleanup(postconf)
139 ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")
140 self.append_config("TEST_POSTFILE=\"localconf\"")
141 result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
142 self.assertTrue('postfile' in result.output)
143 self.remove_config("TEST_POSTFILE=\"localconf\"")
144
145 def test_checkuri(self):
146 result = runCmd('bitbake -c checkuri m4')
147 self.assertEqual(0, result.status)
148
149 def test_continue(self):
150 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
151 runCmd('bitbake -c cleanall man xcursor-transparent-theme')
152 result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True)
153 errorpos = result.output.find('ERROR: Function failed: do_fail_task')
154 manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
155 continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
156 self.assertLess(errorpos,continuepos)