summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@embedded-test.org>2015-11-18 15:13:57 +0100
committerWaldemar Brodkorb <wbx@embedded-test.org>2015-11-18 15:13:57 +0100
commit113a676f9bb3bfa4762896f5e8ac999513104d06 (patch)
treeb14c36d2df16fd88f173eff46500d11b55f5fa4e
parent14899f4f746f23b3bb644e56892d58fa8ab6dc64 (diff)
allow to clean only single system, avoid continue which is a keyword in shell
-rwxr-xr-xembedded-test.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/embedded-test.sh b/embedded-test.sh
index 7a906a7..12d5618 100755
--- a/embedded-test.sh
+++ b/embedded-test.sh
@@ -64,7 +64,8 @@ Explanation:
--packages=<packagelist> add extra packages to the build
--update update OpenADK source via git pull, before building
--continue continue on a broken build
- --clean clean OpenADK build directory before build
+ --cleandir clean OpenADK build directories before build
+ --clean clean OpenADK build directory for single arch
--debug enable debug output from OpenADK
--shell start a shell instead auf autorun of test
--help this help text
@@ -72,8 +73,9 @@ EOF
exit 1
}
-continue=0
+cont=0
clean=0
+cleandir=0
shell=0
update=0
debug=0
@@ -82,10 +84,11 @@ ntp=""
libc=""
while [[ $1 != -- && $1 = -* ]]; do case $1 {
+ (--cleandir) cleandir=1; shift ;;
(--clean) clean=1; shift ;;
(--debug) debug=1; shift ;;
(--update) update=1; shift ;;
- (--continue) continue=1; shift ;;
+ (--continue) cont=1; shift ;;
(--shell) shell=1 shift ;;
(--libc=*) libc=${1#*=}; shift ;;
(--arch=*) archs=${1#*=}; shift ;;
@@ -512,8 +515,6 @@ build() {
cd openadk
make prereq
- make package=$lib clean > /dev/null 2>&1
-
DEFAULT="ADK_TARGET_LIBC=$lib"
if [ $debug -eq 1 ];then
DEFAULT="$DEFAULT ADK_VERBOSE=1"
@@ -773,8 +774,8 @@ for lib in ${libc}; do
fi
# start with a clean dir
- if [ $clean -eq 1 ]; then
- echo "cleaning openadk build directory"
+ if [ $cleandir -eq 1 ]; then
+ echo "completely cleaning openadk build directory"
(cd openadk && make cleandir)
fi
if [ ! -z "$tests" ];then
@@ -785,7 +786,7 @@ for lib in ${libc}; do
echo "Summary: testing $archlist with C library $lib and $testinfo"
sleep 2
for arch in ${archlist}; do
- if [ $continue -eq 1 ]; then
+ if [ $cont -eq 1 ]; then
if [ -f "REPORT.${arch}.${tests}.${libver}" -o -f "REPORT.${arch}.toolchain.${libver}" ]; then
echo "Skipping already run test for $arch"
continue
@@ -795,6 +796,10 @@ for lib in ${libc}; do
echo "Skipping $skiparchs"
continue
fi
+ if [ $clean -eq 1 ]; then
+ echo "cleaning openadk build directory"
+ (cd openadk && make cleansystem)
+ fi
echo "Compiling base system and toolchain for $lib and $arch"
build $lib $arch notest
echo "$arch with $lib successfully build" > REPORT.${arch}.toolchain.${libver}