Converted str to bytes before sending to socket.
Converted bytes to str after receiving from socket.
This should fix TypeError: 'str' does not support the buffer interface
for qemurunner.run_serial method.
(From OE-Core rev: 210e290c9251839dc74e3aabdcea3655dd707a50)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Iterators now return views, not lists in python3. Where we need
lists, handle this explicitly.
(From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.
(From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If fetching source from a git repository, typically within OpenEmbedded
we encourage setting SRCREV to a fixed revision, so change to do that by
default and add a -a/--autorev option to use "${AUTOREV}" instead.
(From OE-Core rev: 000480c42797dd2f03ebc3bc6d1dabfc6a7b75f5)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sometimes is needed to have a package without extraction when
running a test. This patch adds the functionality.
[YOCTO #8536]
(From OE-Core rev: 49234fe926224c21ef6c8292132620b4716c5263)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This new method extracts the content of package (RPM, DEB, or IPK)
to a directory inside of WORKDIR. The extraction is needed for later
install in the DUTs without using a package manager.
[YOCTO #8694]
(From OE-Core rev: 90d585f59f217f23694a9b02a73b79d18dfdb579)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This adds the functionality to use a json file to
specify the packages needed for a particular test.
The content of the json file is a dictionary with
dictionaries inside, using the test name as the hash.
The json file must have the same name as the class
module name and must be in the same path.
[YOCTO #7850]
(From OE-Core rev: 1f24ef9a339a2ad34e010f39aa93abdc8d085c85)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This new file just contain one function to return an OE package
manager, this depends in the current packaging method.
[YOCTO #8694]
(From OE-Core rev: 9b4b150ccbcd2f7a0b27d083eb406578584af3fa)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The method getTests() can be useful to all the class,
not just to loadTests().
[YOCTO #8694]
(From OE-Core rev: 667a4549bd51a6e4b487006f4cc1542d2961757a)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update older exception syntax to modern one required by python 3.
Compatible with python 2.7.
(From OE-Core rev: d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Used print function instead of print statement to make
the code work in python 3.
[Changes from both Ed and Richard]
(From OE-Core rev: ced1995694c394d92cb82fb9c25a33dc027a3b69)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Having two code paths here makes maintenance difficult, and it doesn't
seem likely that you would use the local case in real usage anyway, so
drop the local support entirely.
This should allow us to resolve [YOCTO #9301].
(From OE-Core rev: 7a4c9c96fee4fb514c2b69b52e811c4f896a16f1)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tested generation of .bmap file using wic --bmap command
line option.
(From OE-Core rev: 1f21c46e517685ff1363d3b6f4fd840300b1930b)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There are parts of the fuctionallity missing when using the
dummy ExportTestContext class in runexported.py.
This changes the use of ExportTestContext dummy class from
runexported.py to the real class in oetest.py.
(From OE-Core rev: b0f105eecf25d334dd5fd0d936ec98cb8430ed23)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pscmd is used by some tests to get the process
running on the target. If the test are exported
there won't be any pscmd attibute in the oeTest.
This adds "ps" as default pscmd.
(From OE-Core rev: 44aa8c3b6747179a0c4c156fc4922d838cdc19a4)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The host dumper is used to get information about the host
running the test when a test fails. This is used for the
autobuilders of Yocto Project.
Now that exported tests have thier own class the host dumper
is not necessary anymore.
(From OE-Core rev: fab3e4865a356ceb73d7deab5b4fd38ed795ca72)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adding the class is needed to separate the exported test
from the test image; both test run under different conditions,
i.e. an exported test doesn't require to change the signal
handling.
This change adds clasess ExportTestContext and ImageTestContext,
both of them inherits from RuntimeTestContext. Also refactors
RuntimeTestContext class, to keep the code common in this class.
(From OE-Core rev: ef9618a6e7f99e485cc6b59484d11807475c7823)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Found some more syntax cleanups needed for python3.
(From OE-Core rev: 1181d86e8707c5b8e8d43d5e785d7d9cf01fa491)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Use print functions for comptibility with python3.
(From OE-Core rev: 0c89a8a276b67a9292ee3100003c789126bd9ea9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We want the decorator to leave the function names of the test unchanged. Some
decorators are already using wraps for this but not all. Fix this to be consistent
allowing inspection of the test to give the wanted values.
(From OE-Core rev: 9e4d60b29ff5667d23a89953ce7139b34c11d40b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Added test_bmap to imagefeatures tests.
It tests if bmap file is generated for the images and
if the image is sparse.
[YOCTO #9414]
(From OE-Core rev: db27d8fbb44d2cdd524ac992630c781fd0c45b1b)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The check now runs at populate_lic time so change this from configure. We
also need to set a SRC_URI so that the check triggers.
(From OE-Core rev: a5970809a2f01dbd152684266e2a3d946d896620)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This patch add new methods to SSHControl class. These methods
include:
- Copy a dir to DUT
- Delete a file in the DUT
- Delete a directory in the DUT (if empty)
- Delete a directory structure in the DUT
[YOCTO #9565]
(From OE-Core rev: f22afb09fefdcb568d79ccd81277a43dacee2a82)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This test is a subset of the new sstate_noop_samesigs test, and less helpful
when it breaks, so remove it.
(From OE-Core rev: 7157261014e1dcbe9a57e7504dbb0ab2a53aa4d8)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
Added output of test runner to bitbake console output.
bitbake <image> -c testimage now reports test progress
to the console:
NOTE: Executing RunQueue Tasks
...
NOTE: recipe core-image-lsb-1.0-r0: task do_testimage: Started
core-image-lsb-1.0-r0 do_testimage: test_ping (oeqa.runtime.ping.PingTest) ... ok
core-image-lsb-1.0-r0 do_testimage: test_ssh (oeqa.runtime.ssh.SshTest) ... ok
...
----------------------------------------------------------------------
core-image-lsb-1.0-r0 do_testimage: Ran 38 tests in 785.100s
core-image-lsb-1.0-r0 do_testimage:
core-image-lsb-1.0-r0 do_testimage: OK (skipped=1)
Adding more output to the console should also prevent autobuilder to kill
long running tests as ab assumes that test is stuck if no console output
produced by it for a long time.
[YOCTO #8238]
(From OE-Core rev: 06aa68138ec67623892221fbe9516bbb3795b48e)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
When installing the esdk with INHERIT += "rm_work", the script complains
about do_rm_work as unexpected output from the bitbake run. This patch
ignores any output lines with do_rm_work and further refactors the
output comparison into its own function creates a new unit test to
verify the fix. The unit test can be run direct from the command line or
via oe-selftest.
[YOCTO #9019]
(From OE-Core rev: d41930e1daa933cf4bf063fa79a2e8fc9129e1b1)
Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
With the changes introduced to test the eSDK
the runexported test failed during the execution.
This change fix runexported test in the least invasive
way, because of the release cycle.
(From OE-Core rev: da0abb9679cb1fd639859a2fdbd82101d0a81259)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
Add a testcase to build a directdisk image and check that the
used disk size is less than the apparent size, as wic now
assembles images as sparse files.
(From OE-Core rev: 2b8299eb6b911e64d9a05b86c07b489d15eeaa5e)
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and
SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace
SIGGEN_LOCKEDSIGS_CHECK_LEVEL.
SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a
warning or error if a task's hash in the locked signature file doesn't match
the computed hash from the current metadata.
SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a
warning or error if a task that supports sstate is in the locked
signature file, but no sstate exists for the task.
Previously you could only have warning/errors for both controlled by
SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk,
because we know sstate won't exist for certain items in the reverse
dependencies list for tasks. However, we still want to error if task
signatures don't match.
[YOCTO #9195]
(From OE-Core rev: 0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a)
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Using PF to calculate the rpm filename doesn't work when PR server is
enabled and an extra PR value can be injected. Add code to use packagedata
to obtain the full name, allowing the test to work when PR server is
in use.
(From OE-Core rev: 322904f62f11e794543362f04212242567c556a0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There appears to have been a lot of copy and pasting of the code
which prints tracebacks upon failure and limits the stack trace to
5 entries. This obscures the real error and is very confusing to the user
it look me an age to work out why some tracebacks weren't useful.
This patch removes the limit, making tracebacks much more useful for
debugging.
[YOCTO #9230]
(From OE-Core rev: 6069175e9bb97ace100bb5e99b6104d33163a3a2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
When systemd is enabled as init we need to notice when circular
dependencies in units happen because systemd try to solve this situation
removing the unit itself.
(From OE-Core rev: 04b8fcc95f339282edc9ab405d0ba0e51dbc1d91)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
BitBake should append to recipe in a predictable order.
fix for [YOCTO #9145]
test for [YOCTO #9138]
(From OE-Core rev: 51bef86ce52fdc2455cd1879e3e19d5ccc5c1c9c)
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Most of wic functionality doesn't depend on .wicenv file,
so it's better to generate it only in test_image_env
test case where it's used.
(From OE-Core rev: caf9b41e1db7b565ef977200195d57b385127de9)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The algorithm was sub-optimal so replace it with something more elegant.
(From OE-Core rev: 6119a90173f9222efa6df25aacf873af85d64bcd)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We need the wic env files to be available and this no longer happens automatically
so ensure we have them by specifying a specific task dependency.
(From OE-Core rev: 15e10957a0c9f65eaa119f8cb4f817c2fe3d580f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Now that make/remake needs a PREFERRED_PROVIDER, we need to set this
correctly during tests.
(From OE-Core rev: 1a41953331f42d69c0201dcfcbb7d8dc12422fde)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(From OE-Core rev: ce14964d99741f1a4579bae18da5013498c365fd)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
When we add from a fetched URL we are supposed to turn the resulting
source tree into a git repository (if it isn't already one). However, we
were using the older deprecated option name here instead of the
positional argument, so "devtool add -f <url>" resulted in the repo
being created but "devtool add <url>" didn't, which was wrong.
Also update the oe-selftest tests to check that this worked.
(From OE-Core rev: a7b6b1f8cc1c096724f794ac9dee312b0f771f66)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds intel-corei7-64 with x86-common, this makes the x86-common
whitelist available for intel-corei7-64 bsp also.
[YOCTO #9179]
(From OE-Core rev: 34e7292fb40635cee1f1237ac3156530f8dfce37)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This message appears on older hardware and is a benign warning
[YOCTO #9179]
(From OE-Core rev: e941853e3dd9e498dcf486686d30cd07d65d83fb)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>