Commit Graph

9 Commits

Author SHA1 Message Date
Maxime Ripard f2a9942fbc tests: Introduce DT overlay tests
This adds a bunch of unit tests for the "fdt apply" command.

They've all been run successfully in the sandbox. However, as you still
require an out-of-tree dtc with overlay support, this is disabled by
default.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-08-20 11:35:07 -04:00
Vagrant Cascadian eae4b2b67b Fix spelling of "occurred".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-02 18:37:09 -04:00
Simon Glass 85aeda4a62 test: Add a macro to check that a value is not an error pointer
Some functions can return ERR_PTR(errval). Add a unit test macro to check
that no error is returned in a pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:33 -06:00
Joe Hershberger 421f86f329 test: env: Add test framework for env
Add a new "env" subcommand to the ut command.

This will run unit tests on the env code. This should be targetable to
any device that supports the env features needed for the tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:18 -04:00
Joe Hershberger fe3f6a65fe test: Return values from the asserts compatible with cmds
The asserts are sometimes called from the context of the test command
itself so make sure that a return that happens as a result of a failure
is compatible with that command return. When called within a test, the
return value is ignored.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:18 -04:00
Joe Hershberger c812f722f8 test: dm: Move the time test over to the ut command
Unify the command for running unit tests further by moving the "ut_time"
command over to "ut time".

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-21 09:16:17 -04:00
Joe Hershberger 40441e0bd3 test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test"
command over to "ut dm".

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:17 -04:00
Joe Hershberger c617ede08a test: Add a common unit test command
Add a command that all other unit tests should be a sub-command of.
Also include a command that will run all tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:17 -04:00
Joe Hershberger e721b882e9 test: Generalize the unit test framework
Separate the ability to define tests and assert status of test functions
from the dm tests so they can be used more consistently throughout all
tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:16 -04:00