Subversion Repositories HomeAutomation

Rev

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