diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/lib/oeqa/selftest/cases/meta_ide.py | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases/meta_ide.py')
-rw-r--r-- | poky/meta/lib/oeqa/selftest/cases/meta_ide.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/meta_ide.py b/poky/meta/lib/oeqa/selftest/cases/meta_ide.py new file mode 100644 index 0000000000..5df9d3ed93 --- /dev/null +++ b/poky/meta/lib/oeqa/selftest/cases/meta_ide.py @@ -0,0 +1,49 @@ +from oeqa.selftest.case import OESelftestTestCase +from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject +from oeqa.utils.commands import bitbake, get_bb_vars, runCmd +from oeqa.core.decorator.oeid import OETestID +import tempfile +import shutil + +class MetaIDE(OESelftestTestCase): + + @classmethod + def setUpClass(cls): + super(MetaIDE, cls).setUpClass() + bitbake('meta-ide-support') + bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'TMPDIR', 'COREBASE']) + cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS'] + cls.tmpdir = bb_vars['TMPDIR'] + cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script) + cls.corebasedir = bb_vars['COREBASE'] + cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide') + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True) + super(MetaIDE, cls).tearDownClass() + + @OETestID(1982) + def test_meta_ide_had_installed_meta_ide_support(self): + self.assertExists(self.environment_script_path) + + @OETestID(1983) + def test_meta_ide_can_compile_c_program(self): + runCmd('cp %s/test.c %s' % (self.tc.files_dir, self.tmpdir_metaideQA)) + runCmd("cd %s; . %s; $CC test.c -lm" % (self.tmpdir_metaideQA, self.environment_script_path)) + compiled_file = '%s/a.out' % self.tmpdir_metaideQA + self.assertExists(compiled_file) + + @OETestID(1984) + def test_meta_ide_can_build_cpio_project(self): + dl_dir = self.td.get('DL_DIR', None) + self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path, + "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz", + self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir) + self.project.download_archive() + self.assertEqual(self.project.run_configure(), 0, + msg="Running configure failed") + self.assertEqual(self.project.run_make(), 0, + msg="Running make failed") + self.assertEqual(self.project.run_install(), 0, + msg="Running make install failed") |