Lines Matching refs:cls
25 def setUpClass(cls): argument
26 super(OESelftestTestCase, cls).setUpClass()
28 cls.testlayer_path = cls.tc.config_paths['testlayer_path']
29 cls.builddir = cls.tc.config_paths['builddir']
31 cls.localconf_path = cls.tc.config_paths['localconf']
32 cls.local_bblayers_path = cls.tc.config_paths['bblayers']
34 cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'],
36 cls.testinc_bblayers_path = os.path.join(cls.tc.config_paths['builddir'],
38 cls.machineinc_path = os.path.join(cls.tc.config_paths['builddir'],
41 cls._track_for_cleanup = [
42 cls.testinc_path, cls.testinc_bblayers_path,
43 cls.machineinc_path]
45 cls.add_include()
48 def tearDownClass(cls): argument
49 cls.remove_include()
50 cls.remove_inc_files()
51 super(OESelftestTestCase, cls).tearDownClass()
54 def add_include(cls): argument
56 not in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
57 …cls.logger.info("Adding: \"include selftest.inc\" in %s" % os.path.join(cls.builddir, "conf/local.…
58 ftools.append_file(os.path.join(cls.builddir, "conf/local.conf"), \
62 not in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
63 cls.logger.info("Adding: \"include bblayers.inc\" in bblayers.conf")
64 ftools.append_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
68 def remove_include(cls): argument
70 in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
71 cls.logger.info("Removing the include from local.conf")
72 ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"), \
76 in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
77 cls.logger.info("Removing the include from bblayers.conf")
78 ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
82 def remove_inc_files(cls): argument
84 os.remove(os.path.join(cls.builddir, "conf/selftest.inc"))
85 for root, _, files in os.walk(cls.testlayer_path):
94 os.remove(os.path.join(cls.builddir, incl_file))