Subversion Repositories HomeAutomation

Rev

Rev 809 | Rev 830 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

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