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. |
11 # TODO(vtl) Maybe also provide a way to pass command-line arguments to the test | 11 # TODO(vtl) Maybe also provide a way to pass command-line arguments to the test |
12 # binaries. | 12 # binaries. |
13 | 13 |
14 # We're in src/mojo/tools. We want to get to src. | 14 # We're in src/mojo/tools. We want to get to src. |
15 cd "$(realpath "$(dirname "$0")")/../.." | 15 cd "$(realpath "$(dirname "$0")")/../.." |
16 | 16 |
17 build() { | 17 build() { |
18 ninja -C "out/$1" || exit 1 | 18 ninja -C "out/$1" mojo || exit 1 |
19 } | 19 } |
20 | 20 |
21 unittests() { | 21 unittests() { |
22 "out/$1/mojo_system_unittests" || exit 1 | 22 "out/$1/mojo_system_unittests" || exit 1 |
23 "out/$1/mojo_public_unittests" || exit 1 | 23 "out/$1/mojo_public_unittests" || exit 1 |
24 "out/$1/mojo_bindings_test" || exit 1 | 24 "out/$1/mojo_bindings_test" || exit 1 |
25 } | 25 } |
26 | 26 |
27 perftests() { | 27 perftests() { |
28 "out/$1/mojo_public_perftests" || exit 1 | 28 "out/$1/mojo_public_perftests" || exit 1 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 # character. | 107 # character. |
108 echo alias\ mojob\=\'\"\$\(pwd\ \|\ sed\ \'\"\'\"\'s\/\\\(\.\*\\\/src\\\)\ | 108 echo alias\ mojob\=\'\"\$\(pwd\ \|\ sed\ \'\"\'\"\'s\/\\\(\.\*\\\/src\\\)\ |
109 \.\*\/\\1\/\'\"\'\"\'\)\/mojo\/tools\/mojob\.sh\"\' | 109 \.\*\/\\1\/\'\"\'\"\'\)\/mojo\/tools\/mojob\.sh\"\' |
110 ;; | 110 ;; |
111 *) | 111 *) |
112 echo "Unknown command \"${arg}\". Try \"$(basename "$0") help\"." | 112 echo "Unknown command \"${arg}\". Try \"$(basename "$0") help\"." |
113 exit 1 | 113 exit 1 |
114 ;; | 114 ;; |
115 esac | 115 esac |
116 done | 116 done |
OLD | NEW |