Skip to content

Commit

Permalink
Change awk script to be able to work on MacOS as well (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
yalcinmelihyasin authored Jun 27, 2022
1 parent e00ff4e commit 975812d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kokoro/presubmit/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function run_enumerate_tests() {
TARGETS="$($BAZEL query --deleted_packages=//gapii/fuchsia --output label 'kind(".*_test rule", //...)' | sort -t: -k1,1 | awk '{print " \""$0"\","}')"
OUT=$(mktemp)
cp BUILD.bazel $OUT
cat $OUT | awk -v targets="$TARGETS" 'begin {a=0} /__END_TESTS/ {a=0} { if (a==0) print $0;} /__BEGIN_TESTS/ { a=1; print targets }' > BUILD.bazel
cat $OUT | awk -v "targets=${TARGETS//$'\n'/\\n}" 'begin {a=0} /__END_TESTS/ {a=0} { if (a==0) print $0;} /__BEGIN_TESTS/ { a=1; print targets }' > BUILD.bazel
}

function run_gazelle() {
Expand Down

0 comments on commit 975812d

Please sign in to comment.