Age | Commit message (Collapse) | Author | Files |
|
When checking if a link exists before creating it, use os.path.lexists() as
otherwise os.path.exists() on a broken link will return False.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
updateEnv() can be used in other places so move the
function to utils/commands.py
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
cmdline
Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd
debug log in images that enables systemd init.
[YOCTO #9299]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
A new helper module for easier interaction with Git repositories.
Provides GitRepo class that represents one local Git repository clone.
The GitRepo class currently only has one method, run_cmd(), for running
arbitrary git commands in the repository. More specialized methods for
commonly used git operations can be added later.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Useful if one wants to separate stdout and stderr.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Get rid of duplicate code.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
A new function for getting values of multiple bitbake variables at the
same time.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Some upstreams need more than just gnu-configize ran before ./configure works,
such as ./autogen.sh or autoreconf. Add extra_args (defaulting to
gnu-configize) so that this can be done in test cases.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The re.sub() used to transform a tarball into a best guess folder name wasn't
right, as there isn't enough escaping and tar.xz was missing.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Since the stream can contain invalid binary characters (e.g. from
ppc's bootloader) use surrogateescape decoding to ensure we do process
the character stream, else it can hang/timeout.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
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.
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.
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.
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]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Update older exception syntax to modern one required by python 3.
Compatible with python 2.7.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Found some more syntax cleanups needed for python3.
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.
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]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The algorithm was sub-optimal so replace it with something more elegant.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This new file is encapsulating functionality for both
running tests with binaries support via TestNeedsBin() decorator
and exporting these binaries via testimage.bbclass file.
Addresses [YOCTO #7850], [YOCTO #8478], [YOCTO #8481],
[YOCTO #8536], [YOCTO #8694].
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Due to the neeed to use in other modules.
Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
A network module was added, and will contain network utility funcions for now.
with get_free_port that returns available network port in the system.
Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Added new parameter 'ssh' to targetcontrol 'start' method
to be able to test images without running ssh server.
[YOCTO #8498]
(From OE-Core rev: 1c3c66aadd43092bc19242b0651ee810cc31fe7c)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
QemuRunner requires pair of ip addresses provided through kernel
commandline for method 'start' to work. These ip addresses are
used to connect to the image using ssh and run tests there.
However, this functionality should not be mandatory as testing
doesn't always require ssh connection. Some tests can be run using
serial console.
Added new parameter 'get_ip' to QemuRunner.start to make it possible
to skip getting pair of ip addresses from kernel command line. This
should allow oe-selftest to test images without modifying kernel
command line.
[YOCTO #8498]
(From OE-Core rev: 3f8b734ebb81d035849288091bb0b97b9c4fba34)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed unused parameter 'test' from runqemu function.
(From OE-Core rev: c688b3bcbb57099fa72a9728bc708b109802f7fc)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Bitbake logger stops working after tinfoil.shutdown removes console
handler from it. This makes bb.{error,warn,note,critical} messages
disappear from the console. Adding console handler to bitbake logger
again should fix this issue.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of sourcing /etc/profile to get $PATH including /usr/sbin, just assign
to PATH in the ssh invocation.
The remote /etc/profile may not actually be manipulating PATH as we expect, and
there may be other commands which can interfere with the tests (such as resize
emitting a series of control characters on connection).
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Not everyone wants to run the tests with a qemu that has a graphical output, so
allow display to be None and pass nographic to runqemu in that case.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Sometmes when there is high load in the server the
commands executed in the target take a lot of time
to complete and this lead to incorrect dump files or
empty files. This is caused because run_serial has a
timeout of five seconds when running the commands in
the target.
This change removes the timeout and just keep reading
the socket until it finds the prompt from the target
or when the socket is not ready to be read.
[YOCTO #8510]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Having the timestamps in the log is useful when debugging those cases when
the booting time takes longer than expected. printk.times=1 enables stamping
into every printk Kernel call.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
We need to handle keyword arguments here or sending a keyword argument
to a decorated function that accepts keyword arguments will trigger an
error. (This showed up when testcase decorators were added to the
recipetool.RecipetoolTests.test_recipetool_appendsrcfiles_basic_subdir
test).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This change will show runqemu output in the logs
when running the runtime tests. This is helpful
for debugging testimage errors.
[YOCTO #8550]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
ftools functions that expect data may get 'None'; this patch does this check
and return immediately if this is the case.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
There may be cases where the configuration file (path) does not exist,
thus the remove_from_file should catch this exception. In case the exception
is not the latter (errno.ENOENT), then re-raise it.
[YOCTO #8540]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The current state of qemurunner will drop the Unicode
characters received from qemu, this is because error
report web had problems with Unicode characters; now
that the server support Unicode, it is possible to
log all the output from qemu. So far the only Unicode
character seen is the copyright symbol.
This patch allows to get Unicode characters from the qemu
target and save the log in an UTF-8 file for latter use.
[YOCTO #8225]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This change just add two more commands to
the host dumps to get more information
related to the IO.
[YOCTO #8412]
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>
|
|
When getting the failures/errors/skipped lists, include the
unit test without the full path.
This issue was found on this scenario
| test_1_logrotate_setup (oeqa.runtime.logrotate.LogrotateTest) ... FAIL
| test_2_logrotate (oeqa.runtime.logrotate.LogrotateTest) ... ok
Where test_1_logrotate failed and test_2_logrotate should not have
run because
@skipUnlessPassed("test_1_logrotate_setup")
def test_2_logrotate(self):
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently the output from qemu could contain control
or Unicode characters; having such characters in the
log will cause an internal server error when sending
the report to error reporting web. Control characters
can be found in the command line used to run quemu too.
This change sanitize the output from qemu and the
command line used to run qemu, this way the logs doesn't
contain control or Unicode characters and this will solve
the issue of error reporting web and generate better
logs.
The only Unicode character found in the qemu output
is the copyright symbol, it really doesn't interfer
removing Unicode characters with debugging.
[YOCTO #8225]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When not doing actual tests with testimage, like for example
exporting tests, the link to the log file was still created
although the actual log file was not existent. Fixed it by
moving the link creation part into the run() method.
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
To avoid logs being overwriten when running the automated
tests multiple times, log files include timestamps in
their names and a link is created to point to the latest one.
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
If qemu didn't start correctly, we may not have registered the child
signal. This results in a nasty traceback which confuses the underlying
issue. Cleanup this code and make the handler cleanup conditional.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently if qemu fails when running a selftest and
tries to run some commands on the host it will fail
because some variables required by the Dumper class
do not exist because testimage was not included.
This change adds a default parent directory to save
the dumps for the host or target. Also adds default
commands to run if no commands were provided to the
class. With these changes the previous errors using
selftest don't show anymore.
[YOCTO #8306]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The Starting logging thread message is also executed on run() inside
LoggingThread class.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
LoggingThread is used for receive console output from QEMU
over TCP, so add filter to only wake poll on read events,
also change the event mask variable name to be more descriptive.
This fixes HIGH CPU consume caused by wake on ready to write
events.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Once the DUT is hanged during testing, currently all the following test
cases have to wait for default timeout to exit. Using this decorator the
user can choose a timeout at case by case basis and what happens when the
timeout is reached by overwriting the self.target.restart method.
[YOCTO #7853]
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|