Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ jobs:
git config --global --add safe.directory /github/workspace/sources/apps
cd sources/nuttx/tools/ci
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
./cibuild.sh -c -A -R --codechecker testlist/${{matrix.boards}}.dat
./cibuild.sh -c -A -N -R --codechecker testlist/${{matrix.boards}}.dat
else
./cibuild.sh -c -A -R testlist/${{matrix.boards}}.dat
./cibuild.sh -c -A -N -R testlist/${{matrix.boards}}.dat
fi

- uses: actions/upload-artifact@v3
Expand Down
34 changes: 22 additions & 12 deletions tools/testbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GITCLEAN=0
SAVEARTIFACTS=0
CHECKCLEAN=1
CODECHECKER=0
NINJACMAKE=0
RUN=0

case $(uname -s) in
Expand All @@ -49,6 +50,9 @@ case $(uname -s) in
MINGW32*)
HOST=MinGw
;;
MSYS*)
HOST=Msys
;;
*)

# Assume linux as a fallback
Expand All @@ -58,10 +62,11 @@ esac

function showusage {
echo ""
echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] [--codechecker] <testlist-file>"
echo " $progname -h"
echo "USAGE: $progname -h [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p]"
echo " [-A] [-C] [-G] [-N] [-R] [--codechecker] <testlist-file>"
echo ""
echo "Where:"
echo " -h will show this help test and terminate"
echo " -l|m|c|g|n selects Linux (l), macOS (m), Cygwin (c),"
echo " MSYS/MSYS2 (g) or Windows native (n). Default Linux"
echo " -d enables script debug output"
Expand All @@ -79,8 +84,8 @@ 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 " -N Use CMake with Ninja as the backend."
echo " -R execute \"run\" script in the config directories if exists."
echo " -h will show this help test and terminate"
echo " --codechecker enables CodeChecker statically analyze the code."
echo " <testlist-file> selects the list of configurations to test. No default"
echo ""
Expand Down Expand Up @@ -132,6 +137,9 @@ while [ ! -z "$1" ]; do
-C )
CHECKCLEAN=0
;;
-N )
NINJACMAKE=1
;;
-R )
RUN=1
;;
Expand Down Expand Up @@ -180,7 +188,7 @@ export APPSDIR
testlist=`grep -v -E "^(-|#)|^[C|c][M|m][A|a][K|k][E|e]" $testfile || true`
blacklist=`grep "^-" $testfile || true`

if [ "X$HOST" == "XLinux" ]; then
if [ ${NINJACMAKE} -eq 1 ]; then
cmakelist=`grep "^[C|c][M|m][A|a][K|k][E|e]" $testfile | cut -d',' -f2 || true`
fi

Expand Down Expand Up @@ -277,7 +285,7 @@ function distclean {
makefunc distclean

# Remove .version manually because this file is shipped with
# the release package and then distclean has to keep it
# the release package and then distclean has to keep it.

rm -f .version

Expand Down Expand Up @@ -495,12 +503,14 @@ function dotest {
done

unset cmake
for l in $cmakelist; do
if [[ "${config/\//:}" == "${l}" ]]; then
echo "Cmake in present: $1"
cmake=1
fi
done
if [ ${NINJACMAKE} -eq 1 ]; then
for l in $cmakelist; do
if [[ "${config/\//:}" == "${l}" ]]; then
echo "Cmake in present: $1"
cmake=1
fi
done
fi

echo "Configuration/Tool: $1"
if [ ${PRINTLISTONLY} -eq 1 ]; then
Expand Down Expand Up @@ -538,7 +548,7 @@ function dotest {
fi

# Perform the build test

echo $(date '+%Y-%m-%d %H:%M:%S')
echo "------------------------------------------------------------------------------------"
distclean
configure
Expand Down