]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORY
authorChen Qi <Qi.Chen@windriver.com>
Tue, 10 Jan 2017 02:24:53 +0000 (10:24 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jan 2017 18:01:54 +0000 (18:01 +0000)
Fix path assumption for LICENSE_DIRECTORY, otherwise, the test case
may fail even if the functionality it tests works well.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/bbtests.py

index 08cc4012fc3d3b475af26d9cdaccc1896af708c2..c4e50cbfa0f610b4976f92990cf00abd68e5a4ee 100644 (file)
@@ -235,8 +235,9 @@ INHERIT_remove = \"report-error\"
         self.addCleanup(ftools.remove_from_file, conf ,data)
         result = bitbake('readline', ignore_status=True)
         self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
-        self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
-        self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
+        lic_dir = get_bb_var('LICENSE_DIRECTORY')
+        self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv3')))
+        self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv2')))
 
     @testcase(1422)
     def test_setscene_only(self):