]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest/bbtests: use write_config instead of local.conf file
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Wed, 1 Feb 2017 18:04:55 +0000 (12:04 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Feb 2017 17:37:33 +0000 (17:37 +0000)
Extra configuration data should be write using the write_config
method instead of manually appending to the local.conf file

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/bbtests.py

index c4e50cbfa0f610b4976f92990cf00abd68e5a4ee..9dbac957ed85619f5b195c7f47a412caed55c0b5 100644 (file)
@@ -229,10 +229,7 @@ INHERIT_remove = \"report-error\"
 
     @testcase(1119)
     def test_non_gplv3(self):
-        data = 'INCOMPATIBLE_LICENSE = "GPLv3"'
-        conf = os.path.join(self.builddir, 'conf/local.conf')
-        ftools.append_file(conf ,data)
-        self.addCleanup(ftools.remove_from_file, conf ,data)
+        self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
         result = bitbake('readline', ignore_status=True)
         self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
         lic_dir = get_bb_var('LICENSE_DIRECTORY')