summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* oeqa: modernise subprocess: preexec_fn=os.setsid -> start_new_session=TrueAndré Draszik2020-02-043-3/+3
| | | | | | | | | | | | | start_new_session was added to python3 subprocess in v3.2 and is meant to take the place of the common use of preexec_fn to call os.setsid() in the child - as done here. Update to use the new equivalent. (From OE-Core rev: c3bd502f31a621394a2f6ea3ae90443ff4ac98a4) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/path: try hardlinking instead of guessing when it might failHenning Schild2020-02-041-6/+18
| | | | | | | | | | | | | | | | The comparison of the stat st_dev is not enough to judge whether hardlinking will work. One example would be where you try and hardlink across two bind-mounts of a directory. The st_dev will be the same and the operation will still fail. Instead of implementing a check to try and figure out hardlink support just try hardlinking and fall back to a copy when running into an exception. (From OE-Core rev: f5571bda8327f927feb23b167ab4594b7d0c95bc) Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: prefer CMAKE_BUILD_PARALLEL_LEVELDaniel McGregor2020-02-041-4/+7
| | | | | | | | | | | | cmake 3.12 introduced this environment variable. Prefer it to passing PARALLEL_MAKE and PARALLEL_MAKEINST on the cmake command line, because it gets passed to second stage cmake invocations while command-line arguments do not (for example, multi-stage clang builds) (From OE-Core rev: cdd44c93f02bb8cc2fa773e13c8ce36e3da23921) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: reproducible: Do not strip packagesJoshua Watt2020-02-031-0/+1
| | | | | | | | | | | | | | Do not strip packages when testing reproducible builds. In some cases, stripped data differs between builds, but then gets removed. However, the contents affect the generation of the GCC build-id, which then differs in the resulting ELF files, even though the data that caused this is no longer there. Inhibit stripping so that their causes can be evaluated. (From OE-Core rev: 0e23c6faf8169a333ae29064553705b5d7d6b589) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible: Allow configuration of saved debug outputRichard Purdie2020-02-021-1/+12
| | | | | | | | | | | | | | If OEQA_DEBUGGING_SAVED_OUTPUT is set in the environment, use this location to store reproducibile build failure output. This aids debugging on the YP autobuilder in particular. Use a date in the directory name to make it easier to find failure output. Also clean up empty directories as they're unnecessary distracting noise. (From OE-Core rev: 138ed4aa96ec5069f9f7fd02994a42452dbccc2d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parselogs: remove mpc8315e-rdb from errorsArmin Kuster2020-02-021-5/+0
| | | | | | | (From OE-Core rev: 0de55be071efff60944c89582ae0e736f3bdc828) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bsp-hw.json: remove mpc8315e-rdb manual testsArmin Kuster2020-02-021-52/+0
| | | | | | | (From OE-Core rev: 72af20f445dfd8ac0b472f80ed84e1b1c556e8ef) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrodata/maintainers: Add PARSE_ALL_RECIPES flag to fix test issuesRichard Purdie2020-01-271-4/+3
| | | | | | | | | | | | Currently the test depends on which DISTRO_FEATURES and targets are selected. Similar to SOURCE_MIRROR_FETCH, add PARSE_ALL_RECIPES to allow the test to see a much wider range of them. This avoids issues added by the new ucontext musl specific recipe and allows the current whitelist to be cleared out a bit (more cleanup can follow). (From OE-Core rev: c139e058bb2df48c79784cf3fd701e51bbc68427) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: add npm recipe build testJean-Marie LEMETAYER2020-01-271-0/+20
| | | | | | | | | | | This commit adds a devtool build test for npm recipe: - devtool.DevtoolAddTests.test_devtool_add_npm (From OE-Core rev: af299817c2fe9fa504762c54bd0593f3163399fb) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: add npm recipe creation testJean-Marie LEMETAYER2020-01-271-0/+25
| | | | | | | | | | | This commit adds a recipetool creation test for npm recipe: - recipetool.RecipetoolTests.test_recipetool_create_npm (From OE-Core rev: 61cabc2ccaa6a972b799d19fda8964926cc7ecec) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: remove unneeded npm_split_package_dirs functionJean-Marie LEMETAYER2020-01-271-33/+0
| | | | | | | | | | The npm_split_package_dirs function was used by the recipetool when creating npm recipes. This is not the case anymore. (From OE-Core rev: 6cd834737eaa42592e83300099c152e2cfef568c) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager: Improve locale-archive reproducibilityAlex Kiernan2020-01-221-1/+1
| | | | | | | | | | The generation of locale-archive depends on the order of the input files. Fix the order by sorting the file list. (From OE-Core rev: 3f781ebd9dfbee143907190c6db5b86d501c3e63) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/reproducible: Fix unset save_dir variableRichard Purdie2020-01-221-5/+5
| | | | | | | | Previous refactoring broke the case where save_dir was set. Fix this. (From OE-Core rev: 9bfa04aa1f1a0b38ffa51f0211f3a46a90e17b0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/reproducible: Fix extra data reportingJoshua Watt2020-01-221-5/+5
| | | | | | | | | | A typo was preventing the extra data about the reproducible build from being reported in the test results (From OE-Core rev: 7c653337360dd5e49809b930f22a999c1d6e09ee) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/reproducible: Add flag for building from sstateJoshua Watt2020-01-221-31/+35
| | | | | | | | | | | Adds a flag to control if the reproducible QA test should allow building from sstate or not. Building from sstate may not be reproducible depending on how the sstate is populated. (From OE-Core rev: c24b71e9ec2e518bd24da20ddbb1406910b1b92e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: check maintainers.inc for entries without recipesAlexander Kanavin2020-01-211-2/+32
| | | | | | | | | Also remove a couple of entries found by the test :) (From OE-Core rev: 749f44b3735e4ae3657255b373fa55c357501cc5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* machine_dict: Add i686 to the ELF machine dictionaryAlejandro Enedino Hernandez Samaniego2020-01-191-0/+1
| | | | | | | | | | | | | | | | | | | An error like the following is thrown when building baremetal applications on some x86 architectures: (machine, osabi, abiversion, littleendian, bits) \ = oe.elf.machine_dict(d)[target_os][target_arch] Exception: KeyError: i686 Since the i686 (target_arch) key does not exist in the dictionary. Add the key to fix the error. (From OE-Core rev: e7862d2cdd478556ec0310d2b3c140da9cb2ff0b) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes, conf, lib: Add support for powerpc64leKhem Raj2020-01-192-0/+3
| | | | | | | | | | | | | | LE is default for modern powerpc64, power8+ PowerPC64 Little Endian Linux ABI specifies Power8 as the minimum ISA. The basic ABI can run on earlier versions of the 64 bit PowerPC ISA, but it was helpful to define a new, minimum instruction set for Linux distribution releases during the switch to Little Endian. (From OE-Core rev: b9c73fb6d1afb3367d871a3d6bf7d0d6a53968a9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Improve debug output if getpwuid() failsRichard Purdie2020-01-161-2/+6
| | | | | | | | | If getpwduid fails, we don't see which file it failed on which is key information to aid debugging. Print this information when exceptions are raised. (From OE-Core rev: 9d7a5219713af8117eda145052c6d9abdf577d8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ltp: update to 20190930Alexander Kanavin2020-01-161-1/+1
| | | | | | | | | | | | | | | Drop a big pile of backports. Add a patch to address absent string formatting error. Additional fixing of builds with musl. timers group has been merged upstream into syscalls. (From OE-Core rev: 7126431cc3512e3d7f55300c561339c87283b605) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Move sanity_info from conf to cachePeter Kjellerstedt2020-01-101-1/+1
| | | | | | | | | | | | | | Since this file is written during recipe parsing, having it in the ${BUILDDIR}/conf directory, which is covered by an inotify watcher, will trigger a re-parse the next time bitbake is run and the resident bitbake server is enabled. This causes the sanity_info file to be updated again, which triggers a new parse the next time bitbake is run ad infinitum. Moving it to ${BUILDDIR}/cache should avoid this. (From OE-Core rev: f98103b548aa7dba6b1be6c8e02ef41858a8e85c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: archiver: Tidy up test case descriptionsPaul Barker2020-01-101-6/+6
| | | | | | | (From OE-Core rev: 8f9119cb1451ef6337b98e4bb566069aa8d66a35) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Add new mirror archiver modePaul Barker2020-01-101-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | We define a new method of populating a source mirror using the archiver bbclass instead of simply copying the contents of the downloads directory. This allows the archiver features such as copyleft license filtering and recipe type filtering to be used when preparing a source mirror. This new archiver mode is selected by setting `ARCHIVE_MODE[src]` to 'mirror'. The source mirror mode can either be 'split' (default) or 'combined', controlled by `ARCHIVER_MODE[mirror]`. Additionally, sources can be excluded as needed by setting `ARCHIVER_MIRROR_EXCLUDE` to a list of URI prefixes. These options are described in more detail in the new entries in the header of archiver.bbclass. New oeqa selftest cases are added to cover the mirror archiver mode. (From OE-Core rev: 2c8b31ae0ab95a8b100e8bade23f51574e273c9a) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --include-path argumentPaul Barker2020-01-101-18/+55
| | | | | | | | | | | | | | | This option adds the contents of the given path to a partition built with the rootfs source plugin. The path is relative to the directory in which wic is running not the rootfs itself so use of an absolute path is recommended. This option is most useful when multiple copies of the rootfs are added to an image and it is required to add extra content to only one of these copies. This option only has an effect with the rootfs source plugin. (From OE-Core rev: d4cd27a9837426e809190548a83c6c7c76505114) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: report ptests that couldn't be run at allAlexander Kanavin2020-01-101-0/+5
| | | | | | | | | | | Currently if a ptest does not produce PASS or FAIL, but simply errors out, this is not caught or reported; I think some ptests may have silently regressed due to this. (From OE-Core rev: 4b78b6571a3653d7d8e9dab9512bad5d39483988) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager.py: put the sdk_provides_dummy_target upfrontAlexander Kanavin2020-01-101-0/+2
| | | | | | | | | | | | | Otherwise, the package utilizing this architecure does not get properly prioritized by rpm/dnf. This isn't seen single-lib builds (as the architecture ends up upfront anyway), but is triggered in multulib where the architecture may end up in the middle of the list due to multilib expansion/trimming duplicates. (From OE-Core rev: a807d54655d7377ef8ac49abd5ab428303831663) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add extra directory levelRichard Purdie2020-01-062-4/+4
| | | | | | | | | | | | | | | | | | We're having speed issues on the autobuilder due to the numbers of files in sstate directories. We previously split these by the first two characters of the hash. This change extends this to split by the next two characters as well, creating more layers of directories. This should signifiantly speed up eSDK builds on the autobuilder as the current sstate layout simply isn't scaling there but addresses a general complaint. gen-lockedsig-cache needed to be updated for the new split level sstate. Also update tests for new layout. (From OE-Core rev: d05bde16bdad761ed8f4c0a48de60c649aa33e85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Avoid resetting taskhash within siggen for locked sigsRichard Purdie2020-01-031-1/+5
| | | | | | | | | | | | | Since get_unihash uses taskhash as a key internally, changing it means different bebahour when locked sigs are active verses not active. Under corner cases this leads to a signature mismatch. Avoid this by by adding a wrapper for the place its externally exposed and then not changing the internals. (From OE-Core rev: 23b7484d326cf7fac013384598d7745a042eaa75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Fix locked signature handling with unihashesRichard Purdie2020-01-031-2/+10
| | | | | | | | | | | | | | | | get_taskhash will call get_unihash internally in the parent class. We need to disable our filter of it whilst this runs else incorrect hashes can be calculated. This is believed to be causing the locked signatures test to fail under some circumstances (depending on whether earlier hashes are being remapped). [YOCTO #13605] (From OE-Core rev: 523c093a882f6831ba75b5c4513837554d7e2414) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Test cross/native hashserv method extensionRichard Purdie2020-01-021-0/+9
| | | | | | | | | | | | | | We can have one taskhash which represents multiple native/cross sstate objects since they're stored by BUILD_ARCH or possibly host distro (or host gcc version). We need to put these into separate namespaces on hashserv since their outhashes will never match and we need deterministic lookups for the different namespaces. Use this extramethod option to handle this. This fixes several problematic failures on the autobuilder. (From OE-Core rev: 2a76082363d189880613765ad339718e3614049d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.conf: Ensure that RECIPE_SYSROOT is unchanged for nativeMike Crowe2019-12-301-0/+40
| | | | | | | | | | | | | | | | | | | | Ensure that RECIPE_SYSROOT is the same for -native recipes whether multilib.conf is included or not. Without this change task signatures for -native recipes change when switching between MACHINEs that require multilib.conf and those that don't. This fix was one of the ones suggested by Khem Raj in http://lists.openembedded.org/pipermail/openembedded-core/2019-December/290303.html Add test_sstate_multilib_or_not_native_samesigs test case to sstatetests.py to ensure that this stays fixed. (From OE-Core rev: aa05f1ded71366b86eda7fce24d8b5395e85ada2) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/ptest: fix detection of failed testsAndré Draszik2019-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d6065f136f6d ("oeqa/logparser: Various misc cleanups"), 7b17274c30c6 in poky, the ptest OEQA is unable to detect failures in any of the test results. The reason is that the test result string changed from 'fail' to 'FAILED', because the original mapping has been removed as part of that commit, but the code in here is still trying to match against the old string, resulting in no matches, i.e. everything is treated as successful, even if it shouldn't be. Update the OEQA ptest test to actually work again and report failure if there was a failure. Note that the ptest test is marked as @expectedfail, so even though this test now again starts to fail, the overall OEQA test result is not affected - but at least the overall OEQA test summary reflects the correct status again. In other words: RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.26s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: PASSED (4.05s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.60s) SUMMARY: image-debug () - Ran 3 tests in 4.937s correctly changes to: AssertionError: Failed ptests: {'dummytest': ['check_True_is_True', 'test_basic']} RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.24s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: EXPECTEDFAIL (4.13s) SUMMARY: image-debug () - Ran 3 tests in 4.937s instead and we see a summary of the ptest subtests that failed. (From OE-Core rev: 08ff4b9195a9de91b8090173c5bd03a5ff263616) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: Cleanup and fix previous patchRoss Burton2019-12-291-1/+3
| | | | | | | | | Ensure self.data isn't accessed without assignment. Also clean up old style popen use and replace with modern/simpler subprocess. (From OE-Core rev: 39825cba4761a6b4b2473825705975f9f421ec8b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils: set SRCPV for devupstream variantAlexander Kanavin2019-12-281-0/+2
| | | | | | | | | | | Otherwise bitbake is unable to expand it if the main variant is not using a SCM fetcher. (From OE-Core rev: 24e59094de42b4b0bed3584ca8571c4c19080428) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: don't use oe.cachedpathRoss Burton2019-12-281-3/+2
| | | | | | | | | | | Unless cachedpath is used correctly then it's just a glorified clone of os.walk, but without any of the recent optimisations in os.walk. In this codepath there is no point to using cachedpath. (From OE-Core rev: 765e0c3410d6bf3b4a50c4a036f555eae760acd2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/package: mark string as rawRoss Burton2019-12-281-1/+1
| | | | | | | | | | This regex uses \ so is actually parsed incorrectly, mark it up as a raw string. (From OE-Core rev: 120e687bad03ad2cf4df4092e8a3f35a569e09f4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: reproducible: Test core-image-sato and core-image-full-cmdlineJoshua Watt2019-12-181-1/+1
| | | | | | | | | | Adds core-image-sato and core-image-full-cmdline to the list of images that the reproducible build test builds. (From OE-Core rev: d6c62cc0305ab082e990041da104fedb5798e0e4) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysklogd: update to 2.0.3Alexander Kanavin2019-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | Drop all patches as they are no longer necessary with autotools, fix problems that are addressed upstream, or (in case of no-vectorization.patch) don't apply to the old version either, which means no one is using that hw target anymore. Remove custom systemd configs (provided by upstream), and custom syslog config (also provided by upstream but not installed by default). Adjust parselogs to not error out on not being able to find System.map file during boot (that is packaged into kernel-dev and is not normally installed). License-Update: various tweaks; the license terms are the same. (From OE-Core rev: dcf0bd14d78b0848f206eb35355f05bfbd51c02d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* incompatible_lic.py: Add tests for incompatible licenses with wildcardsPeter Kjellerstedt2019-12-161-0/+42
| | | | | | | | Suggested-by: Quentin Schulz <quentin.schulz@streamunlimited.com> (From OE-Core rev: ef7c44c9bdf30a02ccc71f26c27aab45d6adf1fb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Report only the licenses that are incompatiblePeter Kjellerstedt2019-12-161-2/+2
| | | | | | | | | | | Instead of reporting ${LICENSE} when a package cannot be installed into an image because it is using an incompatible license, report the license(s) that are actually incompatible. (From OE-Core rev: b1863e570d4b169cd2f0ea7b4fe7c2348943cb2c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Report only the licenses that are incompatible for a packagePeter Kjellerstedt2019-12-161-3/+3
| | | | | | | | | | | Instead of reporting ${LICENSE} when a package is identified as using an incompatible license, report the license(s) that are actually incompatible. (From OE-Core rev: fb3405fac7b933a3f9d23e5faf6a3cf2d1990982) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Introduce AVAILABLE_LICENSES that lists all licensesPeter Kjellerstedt2019-12-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | Previously, there was SRC_DISTRIBUTE_LICENSES, an undocumented variable that contained a static list of licenses. It was used by expand_wildcard_licenses() to expand any wildcards used in, e.g., INCOMPATIBLE_LICENSE. However, since this static list of licenses has not been kept up-to-date, many licenses were missing, with the result that if one tried to use any of those licenses with a wildcard, no licenses would be found, effectively ignoring that they should be marked as incompatible. This introduces a new (documented) variable, AVAILABLE_LICENSES, that is automatically updated to contain all licenses found in any directories specified by ${COMMON_LICENSE_DIR} and ${LICENSE_PATH}, and uses it instead of SRC_DISTRIBUTE_LICENSES when expanding wildcards. (From OE-Core rev: 8c9ef587fe499c612a878a1ab42092eb79b334ef) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/apt dnf opkg: support running from within docker containerAndré Draszik2019-12-163-3/+8
| | | | | | | | | | | | | | | | | If the user specified an http port to use for serving files, use that instead of a random one. At the same time, have the http server bind to all interfaces. Binding to the server_ip might not always be possible, e.g. in the case of running bitbake / oeqa from within a docker container. In this case, the ip address is valid outside the container, but not inside, and hence can't be bound to. So switch to simply binding to all interfaces. (From OE-Core rev: da529e6522959c2024023e90de52b5e42f160596) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/target/ssh oeqa/target/qemu: expose server listening port to testsAndré Draszik2019-12-162-1/+3
| | | | | | | | | | | | | Allow tests to access the listening port as just introduced. Note that when using qemu this infrastructure shouldn't be needed, but we still need to set the port to 0 so that a listening port is determined automatically (e.g. by the python http server). (From OE-Core rev: ca58559fc30842c123907fb5cc68b3356c530862) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/context.py: support listening port in TEST_SERVER_IPAndré Draszik2019-12-161-0/+6
| | | | | | | | | | | | | | | | | Similar to the existing possibility to specify a port in TEST_TARGET_IP, allow TEST_SERVER_IP to also contain a port. The intention is for this port to be passed into e.g. the http server from the apt / dnf / opkg tests, or any other (custom) tests that might need the target to connect to a service spawned by bitbake / oeqa, where bitbake is actually running inside a docker container. (From OE-Core rev: 9f401cd8b010ca613a151d0323b251f2243f399f) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver: allow to pass in listening portAndré Draszik2019-12-161-2/+2
| | | | | | | | | | | | | | | | Being able to specify the listening port is useful when running OEQA from within a docker container, e.g. crops or any other solution. In that case, a port on the outside must be mapped to a specific port inside the container. If no port is specified for the http server module in this case, the http server would choose a random port, which is unlikely to be mapped and thus won't be reachable from the outside. (From OE-Core rev: e54391ca9068661693275fbfcfded9bc0b2606f3) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Further optimiseRichard Purdie2019-12-161-3/+2
| | | | | | | | Optimise the call into the parent function to be only when needed. (From OE-Core rev: 198bacaa1068fd68075d9182318fe64e9809dd36) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Optimise get_taskhash for hashequivRichard Purdie2019-12-151-2/+11
| | | | | | | | | | | With hashequiv the get_taskhash function is called much more regularly and contains expensive operations. This these don't change based upon hash in a given build, improve the caching within the function to reduce overhead. (From OE-Core rev: de98cfe3cde4b8d5f4b163b5fba3f129651ef06a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: qemu: ensure we print runqemu output in the event of failurePaul Eggleton2019-12-151-2/+2
| | | | | | | | | | | | If we get here in the code it's because runqemu has failed, this is not a debug situation - we need to see the output, so print it as an error. Fixes [YOCTO #13681]. (From OE-Core rev: c1def38c680d64c992839166bbf9bec51eb0788a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: qemu: fix width of top output in host dumpPaul Eggleton2019-12-151-0/+1
| | | | | | | | | | | | | | | | | | If runqemu fails, there is some logic to run a set of commands to dump various bits of information that might help debug the issue (particularly in a busy situation such as on the autobuilder). One of those commands is "top -bn1", however top restricts the output to the width of the calling terminal, and for whatever reason this is a little restrictive when called from inside testimage, so set COLUMNS in the environment to a high value to fix it. (Another way is to use the -w option, but that is not supported by our default busybox configuration so it will then fail when this same list of commands is used on the target). (From OE-Core rev: 07da998f5aa6c3f5ffeee5150fc579e8a1051ba4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>