OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This a simple script to make building/testing Mojo components easier (on | 6 # This a simple script to make building/testing Mojo components easier (on |
7 # Linux). | 7 # Linux). |
8 | 8 |
9 # TODO(vtl): Maybe make the test runner smart and not run unchanged test | 9 # TODO(vtl): Maybe make the test runner smart and not run unchanged test |
10 # binaries. | 10 # binaries. |
(...skipping 30 matching lines...) Expand all Loading... |
41 --use-goma - Use goma if \$GOMA_DIR is set or \$HOME/goma exists (default). | 41 --use-goma - Use goma if \$GOMA_DIR is set or \$HOME/goma exists (default). |
42 --no-use-goma - Do not use goma. | 42 --no-use-goma - Do not use goma. |
43 | 43 |
44 Note: It will abort on the first failure (if any). | 44 Note: It will abort on the first failure (if any). |
45 EOF | 45 EOF |
46 } | 46 } |
47 | 47 |
48 do_build() { | 48 do_build() { |
49 echo "Building in out/$1 ..." | 49 echo "Building in out/$1 ..." |
50 if [ "$GOMA" = "auto" -a -v GOMA_DIR ]; then | 50 if [ "$GOMA" = "auto" -a -v GOMA_DIR ]; then |
51 ninja -j 1000 -C "out/$1" mojo || exit 1 | 51 ninja -j 1000 -l 100 -C "out/$1" mojo || exit 1 |
52 else | 52 else |
53 ninja -C "out/$1" mojo || exit 1 | 53 ninja -C "out/$1" mojo || exit 1 |
54 fi | 54 fi |
55 } | 55 } |
56 | 56 |
57 do_unittests() { | 57 do_unittests() { |
58 echo "Running unit tests in out/$1 ..." | 58 echo "Running unit tests in out/$1 ..." |
59 mojo/tools/test_runner.py mojo/tools/data/unittests "out/$1" \ | 59 mojo/tools/test_runner.py mojo/tools/data/unittests "out/$1" \ |
60 mojob_test_successes || exit 1 | 60 mojob_test_successes || exit 1 |
61 } | 61 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 ;; | 229 ;; |
230 --no-use-goma) | 230 --no-use-goma) |
231 GOMA=disabled | 231 GOMA=disabled |
232 ;; | 232 ;; |
233 *) | 233 *) |
234 echo "Unknown command \"${arg}\". Try \"$(basename "$0") help\"." | 234 echo "Unknown command \"${arg}\". Try \"$(basename "$0") help\"." |
235 exit 1 | 235 exit 1 |
236 ;; | 236 ;; |
237 esac | 237 esac |
238 done | 238 done |
OLD | NEW |