Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tools/presubmit.sh

Issue 8343061: dartc is no longer a valid build architecture, use ia32 instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 # A quick check over a subset the tests in the runtime, compiler 8 # A quick check over a subset the tests in the runtime, compiler
9 # and client directories. 9 # and client directories.
10 10
(...skipping 14 matching lines...) Expand all
25 echo " --optimize: Also run dartc and client tests in release mode" 25 echo " --optimize: Also run dartc and client tests in release mode"
26 echo " --dartium : Also run dartium/debug tests" 26 echo " --dartium : Also run dartium/debug tests"
27 echo 27 echo
28 } 28 }
29 29
30 # Compile the vm/runtime 30 # Compile the vm/runtime
31 # $1 directory to build in 31 # $1 directory to build in
32 # $2 arch 32 # $2 arch
33 # $3 mode 33 # $3 mode
34 function doBuild { 34 function doBuild {
35 cd $1 35 ./tools/build.py --arch $1 --mode $2
36 ../tools/build.py --arch $2 --mode $3
37 if [ $? != 0 ] ; then 36 if [ $? != 0 ] ; then
38 echo "Build of $1 failed" 37 echo "Build of $1 - $2 failed"
39 exit 1 38 exit 1
40 fi 39 fi
41 cd ..
42 } 40 }
43 41
44 # Execute a set of tests 42 # Execute a set of tests
45 # $1 directory to test in 43 # $1 directory to test in
46 # $2 arch 44 # $2 arch
47 # $3 mode 45 # $3 mode
48 # Returns the output from the subcommand 46 # Returns the output from the subcommand
49 function doTest { 47 function doTest {
50 cd $1 48 ./tools/test.py --arch $2 --mode $3
51 ../tools/test.py --arch $2 --mode $3
52 RESULT=$? 49 RESULT=$?
53 cd ..
54 if [ ${RESULT} != 0 ] ; then 50 if [ ${RESULT} != 0 ] ; then
55 TESTS_FAILED=1 51 TESTS_FAILED=1
56 fi 52 fi
57 return ${RESULT} 53 return ${RESULT}
58 } 54 }
59 55
60 # Main 56 # Main
61 57
62 while [ ! -z "$1" ] ; do 58 while [ ! -z "$1" ] ; do
63 case $1 in 59 case $1 in
(...skipping 16 matching lines...) Expand all
80 shift 76 shift
81 done 77 done
82 78
83 if [ ! -d compiler -o ! -d runtime -o ! -d tests ] ; then 79 if [ ! -d compiler -o ! -d runtime -o ! -d tests ] ; then
84 echo "This doesn't look like the dart source tree." 80 echo "This doesn't look like the dart source tree."
85 echo "Change your directory to the dart trunk source" 81 echo "Change your directory to the dart trunk source"
86 exit 1 82 exit 1
87 fi 83 fi
88 84
89 echo 85 echo
90 echo "--- Building runtime ---" 86 echo "--- Building release ---"
91 doBuild runtime ia32 release 87 doBuild ia32 release
92 88
93 echo 89 echo
94 echo "--- Building compiler ---" 90 echo "--- Building debug ---"
95 doBuild compiler ia32 debug 91 doBuild ia32 debug
96 92
97 if [ ${DO_OPTIMIZE} == 1 ] ; then
98 # echo "Syncing compiler debug build to release"
99 # rsync -a out/Debug_ia32 out/Release_ia32
100 doBuild compiler ia32 release
101 fi
102 93
103 # TODO(zundel): Potential shortcut: don't rebuild all of dartc again.
104 # Tried using rsync, but it doesn't work - client rebuilds anyway
105 94
106 # Build in client dir
107 echo 95 echo
108 echo "--- Building client ---" 96 echo "=== Runtime tests === "
109 doBuild client ia32 debug 97 echo " Debug (Ctrl-C to skip this set of tests)"
110 98 doTest runtime ia32 debug
111 if [ ${DO_OPTIMIZE} == 1 ] ; then 99 RUNTIME_RESULT=$?
112 # echo "Syncing client debug build to release" 100 if [ ${RUNTIME_RESULT} == 0 ] ; then
113 # rsync -a out/Debug_ia32 out/Release_ia32 101 echo " Release (Ctrl-C to skip this set of tests)"
114 doBuild client ia32 release 102 doTest runtime ia32 release
103 RUNTIME_RESULT=$?
115 fi 104 fi
116 105
117 106
118 echo 107 echo
119 echo "=== Runtime tests === "
120 doTest runtime ia32 release
121 RUNTIME_RESULT=$?
122
123
124 echo
125 echo "=== Compiler tests ===" 108 echo "=== Compiler tests ==="
126 echo " Debug mode (Ctrl-C to skip this set of tests)" 109 echo " Debug mode (Ctrl-C to skip this set of tests)"
127 doTest compiler dartc debug 110 doTest compiler dartc debug
128 COMPILER_RESULT=$? 111 COMPILER_RESULT=$?
129 112
130 if [ ${DO_OPTIMIZE} == 1 ] ; then 113 if [ ${DO_OPTIMIZE} == 1 ] ; then
131 echo " Release mode (--optimize) (Ctrl-C to skip this set of tests)" 114 echo " Release mode (--optimize)"
132 doTest compiler dartc release 115 doTest compiler dartc release
133 RESULT=$? 116 RESULT=$?
134 if [ ${RESULT} != 0 ] ; then 117 if [ ${RESULT} != 0 ] ; then
135 COMPILER_RESULT=${RESULT} 118 COMPILER_RESULT=${RESULT}
136 fi 119 fi
137 fi 120 fi
138 121
139 echo 122 echo
140 echo "=== Client tests ===" 123 echo "=== Client tests ==="
141 echo " Chromium (Ctrl-C to skip this set of tests)" 124 echo " Chromium (Ctrl-C to skip this set of tests)"
142 doTest client chromium debug 125 doTest client chromium debug
143 CLIENT_RESULT=$? 126 CLIENT_RESULT=$?
144 127
145 if [ ${DO_OPTIMIZE} == 1 ] ; then 128 if [ ${DO_OPTIMIZE} == 1 ] ; then
146 echo " Chromium Release mode (--optimize) (Ctrl-C to skip this set of tests)" 129 echo " Chromium Release mode (--optimize)"
147 doTest compiler chromium release 130 doTest compiler chromium release
148 RESULT=$? 131 RESULT=$?
149 if [ ${RESULT} != 0 ] ; then 132 if [ ${RESULT} != 0 ] ; then
150 CLIENT_RESULT=${RESULT} 133 CLIENT_RESULT=${RESULT}
151 fi 134 fi
152 fi 135 fi
153 136
154 if [ ${DO_DARTIUM} == 1 ] ; then 137 if [ ${DO_DARTIUM} == 1 ] ; then
155 echo " Dartium (Ctrl-C to skip this set of tests)" 138 echo " Dartium (Ctrl-C to skip this set of tests)"
156 doTest client dartium release 139 doTest client dartium release
(...skipping 12 matching lines...) Expand all
169 echo "*** Compiler tests failed" 152 echo "*** Compiler tests failed"
170 fi 153 fi
171 154
172 if [ ${CLIENT_RESULT} != 0 ] ; then 155 if [ ${CLIENT_RESULT} != 0 ] ; then
173 echo "*** Client tests failed" 156 echo "*** Client tests failed"
174 fi 157 fi
175 158
176 if [ ${TESTS_FAILED} == 0 ] ; then 159 if [ ${TESTS_FAILED} == 0 ] ; then
177 echo "All presubmit tests passed!" 160 echo "All presubmit tests passed!"
178 fi 161 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698