06 Jun, 2017
2 commits
-
Some tests depends on echo command to be present.
Reported-by: Stephen Warren
Signed-off-by: Michal Simek -
All tests in test_hush_if_test depends on hush parser to be
present. This patch simplify test dependencies by using global
pytestmark.Reported-by: Stephen Warren
Signed-off-by: Michal Simek
Acked-by: Stephen Warren
22 May, 2017
1 commit
-
There is missing dependency on echo command. Mark tests which requires
echo.Signed-off-by: Michal Simek
Reviewed-by: Stephen Warren
27 Nov, 2016
4 commits
-
We have all the building blocks now to run arbitrary efi applications
in travis. The most important one out there is grub2, so let's add
a simple test to verify that grub2 still comes up.Signed-off-by: Alexander Graf
-
Today we can compile a self-contained hello world efi test binary that
allows us to quickly verify whether the EFI loader framwork works.We can use that binary outside of the self-contained test case though,
by providing it to a to-be-tested system via tftp.This patch separates compilation of the helloworld.efi file from
including it in the u-boot binary for "bootefi hello". It also modifies
the efi_loader test case to enable travis to pick up the compiled file.
Because we're now no longer bloating the resulting u-boot binary, we
can enable compilation always, giving us good travis test coverage.Signed-off-by: Alexander Graf
Reviewed-by: Tom Rini -
Now that we have working network tests and a hello world efi application
built inside our tree, we can automatically test that efi binary running
inside of U-Boot.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Reviewed-by: Tom Rini -
The network test currently downloads files at 0MB offset of RAM start.
This works for most ARM systems, but x86 has weird memory layout constraints
on the first MB of RAM.To not get caught into any of these, let's add a 4MB pad from start
of RAM to the default memory offset.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Reviewed-by: Tom Rini
22 Nov, 2016
1 commit
-
If a test uses a fixture which is expensive to setup, the fixture can
possibly created with session or module scope. As u_boot_console has
function scope, it can not be used in this case.Signed-off-by: Stefan Brüns
Acked-by: Stephen Warren
24 Oct, 2016
1 commit
-
In pytest 3, runtestprotocol() may not call pytest_runtest_setup() if
the test is skipped. That call is required to create a section for the
test in the log file. If this is skipped, the call to log.end_section()
at the tail of pytest_runtest_protocol() will throw an exception. This
patch ensures that a log section always exists, both to avoid the
exception and to ensure that a consistently structured log file is
always created.Cc: Stefan Brüns
Reported-by: Stefan Brüns
Signed-off-by: Stephen Warren
Tested-by: Tom Rini
15 Oct, 2016
1 commit
-
We can only run this command if the sleep command is enabled and that
depends on CONFIG_CMD_MISCSigned-off-by: Tom Rini
14 Oct, 2016
1 commit
-
Add a NFS download test, based on TFTP test.
Tested on i.MX6 SabreLite board.Signed-off-by: Guillaume GARDET
Cc: Tom Rini
Cc: Joe Hershberger
Cc: Stephen Warren
Cc: Simon Glass
Reviewed-by: Stephen Warren
Acked-by: Joe Hershberger
22 Sep, 2016
1 commit
-
Make sure that when we're telling bootm to boot an image, and we expect
the image to boot we get the output from sandbox that we attempted to
run Linux and that U-Boot completed its job.Cc: Simon Glass
Cc: Stephen Warren
Signed-off-by: Tom Rini
Reviewed-by: Simon Glass
Acked-by: Stephen Warren
21 Aug, 2016
1 commit
-
This prevents capture of command output from terminating early on boards
that use a simple prompt (e.g. "=> ") that appears in the middle of
command output (e.g. crc32's "... ==> 2fa737e0").Reported-by: Tom Rini
Signed-off-by: Stephen Warren
Tested-by: Tom Rini
Reviewed-by: Heiko Schocher
06 Aug, 2016
8 commits
-
Return one string for each command that was executed. This seems cleaner.
Suggested-by: Teddy Reed
Signed-off-by: Simon Glass
Reviewed-by: Stephen Warren -
Add a proper function for this rather than using internal functions. Use it
in the single call site.Also, do a restart at the end of the vboot test to reset to the normal
device tree.Signed-off-by: Simon Glass
Suggested-by: Stephen Warren -
Use 'cons.log.section' feature to split up the test output. This makes it
easier to read.Suggested-by: Stephen Warren
Signed-off-by: Simon Glass
-
Rename this argument and pass it to each function that needs it, instead of
making it global.Suggested-by: Stephen Warren
Suggested-by: Teddy ReedSigned-off-by: Simon Glass
-
Instead of this, use the existing run_and_log() function, enhanced to
support a command string as well as a list of arguments.Suggested-by: Stephen Warren
Signed-off-by: Simon Glass
-
Fix some typos in various files introduced with the vboot test conversion.
Reported-by: Teddy Reed
Signed-off-by: Simon Glass
-
This check was missed. Add it and make the message more verbose.
Signed-off-by: Simon Glass
Reported-by: Tom Rini
Fixes: 9e17b034 (test/py: Provide a way to check that a command fails) -
Fix review comments that were missed at the time. Also explain why we need
to regenerate the device tree for each test.Reported-by: Teddy Reed
Suggested-by: Stephen Warren
Signed-off-by: Simon Glass
Fixes: f6349c3c (test: Add a README)
23 Jul, 2016
2 commits
-
Getting this error:
Zynq> sb load hostfs - 100
/home/monstr/data/disk/u-boot/build-zynq_zc706/test.fit
Unknown command 'sb' - try 'help'because sb command is present only for Sandbox
obj-$(CONFIG_SANDBOX) += host.othat's why mark this test to be run only at Sandbox
Signed-off-by: Michal Simek
Acked-by: Simon Glass -
Without this, the test fails if the test is run with a cwd other than the
root of the U-Boot source tree.Fixes: 8729d582595d ("test: Convert the vboot test to test/py")
Signed-off-by: Stephen Warren
Reviewed-by: Simon Glass
17 Jul, 2016
1 commit
-
This should be spl_of_platdata, since otherwise it will try to run on boards
that don't support of-platdata.Signed-off-by: Simon Glass
15 Jul, 2016
14 commits
-
Add a simple test which checks that the of-platdata system is working
correctly. The sequence is as follows:- SPL starts up and probes all the UCLASS_MISC drivers
- There are 3 of these in sandbox.dts
- Therefore there should be 3 U_BOOT_DEVICE() declarations in dt-platdata.c
- These should produce 3 sandbox_spl_test devices
- Each device prints out its platform data when probed
- This test checks for this output and compares it against expectationsSigned-off-by: Simon Glass
-
When sandbox SPL is enabled we want to start that rather than U-Boot proper,
since some tests may rely on running it first.Signed-off-by: Simon Glass
-
Some tests want to check the console output from SPL or U-Boot proper.
Provide a means to do this.Signed-off-by: Simon Glass
-
At present the SPL and U-Boot consoles both present the same error message
when the expected console output does not appear. Add "SPL" to the SPL error
message to resolve this ambiguity.Signed-off-by: Simon Glass
-
This board can sometimes be used for tests. Handle it the same way as
sandbox.Note: I plan to drop the sandbox_spl board at some point and merge its
features into sandbox. So this commit may not be necessary.Signed-off-by: Simon Glass
-
Now that we have a suitable test framework we should move all tests into it.
The vboot test is a suitable candidate. Rewrite it in Python and move the
data files into an appropriate directory.Signed-off-by: Simon Glass
-
Some tests want to execute a sequence of commands. Add a helper for this.
Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed -
Sometimes we want to run a command and check that it fails. Add a function
to handle this. It can check the return code and also make sure that the
output contains a given error message.Signed-off-by: Simon Glass
-
It is sometimes inconvenient to convert a string into a list for execution
with run_and_log(). Provide a helper function to do this.Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed -
It is useful to be able to obtain the output from a command. Return it from
this function.Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed -
Tests may want to look at the output from running a command, even if it
fails (e.g. with a non-zero return code). Provide a means to obtain this.Another approach would be to return a class object containing both the
output and the exception, but I'm not sure if that would result in a lot
of refactoring.Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed -
Tests may want to look at the output from running a command. Return it so
that this is possible.Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed -
Normally tests will run with the test.dtb file designed for this purpose.
However, the verified boot tests need to run with their own device-tree
file, containing a public key.Make the device-tree file a config option so that it can be adjusted by
tests. The default is to keep the current behaviour.Signed-off-by: Simon Glass
Reviewed-by: Teddy Reed
09 Jul, 2016
2 commits
-
Some archs like MIPS or PPC have a different 'bdinfo' output
than ARM regarding the memory configuration. Also support
'memstart = 0x*' in u_boot_utils.find_ram_base() to make
all tests requiring the RAM base working on those archs.Signed-off-by: Daniel Schwierzeck
Acked-by: Stephen Warren -
Prior to this patch, any VT100 codes emitted by U-Boot are considered part
of a command's output, which often causes tests to fail. For example,
test_env_echo_exists executes printenv, and then considers any text on a
line before an = sign as a valid U-Boot environment variable name. This
includes any VT100 codes emitted. When the test later attempts to use that
variable, the name would be invalid since it includes the VT100 codes.
Solve this by stripping VT100 codes from the match buffer, so they are
never seen by higher level test code.The codes are still logged unmodified, so that users can expect U-Boot's
exact output without interference. This does clutter the log file a bit.
However, it allows users to see exactly what U-Boot emitted rather than a
modified version, which hopefully is better for debugging. It's also much
simpler to implement, since logging happens as soon as text is received,
and so stripping the VT100 codes from the log would require handling
reception and stripping of partial VT100 codes.Signed-off-by: Stephen Warren