Handles drivers with spaces in their names, and simplify slightly by
using globbing to unwrap the bus for loop.
It's necessary to add the final '*' in the "for driver in" loop in
bootrr-generate-template on POSIX sh.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Typical use of assert_device_present is to first assert_driver_present
and then check for the individual devices. Let the driver check fail and
report any of the device tests as blocked if the driver is not present.
This makes it clearer in the output that a device test failed due to the
lack of the driver, rather than some other aspect.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
The 'source' command is a bashism, and not in the POSIX standard. So
it fails when using POSIX compliant shell such as Dash which is the
default on Debian. Using the '.' command is equivalent to using
source, and is POSIX compliant.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
The helpers assume that bootrr script is located in /usr/bin, which is
not always the case, especially when one needs to run the test locally
from the git tree.
'source' command will search for files using $PATH. When bootrr
scripts are installed globally using 'make install' they will be
found. When running them from a local folder, setting PATH to include
<bootrr>/helpers will ensure that all scripts will be found.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Move the common functions to a helper and use this from
assert_device_present.
Make assert_device_present accept a fourth parameter for a timeout,
which will cause the assert to wait for the given amount of time for the
device to appear.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>