tools/testbuild.sh: Add an optional step to run NuttX
I plan to use this to run sim:ostest (and probably other tests later) on the CI. The script indirection might allow future non-sim usage as well. (like running it with qemu, or even on the real hardware.) I have no plan to do it by myself right now though.
This commit is contained in:
parent
e5d7179e4c
commit
3aa83d6146
|
@ -1008,6 +1008,7 @@ testbuild.sh
|
|||
* This assumes that only nuttx and apps repos need to be cleaned.
|
||||
* If the tree has files not managed by git, they will be removed
|
||||
as well.
|
||||
-R execute "run" script in the config directories if exists.
|
||||
-h will show this help test and terminate
|
||||
<testlist-file> selects the list of configurations to test. No default
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ PRINTLISTONLY=0
|
|||
GITCLEAN=0
|
||||
SAVEARTIFACTS=0
|
||||
CHECKCLEAN=1
|
||||
RUN=0
|
||||
|
||||
case $(uname -s) in
|
||||
Darwin*)
|
||||
|
@ -77,6 +78,7 @@ function showusage {
|
|||
echo " * This assumes that only nuttx and apps repos need to be cleaned."
|
||||
echo " * If the tree has files not managed by git, they will be removed"
|
||||
echo " as well."
|
||||
echo " -R execute \"run\" script in the config directories if exists."
|
||||
echo " -h will show this help test and terminate"
|
||||
echo " <testlist-file> selects the list of configurations to test. No default"
|
||||
echo ""
|
||||
|
@ -128,6 +130,9 @@ while [ ! -z "$1" ]; do
|
|||
-C )
|
||||
CHECKCLEAN=0
|
||||
;;
|
||||
-R )
|
||||
RUN=1
|
||||
;;
|
||||
-h )
|
||||
showusage
|
||||
;;
|
||||
|
@ -276,6 +281,18 @@ function build {
|
|||
return $fail
|
||||
}
|
||||
|
||||
function run {
|
||||
if [ ${RUN} -ne 0 ]; then
|
||||
run_script="$path/run"
|
||||
if [ -x $run_script ]; then
|
||||
echo " Running NuttX..."
|
||||
if ! $run_script; then
|
||||
fail=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
return $fail
|
||||
}
|
||||
# Coordinate the steps for the next build test
|
||||
|
||||
function dotest {
|
||||
|
@ -330,6 +347,7 @@ function dotest {
|
|||
distclean
|
||||
configure
|
||||
build
|
||||
run
|
||||
}
|
||||
|
||||
# Perform the build test for each entry in the test list file
|
||||
|
|
Loading…
Reference in New Issue