summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/parse.py')
-rw-r--r--bitbake/lib/bb/tests/parse.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index b272739f56..431b0c7d3e 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -349,14 +349,11 @@ EXPORT_FUNCTIONS do_compile do_compilepython
349 os.makedirs(tempdir + "/classes") 349 os.makedirs(tempdir + "/classes")
350 with open(tempdir + "/classes/someclass.bbclass", "w") as f: 350 with open(tempdir + "/classes/someclass.bbclass", "w") as f:
351 f.write(self.export_function_class) 351 f.write(self.export_function_class)
352 f.flush()
353 with open(tempdir + "/classes/secondclass.bbclass", "w") as f: 352 with open(tempdir + "/classes/secondclass.bbclass", "w") as f:
354 f.write(self.export_function_class2) 353 f.write(self.export_function_class2)
355 f.flush()
356 354
357 with open(recipename, "w") as f: 355 with open(recipename, "w") as f:
358 f.write(self.export_function_recipe) 356 f.write(self.export_function_recipe)
359 f.flush()
360 os.chdir(tempdir) 357 os.chdir(tempdir)
361 d = bb.parse.handle(recipename, bb.data.createCopy(self.d))[''] 358 d = bb.parse.handle(recipename, bb.data.createCopy(self.d))['']
362 self.assertIn("someclass_do_compile", d.getVar("do_compile")) 359 self.assertIn("someclass_do_compile", d.getVar("do_compile"))
@@ -366,7 +363,6 @@ EXPORT_FUNCTIONS do_compile do_compilepython
366 recipename2 = tempdir + "/recipe2.bb" 363 recipename2 = tempdir + "/recipe2.bb"
367 with open(recipename2, "w") as f: 364 with open(recipename2, "w") as f:
368 f.write(self.export_function_recipe2) 365 f.write(self.export_function_recipe2)
369 f.flush()
370 366
371 d = bb.parse.handle(recipename2, bb.data.createCopy(self.d))[''] 367 d = bb.parse.handle(recipename2, bb.data.createCopy(self.d))['']
372 self.assertNotIn("someclass_do_compile", d.getVar("do_compile")) 368 self.assertNotIn("someclass_do_compile", d.getVar("do_compile"))
@@ -377,10 +373,8 @@ EXPORT_FUNCTIONS do_compile do_compilepython
377 373
378 with open(recipename, "a+") as f: 374 with open(recipename, "a+") as f:
379 f.write("\ninherit secondclass\n") 375 f.write("\ninherit secondclass\n")
380 f.flush()
381 with open(recipename2, "a+") as f: 376 with open(recipename2, "a+") as f:
382 f.write("\ninherit secondclass\n") 377 f.write("\ninherit secondclass\n")
383 f.flush()
384 378
385 d = bb.parse.handle(recipename, bb.data.createCopy(self.d))[''] 379 d = bb.parse.handle(recipename, bb.data.createCopy(self.d))['']
386 self.assertIn("secondclass_do_compile", d.getVar("do_compile")) 380 self.assertIn("secondclass_do_compile", d.getVar("do_compile"))
@@ -418,7 +412,6 @@ include \\
418 recipename = tempdir + "/recipe_unclosed.bb" 412 recipename = tempdir + "/recipe_unclosed.bb"
419 with open(recipename, "w") as f: 413 with open(recipename, "w") as f:
420 f.write(content) 414 f.write(content)
421 f.flush()
422 os.chdir(tempdir) 415 os.chdir(tempdir)
423 with self.assertRaises(bb.parse.ParseError) as error: 416 with self.assertRaises(bb.parse.ParseError) as error:
424 bb.parse.handle(recipename, bb.data.createCopy(self.d)) 417 bb.parse.handle(recipename, bb.data.createCopy(self.d))
@@ -434,7 +427,6 @@ include \\
434 lines = self.export_function_unclosed_tab.split("\n") 427 lines = self.export_function_unclosed_tab.split("\n")
435 lines[3] = "}" 428 lines[3] = "}"
436 in_file.write("\n".join(lines)) 429 in_file.write("\n".join(lines))
437 in_file.flush()
438 bb.parse.handle(recipename_closed, bb.data.createCopy(self.d)) 430 bb.parse.handle(recipename_closed, bb.data.createCopy(self.d))
439 431
440 special_character_assignment = """ 432 special_character_assignment = """