aboutsummaryrefslogtreecommitdiff
path: root/tests/copy_file
diff options
context:
space:
mode:
Diffstat (limited to 'tests/copy_file')
-rw-r--r--tests/copy_file/BUILD8
-rw-r--r--tests/copy_file/a.txt2
-rwxr-xr-xtests/copy_file/a_with_exec_bit.txt2
-rwxr-xr-xtests/copy_file/copy_file_tests.sh10
4 files changed, 12 insertions, 10 deletions
diff --git a/tests/copy_file/BUILD b/tests/copy_file/BUILD
index 79ab7ba..2e6914c 100644
--- a/tests/copy_file/BUILD
+++ b/tests/copy_file/BUILD
@@ -80,8 +80,8 @@ genrule(
output_to_bindir = 1,
tools = [
":bin_gen",
- ":bin_src",
":bin_gen_symlink",
+ ":bin_src",
":bin_src_symlink",
],
)
@@ -147,8 +147,8 @@ copy_file(
name = "copy_xsrc_symlink",
src = "a_with_exec_bit.txt",
out = "xout/a-out-symlink.sh",
- is_executable = True,
allow_symlink = True,
+ is_executable = True,
)
copy_file(
@@ -162,12 +162,12 @@ copy_file(
name = "copy_xgen_symlink",
src = ":gen",
out = "xout/gen-out-symlink.sh",
- is_executable = True,
allow_symlink = True,
+ is_executable = True,
)
genrule(
name = "gen",
outs = ["b.txt"],
- cmd = "echo -e '#!/bin/bash\necho potato' > $@",
+ cmd = "echo -e '#!/usr/bin/env bash\necho potato' > $@",
)
diff --git a/tests/copy_file/a.txt b/tests/copy_file/a.txt
index acd332a..37b2322 100644
--- a/tests/copy_file/a.txt
+++ b/tests/copy_file/a.txt
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo aaa
diff --git a/tests/copy_file/a_with_exec_bit.txt b/tests/copy_file/a_with_exec_bit.txt
index acd332a..37b2322 100755
--- a/tests/copy_file/a_with_exec_bit.txt
+++ b/tests/copy_file/a_with_exec_bit.txt
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo aaa
diff --git a/tests/copy_file/copy_file_tests.sh b/tests/copy_file/copy_file_tests.sh
index dfee635..737afd7 100755
--- a/tests/copy_file/copy_file_tests.sh
+++ b/tests/copy_file/copy_file_tests.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
# Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -40,25 +42,25 @@ source "$(rlocation bazel_skylib/tests/unittest.bash)" \
function test_copy_src() {
cat "$(rlocation bazel_skylib/tests/copy_file/out/a-out.txt)" >"$TEST_log"
- expect_log '^#!/bin/bash$'
+ expect_log '^#!/usr/bin/env bash$'
expect_log '^echo aaa$'
}
function test_copy_src_symlink() {
cat "$(rlocation bazel_skylib/tests/copy_file/out/a-out-symlink.txt)" >"$TEST_log"
- expect_log '^#!/bin/bash$'
+ expect_log '^#!/usr/bin/env bash$'
expect_log '^echo aaa$'
}
function test_copy_gen() {
cat "$(rlocation bazel_skylib/tests/copy_file/out/gen-out.txt)" >"$TEST_log"
- expect_log '^#!/bin/bash$'
+ expect_log '^#!/usr/bin/env bash$'
expect_log '^echo potato$'
}
function test_copy_gen_symlink() {
cat "$(rlocation bazel_skylib/tests/copy_file/out/gen-out-symlink.txt)" >"$TEST_log"
- expect_log '^#!/bin/bash$'
+ expect_log '^#!/usr/bin/env bash$'
expect_log '^echo potato$'
}