[yocto] Adding a custom environment variable
Hi, I have a module called unit-tests. I want to create an environment variable so that at compile time I can select whether to add or remove the module from build. Thanks Deepika -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [patchtest-oe][PATCH] test_patch_upstream_status: Be explicit about case sensitivity
The case sensitivity of the checks for the "Upstream-Status" label should match so that failure messages make sense. The checks in the parse_upstream_status module are case sensitive and so the initial regex check should also be made case sensitive. A quick note about case sensitivity is added to the advice given if "Upstream-Status" is not found. Signed-off-by: Paul Barker --- tests/test_patch_upstream_status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_patch_upstream_status.py b/tests/test_patch_upstream_status.py index a477dfb..e58 100644 --- a/tests/test_patch_upstream_status.py +++ b/tests/test_patch_upstream_status.py @@ -23,7 +23,7 @@ import os class PatchUpstreamStatus(base.Base): -upstream_status_regex = re.compile("(?<=\+)Upstream.Status", re.IGNORECASE) +upstream_status_regex = re.compile("(?<=\+)Upstream.Status") @classmethod def setUpClassLocal(cls): @@ -47,7 +47,7 @@ class PatchUpstreamStatus(base.Base): payload = newpatch.__str__() if not self.upstream_status_regex.search(payload): self.fail('Added patch file is missing Upstream-Status in the header', - 'Add Upstream-Status: to the header of %s' % newpatch.path, + 'Add Upstream-Status: (case sensitive) to the header of %s' % newpatch.path, data=[('Standard format', self.standard_format), ('Valid status', self.valid_status)]) for line in payload.splitlines(): if self.patchmetadata_regex.match(line): -- 2.17.1 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [patchtest][PATCH 1/2] patchtest: Fix printing of exception tracebacks
The addError() handler is called outside of an actual exception handler so sys.exc_info() doesn't actually return an exception. This means that traceback.print_exc() doesn't know what to print. Instead we need to use traceback.print_exception() with the err object we've been given. Signed-off-by: Paul Barker --- patchtest | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/patchtest b/patchtest index 592f73e..59b19f5 100755 --- a/patchtest +++ b/patchtest @@ -101,8 +101,7 @@ def getResult(patch, mergepatch): def addError(self, test, err): self.test_error = True -(ty, va, trace) = err -logger.error(traceback.print_exc()) +logger.error(traceback.print_exception(*err)) def addFailure(self, test, err): self.test_failure = True -- 2.17.1 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [patchtest][PATCH 2/2] patchtest: Allow tests to import helper modules
When running patchtest locally to figure out what was wrong with my patch, I saw the similar exceptions for each test module: Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/usr/lib/python3.6/unittest/loader.py", line 34, in testFailure raise self._exception ImportError: Failed to import test module: tests.test_python_pylint Traceback (most recent call last): File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/mnt/build/Projects/Konsulko/patchtest/patchtest-oe/tests/test_python_pylint.py", line 18, in import base ModuleNotFoundError: No module named 'base' To fix this the import patch used when loading test modules has been extended. Signed-off-by: Paul Barker --- patchtest | 4 1 file changed, 4 insertions(+) diff --git a/patchtest b/patchtest index 59b19f5..a204479 100755 --- a/patchtest +++ b/patchtest @@ -138,6 +138,10 @@ def _runner(resultklass, prefix=None): if prefix: loader.testMethodPrefix = prefix +# allow tests to import helper modules +sys.path.insert(0, pti.startdir) +sys.path.insert(0, os.path.join(pti.startdir, 'tests')) + # create the suite with discovered tests and the corresponding runner suite = loader.discover(start_dir=pti.startdir, pattern=pti.pattern, top_level_dir=pti.topdir) ntc = suite.countTestCases() -- 2.17.1 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Adding a custom environment variable
On Fri, 2019-11-15 at 12:29 +0100, Deepika Teriar wrote: > Hi, > > I have a module called unit-tests. > I want to create an environment variable so that at compile time I > can select whether to add or remove the module from build. > perhaps look into ptest distro feature. > Thanks > Deepika -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size
Hi, On 14/11/2019 11:11, Paul Barker wrote: On Thu, 14 Nov 2019, at 06:04, Hongxu Jia wrote: - Add swap partition to workaround memory limitation - Support to set /root and /swap size, 4G /root and 1G /swap by default Signed-off-by: Hongxu Jia These settings feel distro-specific to me. They're not required for how many of us use the Raspberry Pi so it's best not to force them on everyone. I tend to agree with Paul. The final SD card configuration is generally a per project decision (more or less). The BSP provides a bootable reference and from there sky is the limit. -- Andrei Gherzan -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Cannot install package SMBNETFS Build Error Configuring CUPS
Hello, new to Yocto. I’m trying to add SMB/CIFS support to the Linux Distribution on a WP77xx based Sierra Wireless FX30 so I can mount windows network shares. It seems that a recipe exists for this in my source tree for my device at /yocto/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs I’ve edited my /yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc file and added the lines: # Add smbnetfs package IMAGE_INSTALL_append = " smbnetfs” But when I type make in my /yocto directory the image fails to build with: ERROR: cups-2.1.4-r0 do_configure: configure failed configure: error: Unable to enable SSL support. ERROR: Task (/home/myUserName/yocto/poky/meta/recipes-extended/cups/cups_2.1.4.bb:do_configure) failed with exit code ‘1' I can’t figure out how to get past this error, I would greatly appreciate any help in resolving this. Thanks in advance, David-- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] how to compile a task every time?
Dear all, I want to add a “BUILD_TIME” variable to image, so I need to compile a task every time, even if the package has no modification. Who can tell me, how can I set it to the package? thanks. thanks, Byron-- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto