Dan Willemsen | 0df1517 | 2017-05-07 11:23:59 -0700 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 2 | # |
| 3 | # Copyright 2017 Google Inc. All rights reserved. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # |
| 18 | # This file is used in our continous build infrastructure to run a variety of |
| 19 | # tests related to the build system. |
| 20 | # |
| 21 | # Currently, it's used to build and run multiproduct_kati, so it'll attempt |
| 22 | # to build ninja files for every product in the tree. I expect this to |
| 23 | # evolve as we find interesting things to test or track performance for. |
| 24 | # |
| 25 | |
| 26 | # To track how long we took to startup. %N isn't supported on Darwin, but |
| 27 | # that's detected in the Go code, which skips calculating the startup time. |
| 28 | export TRACE_BEGIN_SOONG=$(date +%s%N) |
| 29 | |
| 30 | export TOP=$(cd $(dirname ${BASH_SOURCE[0]})/../..; PWD= /bin/pwd) |
Dan Willemsen | 91f9b54 | 2017-07-18 19:39:34 -0700 | [diff] [blame] | 31 | source "${TOP}/build/soong/scripts/microfactory.bash" |
Dan Willemsen | 0df1517 | 2017-05-07 11:23:59 -0700 | [diff] [blame] | 32 | |
Dan Willemsen | e7efcbe | 2017-06-20 23:27:45 -0700 | [diff] [blame] | 33 | case $(uname) in |
| 34 | Linux) |
| 35 | export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so |
| 36 | ;; |
| 37 | esac |
| 38 | |
Dan Willemsen | 91f9b54 | 2017-07-18 19:39:34 -0700 | [diff] [blame] | 39 | soong_build_go multiproduct_kati android/soong/cmd/multiproduct_kati |
Dan Willemsen | 0df1517 | 2017-05-07 11:23:59 -0700 | [diff] [blame] | 40 | exec "$(getoutdir)/multiproduct_kati" "$@" |