Skip to contentSkip to conversation

selftest/bbtests: use write_config instead of local.conf file

PATCH New [email protected] 1 participant 1 message Feb 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftest/bbtests: use write_config instead of local.conf file

From: Leonardo Sandoval <[email protected]>

Extra configuration data should be write using the write_config method instead of manually appending to the local.conf file

---
 meta/lib/oeqa/selftest/bbtests.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/lib/oeqa/selftest/bbtests.py +1 -4
index c4e50cb..9dbac95 100644
@@ -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')
Signature · 1 line
2.1.4