Commit Graph

36 Commits

Author SHA1 Message Date
Richard Purdie
65318019cd recipes/classes/scripts: Drop SRCPV usage in OE-Core
Now that SRCPV isn't needed we can simplify things in a few places...

(From OE-Core rev: 843f82a246a535c353e08072f252d1dc78217872)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Yang Xu
1bdcd76d29 oeqa/selftest/ssate: Add test for find_siginfo
Previously some dependencies couldn't be followed through their siginfo
files. This has been fixed, add a test to ensure this doesn't regress.

(From OE-Core rev: a59cd1502ff14c5d8ccb04385bf4a3ad338d998d)

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:23:33 +01:00
Richard Purdie
c47ba43785 oeqa/selftest/sstatetests: Add easier debug option
In order to debug these selftest failures you end up having to comment out
the file cleanup. Make this an option at the top of the file to make it
a bit easier, I've had to do this too many times now.

(From OE-Core rev: ae69d48b0e5b58b18553a6b3cd03ffbd3f369aa3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-02 15:59:07 +01:00
Richard Purdie
2ba8593b95 oeqa/selftest/sstate: Split classes to allow more parallelism
By splitting the single class into multiple classes, it allows more parallelism
in the execution. These tests don't have interdependencies that benefit
from sstate reuse or anything like that so this makes sense to improve overall
test execution time if/where possible.

(From OE-Core rev: 9dbc2f4ebbde47b1c997948a9690ffb8eb29b552)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-13 17:35:22 +00:00
Richard Purdie
2420625414 oeqa/selftest/sstate: Move common code to base class
Move the other common shares test functions to the base class to
improve the code structure.

(From OE-Core rev: de3e6f85c5537a3571ffbe2326b73f2c2526bce2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-13 17:35:22 +00:00
Richard Purdie
a4c484b8cb oeqa/selftest/sstate: Merge sstate test class with tests themselves
Having this base class as a separate file is just confusing. Merge with
the rest of the test code.

(From OE-Core rev: 977522a3b063225e22e2fd04b8265a4595606db2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-13 17:35:22 +00:00
Richard Purdie
ce08cf4825 lib: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also add license identifiers as MIT if there isn't one.

(From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 12:00:43 +01:00
Richard Purdie
2ead8dc18b oeqa/selftest/sstate: Ensure tests are deterministic
glob.glob() depends on the order of files on disk and selecting [0]
is race prone. We should cover all the nativesdk files so rework
the function to do this.

Spotted as some oe-selftests failed, some passed and it raised a question
of why!

(From OE-Core rev: 8818478420a5c73b1dc1710774545f7e984307da)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-07 13:18:56 +01:00
Alexander Kanavin
29c52d7b26 toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicate (e)SDK
Specifically:
1. Place the environment setup file into $B and not into $TMPDIR,
so that the recipe using the class can itself better decide what to do with the file.

2. Use global, unified sysroots (provided through build-sysroots recipe)
and not recipe-specific ones, as this allows flexible on-the-fly management of what
libraries are available to build applications, without having to modify any
recipes, similar to eSDK 'extensible' part.

This also requires adjustment of the sstate sametune_samegsigs test, as meta-ide-support
becomes dependent on $MACHINE (unified sysroots have it in their paths)
and needs to be excluded from the test.

3. Add a few missing settings that have been added to SDK environment files.

4. Add a snippet to the environment setup file that also runs the relocation scripts.
In regular SDKs this is executed by the SDK installer, in direct SDK we can do it when
setting up the environment.

(From OE-Core rev: db5dfd78ae441201778b1175f4fb9a3eba994899)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:50:17 +01:00
Richard Purdie
b051ca1289 oeqa/selftest/sstatetests: Update test to work with bitbake changes
Bitbake is dropping the DL_DIR fallback for local file urls and ensuring
local urls are fetchable. This test fails as it copies the meta directory
of COREBASE but not scripts and nativesdk-qemu-helper references runqemu
from there which doesn't exist in the copied data.

Tweak to symlink scripts into position in the copied metadata which
avoids the now fatal parsing error.

(From OE-Core rev: 5a5199943de5df9a4d44277d07f4313642c34b3a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-15 12:22:08 +01:00
Ross Burton
668753b8ed oeqa/selftest: remove unused imports
(From OE-Core rev: 7ef7b03eeefc0a9911fd62c73e346fa5aeeb09eb)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
Peter Kjellerstedt
7faaaf1425 sstatetests: Correct a typo in a comment
(From OE-Core rev: f6420121920a242655ba5ded0f96763d6638cbc4)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-03 09:05:13 +00:00
Richard Purdie
16110cdca7 oeqa/sstate: Fix allarch samesigs test
The allarch sstate sigs test is supposed to compare the allarch sigs but
does not. Fix this.

Also rename the common function to make it clear it isn't just used by
the allarch test.

(From OE-Core rev: 549597d422c7bcb467f34139ff25d2bee96bf851)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11 15:48:11 +00:00
Richard Purdie
9d4dd141bf sstatetests: Add OLDEST_KERNEL to allarch tests
Some architectures vary OLDEST_KERNEL and this shouldn't change the allarch
signatures but in current OE-Core can/does. Add differing values to the
test configs to ensure we catch this in future (we want to keep a 32 and
64 bit machine here to test that as well).

(From OE-Core rev: 151ce55ec8ebc91b83bf0d09b9196f11646df1f1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11 15:48:11 +00:00
Alexander Kanavin
a5fe414531 sstatetests: add a test for moving oe-core around in the filesystem
Doing that should not change the task signatures.

(From OE-Core rev: a06ceaeaf11aa344e152f3bb6629aa6e000482d3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Richard Purdie
dc53fe75cc meta/scripts: Manual git url branch additions
Following the scripted conversion adding branches to git://
SRC_URI entries, add the remaining references, mainly in the selftests
and recipetool.

(From OE-Core rev: 5340c0d688036c1be6c938f05d8a8c1e3b49ec38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:56:47 +01:00
Henry Kleynhans
3579782a44 sstate: Switch to ZStandard compressor support
This patch switches the compressor from Gzip to ZStandard for ssate cache
files.

Zstandard compression provides a significant improvement in
decompression speed as well as improvement in compression speed and disk
usage over the 'tgz' format in use.  Furthermore, its configurable
compression level offers a trade-off between time spent compressing
sstate cache files and disk space used by those files.  The reduced disk
usage also contributes to saving network traffic for those sharing their
sstate cache with others.

Zstandard should therefore be a good choice when:
* disk space is at a premium
* network speed / resources are limited
* the CI server can sstate packages can be created at high compression
* less CPU on the build server should be used for sstate decompression

(From OE-Core rev: 0710e98f40ec7394567ede1f88f7c7bae306b925)

Signed-off-by: Henry Kleynhans <hkleynhans@fb.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 22:37:43 +01:00
Alexandre Belloni
dae4a4e27a oeqa/selftest/sstatetests: fix typo ware -> were
(From OE-Core rev: c94a9ece226b1d2012f5ee966b81bf607d954937)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-11 18:41:39 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Alexander Kanavin
06413d33b3 oeqa/selftest: transition to weston images
For readonly rootfs tests core-image-weston
is appended; everywhere else it replaces core-image-sato.

(From OE-Core rev: 75e042db853b9bf9a70ff8a5abe6d45ebb0b77a9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27 15:11:47 +01:00
Richard Purdie
05aabd3744 oeqa/selftest/sstatetests: Avoid polluting DL_DIR
Every selftest run is currently polluting the autobuilder DL_DIR. Avoid
this by using a temporary directory for the test which is cleaned up.

(From OE-Core rev: 002d321e02b3ce4f34c8a54211b109a5416c8a0e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12 12:21:48 +01:00
Mike Crowe
c1ad30fd80 multilib.conf: Ensure that RECIPE_SYSROOT is unchanged for native
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>
2019-12-30 23:39:10 +00:00
Richard Purdie
2cca43e060 oeqa/selftest/sstatetests: Ensure we don't use hashequiv for sstatesigs tests
(From OE-Core rev: 6af559467f869afabad16cd84ae1af4bc7af0950)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-22 23:13:06 +00:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
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>
2019-05-09 16:31:55 +01:00
Richard Purdie
c7592b0147 oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test
names to definitively reference tests and the IDs can be dropped, along with their
supporting code.

(From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
e1e38c9bd1 lib/oe,oeqa/selftest: Fix DeprecationWarning: invalid escape sequence
Fix another load of regex escape sequence warnings for newer
python versions.

(From OE-Core rev: bd2c125bb9c362b6122e99dfdf4e1cfe12c26a90)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-16 08:19:34 +00:00
Kai Kang
94918d5c58 sstatetests.py: reset TCLIBCAPPEND
It appends TCLIBCAPPEND to TMPDIR in meta/conf/distro/defaultsetup.conf:

  TMPDIR .= "${TCLIBCAPPEND}"

It affects some oe selftest cases in sstatetests.py. Reset TCLIBCAPPEND
for these cases.

(From OE-Core rev: 4549c9dd96be8db69d520f66f4507939df9e9587)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-16 20:35:43 +01:00
Kai Kang
50b2d1679f statetests.py: drop test_sstate_allarch_samesigs_multilib
allarch is disabled when multilib is used, so sstate oeqa case
test_sstate_allarch_samesigs_multilib is useless. Remove check for
allarch part and rename to test_sstate_nativesdk_samesigs_multilib.

(From OE-Core rev: 32fe47ea0aea791357d3045c202cdad86b16f2ff)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13 07:42:28 +01:00
Ross Burton
1bcbe159aa sstatetests: pass the right files when comparing sigfiles
(From OE-Core rev: 65cc20690e7827df3d84ebea6357eebabb668f50)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24 10:31:48 +00:00
Richard Purdie
3ab6e17ffe bitbake.conf: Set AUTOREV to have a vardepvalue
If you have a recipe which does not include SRCPV in PV but does set
SRCREV = "${AUTOREV}" and you run do_fetch, then change the repo to a
new commit then run do_unpack, do_unpack will fail since the new commit
doesn't exist in the repo that was fetched.

The problem is the revision chosen is not represented in the do_fetch
task hash. It if were, the fetch would rerun first and the commit would be
present. It works when PV includes SRCPV since that does contain the chosen
commit from the AUTOREV.

The solution is to include the SRCPV value into the representation of AUTOREV
used for checksum calculation purposes.

Add a selftest for this issue.

(From OE-Core rev: 7b8ee9285a197784d51e339f1603240f49435846)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06 22:32:22 +00:00
Leonardo Sandoval
d6823e947b sstatetests: limit the number of signature comparisons when differ
For perfomance reasons, limit the number of signature comparisons when
stamps differ. The limit set is hardcoded to 20.

[YOCTO #11651]

(From OE-Core rev: a2e2f434cd8d68b69e1ccdb7d7c17c0c73289866)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-13 09:27:38 +01:00
Leonardo Sandoval
d97b2bdb0b sstatetests: Use python function instead of bitbake-diffsigs script
Using a python function instead of launching a subprocess fasten the
diffsigs computation.

[YOCTO #11651]

(From OE-Core rev: 5dd65cf50273519fa45bd056b9ff342d9984a382)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-09 09:24:15 +01:00
Jose Perez Carranza
ab0780dfea selftest: Add Testopia ID to test cases
Add decorator @OETestID() with proper Tesopia TC ID to the test cases
that did not have it set.

(From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Richard Purdie
5db4d0dbbb selftest/sstatetests: Fix potential failure on uniprocessor machines
It was pointed out +1 is safer than -1 for systems with one processor.

(From OE-Core rev: 78041e20e43d9583448ff31f8b9b1c6157da8625)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14 11:56:09 +01:00
Richard Purdie
891b5ee2ee sstatetests: Use higher parallelism value
Since the processing code for signature generation is now threaded,
use higher thread values as examples in this code for better performance.

(From OE-Core rev: f68ec7191546474f0bd688e57d2381a8e92be617)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14 10:18:28 +01:00
Leonardo Sandoval
157c3be2ca oeqa/selftest/cases: Migrate test cases into the new oe-qa framework
New framework has different classes/decorators so adapt current test cases to
support these. Changes include changes on base classes and decorators.

Also include paths in selftest/__init__.py isn't needed because the
loader is the standard unittest one.

(From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-06 19:02:43 +01:00