mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 23:57:46 +00:00
[toranj] add option to build script to enable tests (#4257)
This commit is contained in:
committed by
Jonathan Hui
parent
68d2b8e2f9
commit
aa6318b4dd
@@ -42,6 +42,7 @@ display_usage() {
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -c/--enable-coverage Enable code coverage"
|
||||
echo " -t/--enable-tests Enable tests"
|
||||
echo ""
|
||||
}
|
||||
|
||||
@@ -51,6 +52,7 @@ die() {
|
||||
}
|
||||
|
||||
coverage=no
|
||||
tests=no
|
||||
|
||||
while [ $# -ge 2 ]
|
||||
do
|
||||
@@ -59,6 +61,10 @@ do
|
||||
coverage=yes
|
||||
shift
|
||||
;;
|
||||
-t|--enable-tests)
|
||||
tests=yes
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown option \"$1\""
|
||||
display_usage
|
||||
@@ -76,7 +82,7 @@ build_config=$1
|
||||
|
||||
configure_options=" \
|
||||
--disable-docs \
|
||||
--disable-tests \
|
||||
--enable-tests=$tests \
|
||||
--enable-coverage=$coverage \
|
||||
--enable-ftd \
|
||||
--enable-ncp \
|
||||
@@ -109,7 +115,7 @@ case ${build_config} in
|
||||
--enable-radio-only \
|
||||
--with-examples=posix \
|
||||
--disable-docs \
|
||||
--disable-tests || die
|
||||
--enable-tests=$tests || die
|
||||
make -j 8 || die
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user