Commit Graph

32 Commits

Author SHA1 Message Date
Richard Purdie 3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Richard Purdie 8587bce564 classes/lib: Update to match python3 iter requirements
python3 standardises its use of iteration operations. Update
the code to match the for python3 requires.

(From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie ca2edae7c3 oeqa: Print function python3 fixes
Use print functions for comptibility with python3.

(From OE-Core rev: 0c89a8a276b67a9292ee3100003c789126bd9ea9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-16 08:13:11 +01:00
Ross Burton f22380e693 oeqa/sstatetests: remove temporary DL_DIRs in noop_samesigs
(From OE-Core rev: a98acf4840fc4888c0f4b8998a0a3983c639ecc2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:45 +01:00
Ross Burton 19d8760032 oeqa/sstatetests: add http_proxy to no-op hash test
Add two values for http_proxy to verify that changing it doesn't change any
unexpected tasks.

As this causes uninative to fail to fetch, ensure that uninative is always
disabled.

(From OE-Core rev: 7d8ffd22303a5b89cb129e804c124a2d1dedf9ab)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:45 +01:00
Ross Burton 76f4bbc30e oeqa/selftest/sstatetests: fix no-op sstate test
The test to verify that certain classes when inherited were no-ops only passed
if the build already inherited buildhistory.

To ensure that the test works as expected, use INHERITS_remove to ensure that
the classes are not inherited in the base run.

(From OE-Core rev: fc90c5db45933369b8fc0a33d6238876f5e5a087)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:43 +01:00
Ross Burton 85dbd7bf9e oeqa/selftest/sstatetests: split 32/64 build host from no-op action tests
As more variables were being added it made sense to split this test into two:
one quick test that verifies that the host being 32-bit or 64-bit doesn't impact
the hashes, and another which compares stamps for two builds with several
variables changed and classes inherited.

(From OE-Core rev: d29ede773fc94da5ff932e0cd306295a8d3871a3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-12 22:50:21 +01:00
Ross Burton f64fdd2734 oeqa/selftest/sstatetests: verify more variables don't impact the hash
Add DL_DIR and TIME to the hash tests.  We can't add DATE for some reason.

(From OE-Core rev: 206a95065628a839c589452de7aa646c90e02f5d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:29 +00:00
Ross Burton 25d2956d97 oeqa/selftest/sstatetests.py: check that PARALLEL_MAKE doesn't change signatures
There are recipes that manage to have sstate signatures that depend on
PARALLEL_MAKE, so verify that changing this variable doesn't change signatures.

(From OE-Core rev: 14e8026cc25394b0a6d1d2063dc36b6b295857e5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:27:48 +00:00
Richard Purdie ecb9c34bbc oeqa: Improve test failure messages
When the test fails, print the incorrect values so aid debugging.

(From OE-Core rev: 115f479ff91347ecb5069e89e193a5c678e7dc35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10 16:06:24 +00:00
Richard Purdie eb53c54675 sstatetests: Fix after change to sstate populate_lic SWSPEC
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9fd214d2e7a931cfb46f40cb76d49aeb07af612e
changed SSTATE_SWSPEC, correctly however it did mean that some sstate files
now appear where the tests don't expect them. Filter the test results
to ignore the correct behaviour.

(From OE-Core rev: e86947bb79a9cb1b59a564ee511739f8a2b2b913)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 17:30:01 +00:00
Ross Burton a6c68d85a9 oeqa/selftest/sstatetests: prettier output for allarch test
Instead of creating two lists of full paths and comparing them which in failure
produces a list of every stamp file (so all tasks, twice), reduce the filename
down to a recipe/task->hash dictionary and compare those, meaning unittest
shows the differences in the dictionaries.

In the future get_files() should be generalised so all tests in this class can
use it, and find a pair of hashes that don't match and run diffsigs on them.

(From OE-Core rev: b612628081b81b50965ae9454df4b2747c6997b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:55:41 +00:00
Daniel Istrate 426a9b78d0 oeqa/selftest: Added testcase decorators.
Added testcase decorators for testopia integration.

(From OE-Core rev: 9c7ffd397c8232d53c87017e58e03e3056863edf)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:28 +00:00
Richard Purdie ff17f14878 oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs
When we change between two machines with the same tune, we shouldn't see
rebuilds of binaries. This adds a test for this using the qemux86copy
machine. We also extend the test to cover multilibs.

(From OE-Core rev: df49d7a0f80673e73f753e8650cd88a086e77245)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:35 +01:00
Richard Purdie 6cfc7c0ce1 oeqa/selftest/sstatetests: Add check for same sigs for SDKMACHINE
Extend one of the sstate tests to also ensure that changing SDKMACHINE doesn't
change the target task checksums.

Also fix a typo and improve debugging by turning the diff filtering off
in all cases (if the test fails, we want to full list).

(From OE-Core rev: 24bb41f273148db023721804b98676a92f9a5f9c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:35 +01:00
Richard Purdie 4727384a74 oeqa/sstatetests: Add test for nativesdk stamp invariance with MACHINE
nativesdk-glbic should not rebuild when you change MACHINE but
it was. We've fixed that, now add tests to ensure this doesn't
happen again.

Rather than add yet another stamps test, extend one of the
existing ones to cover this instead.

(From OE-Core rev: e55b3d88e7a9138f518301a7217f74ba98e979aa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-18 09:05:30 +01:00
Richard Purdie 9bfaf596fb oeqa/sstatettests: Improve output of assert
Currently if this fails you see:

"AssertionError: 1 != 0"

which is useless. Add the output of the failed command so we can stand
some chance of debugging what went wrong.

(From OE-Core rev: e482f9bfddc6b710c9b566c3d3433dc2d7d5a22e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:54 +01:00
Richard Purdie 67ed7c3435 oeqa: Add allarch sstate sig test
"allarch" targets should be MACHINE invariant. This means their sstate
signature should not change regardless of which MACHINE is built.

Errors keep creeping in around this area so automating this as part
of self test seems the best way to maintain this.

The "do_build" stamps are known to differ and are harmless so those
are excluded from the test.

(From OE-Core rev: 9f991103218f6fff67934b51411d31180d5d3e1a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31 00:04:31 +01:00
Richard Purdie d1052050bd oeqa: Optimise sstate tests
We can use "none" here instead of printdiff for some small performance
gains. This also means we can remove the ignore exit code hack which
leads to safer code.

Also drop an unused variable.

(From OE-Core rev: e2b8d6fa45b1ae530be2ffabf48ea61d4c467066)

(From OE-Core rev: dd08ea759294415e7357bd1fb8fcd6d976e4f016)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:36:01 +01:00
Costin Constantin 79e41e39c6 oeqa/sstatetests.py: add annotator to test_sstate_32_64_same_hash [YOCTO #6006]
(From OE-Core rev: a8c05132fc6a20d8b401e1ecaed7f0bd00868b64)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 07:34:07 +01:00
Costin Constantin d1e2d289b1 oeqa/sstatetests.py: add decorator to test_sstate_nativelsbstring_same_hash
(From OE-Core rev: 65d0a9eb205b9bfa7c9466b12e0410257b83765e)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 07:34:07 +01:00
Richard Purdie e9817d59d3 oeqa/sstatetests: Add NATIVELSB sstate signature equivalence test
The sstate checksums should be independent of whichever NATIVELSBSTRING is
detected. Add an automated QA test which tests this using bitbake -S.

To make this possible, we need to be able to override the value of
NATIVELSBSTRING so make a small change to allow this.

(From OE-Core rev: 2da156d491caf25dfa3efd567d6dbb451dd7e9dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:38 +01:00
Richard Purdie 9fa842addc oeqa/sstatetests: Add test for comparing 32 and 64 bit sstate checksums
The sstate checksums for both native and target should not vary whether
they're built on a 32 or 64 bit system. Rather than requiring two different
build machines and running a builds, override the variables calling uname()
manually and check using bitbake -S.

[YOCTO #5970]

(From OE-Core rev: da91637dd6991ae085ce82d932f1053d820b0cc4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:17 +01:00
Khem Raj 573b7436ac oeqa: sstatetests should now look for glibc-initial
(From OE-Core rev: ddc8e7394051c6a2a9cfdab6a9cd39699b7d61a7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 18:03:04 +01:00
Lucian Musat d8364371b2 oeqs/selftest: Added test case decorators for the rest of selftest testcases except toaster
(From OE-Core rev: 3c820db4624a062644a26de1866123a10a78a006)

Signed-off-by: Lucian Musat <georgex.l.musat@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:35 +01:00
Richard Purdie 56a39e9b67 sstatetests: Use TUNE_ARCH instead of TARGET_ARCH
The scripts extact variable values from bitbake -e. Unfortunately
TARGET_ARCH is unset from that environment so we use TUNE_ARCH instead
which will have the value we need.

(From OE-Core rev: b77494025b3d47fd5130ae6c445ac84cabb1f91e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-04 17:37:19 +01:00
Richard Purdie 5459af33b9 sstatetests: Update after binutils-cross name change with PN addition
(From OE-Core rev: c5230b459fb4ef486f657f5633b67ca925981f03)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-04 09:29:23 +01:00
Corneliu Stoicescu 5d63aac6a8 selftest/sstatetests.py: Added 'populate_lic' to ignore_patterns
Because the sstate-cache-management script does not remove populate_lic
sstate files, we should ignore them when checking for removed files.

(From OE-Core rev: 5debc2af6672841c126cec5d747e2e3c6407c8be)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 11:53:51 +01:00
Corneliu Stoicescu 6fab87e128 oe-selftest: Fix test_sstate_cache_management_script*
Fixed tests for sstate-cache-management.sh that ware failing due to:
 - recent changes to sstate-cache structure
 - recent changes to the script itself

(From OE-Core rev: 17b518caf253b77101b357564f8ef9e07961f12c)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-02 17:25:28 +00:00
Corneliu Stoicescu c97d01d5b5 oe-selftest: Patch sstate tests to work with new sstate-cache naming and content
Made modifications to account for:
- .siginfo files present in sstate-cache from non sstate-enabled tasks
- new naming format for sstate files

(From OE-Core rev: d23ad4255ad7465383286fa7805392aa70845ace)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19 16:32:11 +00:00
Corneliu Stoicescu cfd1520b4b oe-selftest: separated the SStateBase and SStateTests in different modules
- SStateBase now has its own module to be imported by itself by other modules like sstatetests.py

(From OE-Core rev: 8163854adf87ac42a8f08ee25685d0ce1efb4724)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16 12:18:52 +00:00
Corneliu Stoicescu 9229f25322 oe-selftest: renamed sstate.py module to sstatetests.py
(From OE-Core rev: 91115cf06b009427a444abfd4cf0317ae5215c6b)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-16 12:18:52 +00:00