kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/cxx/extractor/testdata/run_cxx_bazel_extraction.sh (about) 1 #!/bin/bash -e 2 # Copyright 2016 The Kythe Authors. All rights reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 set -o pipefail 17 18 BAZELOUT="$(bazel info workspace)/bazel-out" 19 bazel build \ 20 --experimental_action_listener=//kythe/extractors:extract_kzip_cxx \ 21 --experimental_extra_action_top_level_only \ 22 --experimental_proto_extra_actions \ 23 :cc_lib 24 25 if [ $? -ne 0 ]; then 26 echo "Build failed" 27 exit 1 28 fi 29 30 # HACK: It is possible that there are other xa files in here. 31 D="$(pwd)" 32 pushd "$BAZELOUT" 33 find . \ 34 -path "*/extra_actions/kythe/cxx/extractor/extra_action/kythe/cxx/extractor/testdata/*.xa" \ 35 -exec cp {} "$D/cc_lib.xa" \; \ 36 && \ 37 chmod 644 "$D/cc_lib.xa" 38 popd