mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
tools/testbuild.sh: Add an option to select the number of CPUs to use with 'make'
This commit is contained in:
+8
-2
@@ -45,10 +45,11 @@ APPSDIR=../apps
|
|||||||
MAKE_FLAGS=-i
|
MAKE_FLAGS=-i
|
||||||
MAKE=make
|
MAKE=make
|
||||||
unset testfile
|
unset testfile
|
||||||
|
unset JOPTION;
|
||||||
|
|
||||||
function showusage {
|
function showusage {
|
||||||
echo ""
|
echo ""
|
||||||
echo "USAGE: $progname [-w|l] [-c|u|n] [-s] [-d] [-x] [-a <apps-dir>] [-t <nuttx-dir><testlist-file>"
|
echo "USAGE: $progname [-w|l] [-c|u|n] [-s] [-d] [-x] [-j <ncpus>] [-a <apps-dir>] [-t <nuttx-dir><testlist-file>"
|
||||||
echo " $progname -h"
|
echo " $progname -h"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Where:"
|
echo "Where:"
|
||||||
@@ -58,6 +59,7 @@ function showusage {
|
|||||||
echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int"
|
echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int"
|
||||||
echo " -d enables script debug output"
|
echo " -d enables script debug output"
|
||||||
echo " -x exit on build failures"
|
echo " -x exit on build failures"
|
||||||
|
echo " -j <ncpus> passed on to make. Default: No -j make option."
|
||||||
echo " -a <appsdir> provides the relative path to the apps/ directory. Default ../apps"
|
echo " -a <appsdir> provides the relative path to the apps/ directory. Default ../apps"
|
||||||
echo " -t <topdir> provides the absolute path to top nuttx/ directory. Default $PWD/../nuttx"
|
echo " -t <topdir> provides the absolute path to top nuttx/ directory. Default $PWD/../nuttx"
|
||||||
echo " -h will show this help test and terminate"
|
echo " -h will show this help test and terminate"
|
||||||
@@ -106,6 +108,10 @@ while [ ! -z "$1" ]; do
|
|||||||
shift
|
shift
|
||||||
APPSDIR="$1"
|
APPSDIR="$1"
|
||||||
;;
|
;;
|
||||||
|
-j )
|
||||||
|
shift
|
||||||
|
JOPTION="-j $1"
|
||||||
|
;;
|
||||||
-t )
|
-t )
|
||||||
shift
|
shift
|
||||||
nuttx="$1"
|
nuttx="$1"
|
||||||
@@ -240,7 +246,7 @@ function build {
|
|||||||
cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
|
cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
|
||||||
echo " Building NuttX..."
|
echo " Building NuttX..."
|
||||||
echo "------------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------------"
|
||||||
${MAKE} ${MAKE_FLAGS} 1>/dev/null
|
${MAKE} ${JOPTION} ${MAKE_FLAGS} 1>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Coordinate the steps for the next build test
|
# Coordinate the steps for the next build test
|
||||||
|
|||||||
Reference in New Issue
Block a user