mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
50 lines
2.1 KiB
Python
50 lines
2.1 KiB
Python
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
from oeqa.selftest.case import OESelftestTestCase
|
|
from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
|
|
from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
|
|
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()
|
|
|
|
def test_meta_ide_had_installed_meta_ide_support(self):
|
|
self.assertExists(self.environment_script_path)
|
|
|
|
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)
|
|
|
|
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")
|