From fdca2aa5dd7db2bd2281b7032edbddf31a6f6c00 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 18 Sep 2017 15:22:22 +0200 Subject: [PATCH] build_event_stream_test: simplify quoting ...by quoting the delimiter of the here-documents, instead of the documents themselves. This is possible as the here-documents are constants in that test (not depending on the test setup). Change-Id: If272060ce9f6384821e4bd0bd9033925bd1efe9c PiperOrigin-RevId: 169080394 --- .../integration/build_event_stream_test.sh | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh index f0dc096ca7a12f..56e678207dbcbf 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -40,14 +40,14 @@ EOF exit 1 EOF chmod 755 pkg/false.sh - cat > pkg/slowtest.sh < pkg/slowtest.sh <<'EOF' #!/bin/sh sleep 1 exit 0 EOF chmod 755 pkg/slowtest.sh touch pkg/sourcefileA pkg/sourcefileB pkg/sourcefileC - cat > pkg/BUILD < pkg/BUILD <<'EOF' exports_files(["somesourcefile"]) sh_test( name = "true", @@ -80,7 +80,7 @@ sh_test( genrule( name = "output_files_and_tags", outs = ["out1.txt"], - cmd = "echo foo > \\"\$@\\"", + cmd = "echo foo > \"$@\"", tags = ["tag1", "tag2"] ) action_listener( @@ -104,10 +104,10 @@ filegroup( genrule( name = "not_a_test", outs = ["not_a_test.txt"], - cmd = "touch \$@", + cmd = "touch $@", ) EOF -cat > simpleaspect.bzl < simpleaspect.bzl <<'EOF' def _simple_aspect_impl(target, ctx): for orig_out in ctx.rule.attr.outs: aspect_out = ctx.actions.declare_file(orig_out.name + ".aspect") @@ -119,7 +119,7 @@ def _simple_aspect_impl(target, ctx): simple_aspect = aspect(implementation=_simple_aspect_impl) EOF -cat > failingaspect.bzl < failingaspect.bzl <<'EOF' def _failing_aspect_impl(target, ctx): for orig_out in ctx.rule.attr.outs: aspect_out = ctx.actions.declare_file(orig_out.name + ".aspect") @@ -134,25 +134,25 @@ def _failing_aspect_impl(target, ctx): failing_aspect = aspect(implementation=_failing_aspect_impl) EOF touch BUILD -cat > sample_workspace_status < sample_workspace_status <<'EOF' #!/bin/sh echo SAMPLE_WORKSPACE_STATUS workspace_status_value EOF chmod 755 sample_workspace_status mkdir -p visibility/hidden -cat > visibility/hidden/BUILD < visibility/hidden/BUILD <<'EOF' genrule( name = "hello", outs = ["hello.txt"], - cmd = "echo Hello World > \$@", + cmd = "echo Hello World > $@", ) EOF -cat > visibility/BUILD < visibility/BUILD <<'EOF' genrule( name = "cannotsee", outs = ["cannotsee.txt"], srcs = ["//visibility/hidden:hello"], - cmd = "cp \$< \$@", + cmd = "cp $< $@", ) EOF mkdir -p failingtool