dbuild: Support build test option
Support build test in dbuild to allow users to check build errors before pushing commits
@@ -105,6 +105,7 @@ function SELECT_OPTION()
if [ "${STATUS}" == "BUILT" ]; then
echo " \"d. Download\""
fi
+ echo " \"t. Build Test\""
echo " \"x. Exit\""
echo ======================================================
read SELECTED_START
@@ -132,7 +133,6 @@ function SELECT_OPTION()
6|smartfs)
BUILD smartfs
;;
-
d|download)
if [ "${STATUS}" == "BUILT" ]; then
STATUS=PREPARE_DL
@@ -140,6 +140,9 @@ function SELECT_OPTION()
echo "No output file"
fi
;;
+ t|test)
+ BUILD_TEST
+ ;;
x|exit)
exit 1
;;
@@ -154,6 +157,14 @@ function SELECT_OPTION()
fi
}
+function BUILD_TEST()
+{
+ # excute a shell script for build test
+ pushd ${OSDIR} > /dev/null
+ docker run --rm ${DOCKER_OPT} -v ${TOPDIR}:/root/tizenrt -w /root/tizenrt/os --privileged tizenrt/tizenrt:${DOCKER_VERSION} bash -c "./tools/build_test.sh"
+ popd > /dev/null
+}
+
function SELECT_BOARD()
{
unset BOARD
@@ -194,11 +205,18 @@ function SELECT_BOARD()
BOARDNAME_STR[${IDX}]=${BOARDNAME_MEMBER}
((IDX=IDX+1))
done
+ echo " \"t. BUILD TEST\""
echo " \"x. EXIT\""
echo ======================================================
read SELECTED_BOARD
fi
+ # treate "test"
+ if [ "${SELECTED_BOARD}" == "t" -o "${SELECTED_BOARD}" == "test" -o "${SELECTED_BOARD}" == "TEST" ]; then
+ BUILD_TEST
+ exit 1
+ fi
+
# treate "exit"
if [ "${SELECTED_BOARD}" == "x" -o "${SELECTED_BOARD}" == "exit" -o "${SELECTED_BOARD}" == "EXIT" ]; then
exit 1
