Browse Source

rebuild uclibc-ng/mksh before testrun, remove compile function

Waldemar Brodkorb 9 years ago
parent
commit
cf813ba0b1
1 changed files with 16 additions and 15 deletions
  1. 16 15
      embedded-test.sh

+ 16 - 15
embedded-test.sh

@@ -775,20 +775,6 @@ EOF
   fi
   fi
 }
 }
 
 
-compile() {
-  rm .config* .defconfig 2>/dev/null
-  make $1 defconfig
-  for pkg in $packages; do
-    p=$(echo $pkg|tr '[:lower:]' '[:upper:]');printf "ADK_COMPILE_$p=y\nADK_PACKAGE_$p=y" >> .config
-    yes|make oldconfig
-  done
-  if [ $clean -eq 1 ]; then
-    echo "cleaning openadk build directory"
-    make cleansystem
-  fi
-  make $1 all
-}
-
 build() {
 build() {
   lib=$1
   lib=$1
   arch=$2
   arch=$2
@@ -809,11 +795,13 @@ build() {
   fi
   fi
   if [ $test = "mksh" ]; then
   if [ $test = "mksh" ]; then
     DEFAULT="$DEFAULT ADK_TEST_MKSH=y"
     DEFAULT="$DEFAULT ADK_TEST_MKSH=y"
+    REBUILD=.rebuild.mksh
   fi
   fi
   if [ $test = "libc" ]; then
   if [ $test = "libc" ]; then
     case $lib in
     case $lib in
       uclibc-ng)
       uclibc-ng)
         DEFAULT="$DEFAULT ADK_TEST_UCLIBC_NG_TESTSUITE=y"
         DEFAULT="$DEFAULT ADK_TEST_UCLIBC_NG_TESTSUITE=y"
+        REBUILD=.rebuild.uclibc-ng
         ;;
         ;;
       glibc)
       glibc)
         DEFAULT="$DEFAULT ADK_TEST_GLIBC_TESTSUITE=y"
         DEFAULT="$DEFAULT ADK_TEST_GLIBC_TESTSUITE=y"
@@ -851,7 +839,20 @@ build() {
       ;;
       ;;
   esac
   esac
 
 
-  compile "$DEFAULT"
+  rm .config* .defconfig 2>/dev/null
+  make $DEFAULT defconfig
+  for pkg in $packages; do
+    p=$(echo $pkg|tr '[:lower:]' '[:upper:]');printf "ADK_COMPILE_$p=y\nADK_PACKAGE_$p=y" >> .config
+    yes|make oldconfig
+  done
+  if [ $clean -eq 1 ]; then
+    echo "cleaning openadk build directory"
+    make cleansystem
+  fi
+  if [ ! -z $REBUILD ]; then
+    touch $REBUILD
+  fi
+  make $DEFAULT all
   if [ $? -ne 0 ];then
   if [ $? -ne 0 ];then
     echo "build failed"
     echo "build failed"
     exit 1
     exit 1