aboutsummaryrefslogtreecommitdiff
path: root/include/test
AgeCommit message (Collapse)AuthorFilesLines
2017-06-01dm: test: Fix nit with position of backslashSimon Glass1-1/+1
Line up this backslash with all the others. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: core: Run tests with both livetree and flat treeSimon Glass1-0/+2
Some tests require either livetree or flat tree. Add flags to allow the tests to specify this. Adjust the test runner to run with livetree (if supported) and then flat tree. Some video tests are quite slow and running on flat tree adds little extra test value, so run these on livetree only. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: test: Show the test filename when runningSimon Glass1-0/+2
Show the filename of the test being run. Skip the path and show just the base name. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-20tests: Introduce DT overlay testsMaxime Ripard2-0/+17
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-05-02Fix spelling of "occurred".Vagrant Cascadian1-6/+6
Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2015-07-21test: Add a macro to check that a value is not an error pointerSimon Glass1-0/+15
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-05-21test: env: Add test framework for envJoe Hershberger2-0/+17
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-21test: Return values from the asserts compatible with cmdsJoe Hershberger1-6/+6
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-21test: dm: Move the time test over to the ut commandJoe Hershberger1-0/+1
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-21test: dm: Move the dm tests over to the ut commandJoe Hershberger1-0/+2
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-21test: Add a common unit test commandJoe Hershberger1-0/+11
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-21test: Generalize the unit test frameworkJoe Hershberger2-0/+154
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>