Subversion Repositories HomeAutomation

Rev

Rev 809 | Rev 846 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. #!/bin/bash
  2.  
  3. # Author Erik Larsson
  4. # Date 2008-05-12
  5. #
  6. # This script builds default bios and if successful tries to build all the applications
  7.  
  8.  
  9. PERSONALPATH=$HOME"/svn/HomeAutomation/trunk/EmbeddedSoftware/AVR/personal"
  10. APPLPATH="../../application/"
  11. TESTNODE="nightTestNode"
  12. LOGFILE="results.log"
  13.  
  14. # Put log in separate file
  15. exec &> $LOGFILE
  16.  
  17.  
  18. STARTDATE=`date`
  19. echo "Starting $STARTDATE"
  20.  
  21. #Go to personal nodes
  22. cd $PERSONALPATH
  23.  
  24. if test -e "$TESTNODE"
  25. then
  26.     echo "Directory already exist you fool"
  27.     exit 0
  28. fi
  29.  
  30. echo "Export template to testing node"
  31. svn export template $TESTNODE
  32.  
  33. cd $TESTNODE
  34.  
  35. echo ""
  36. echo "#######################################"
  37. echo "Building BIOS"
  38. echo "#######################################"
  39. echo ""
  40.  
  41. if make bios
  42. then
  43.     echo ""
  44.     echo "#######################################"
  45.     echo "BIOS successful, continues with applications"
  46.     echo "#######################################"
  47.     echo ""
  48. else
  49.     echo ""
  50.     echo "#######################################"
  51.     echo "BIOS failed, stops testing"
  52.     echo "#######################################"
  53.     echo ""
  54.    
  55.     exit 0
  56. fi
  57.  
  58. successful=() # Array for successful builds
  59. failed=() # Array for failed builds
  60.  
  61. for testappl in $APPLPATH*
  62. do
  63.     echo; echo
  64.  
  65.     #with symlinks
  66.     ln -s "$testappl" src
  67.  
  68.     echo ""
  69.     echo "#######################################"
  70.     echo "Building $testappl"
  71.     echo "#######################################"
  72.     echo ""
  73.    
  74.     #get svn info of the application
  75.     cd src
  76.     svn info
  77.     cd ..
  78.    
  79.     # Build application
  80.     if make
  81.     then
  82.         echo ""
  83.         echo "#######################################"
  84.         echo "$testappl successful, continues with next application"
  85.         echo "#######################################"
  86.         echo ""
  87.        
  88.         successfull=( "${successfull[@]}" "$testappl\n" )
  89.  
  90.     else
  91.         echo ""
  92.         echo "#######################################"
  93.         echo "$testappl failed, continues with next application"
  94.         echo "#######################################"
  95.         echo ""
  96.        
  97.         failed=( "${failed[@]}" "$testappl\n" )
  98.     fi
  99.  
  100.     make clean
  101.     rm src
  102.     rm config.inc
  103.    
  104.     continue # On to next application
  105.   echo
  106. done  
  107.  
  108.  
  109. # Remove test node after finished building
  110. cd ..
  111. rm -r "$TESTNODE"
  112.  
  113. ENDDATE=`date`
  114.  
  115. echo ""
  116. echo "#######################################"
  117. echo "Results"
  118. echo
  119. echo "Started $STARTDATE"
  120. echo "Finished $ENDDATE"
  121. echo
  122. echo "Successfull applications:"
  123. echo  -e ${successfull[@]}
  124. echo "Failed applications:"
  125. echo -e ${failed[@]}
  126. echo "#######################################"
  127. echo ""
  128.  
  129. exit 0
  130.  
  131.