diff options
author | Yifan Hong <elsk@google.com> | 2024-01-12 14:41:11 -0800 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-01-19 12:22:42 +0000 |
commit | be14234dfe0c59d40a2394fcf2cc466335c78fe8 (patch) | |
tree | e461d49a680eae72d696978f7030104ce21a6618 | |
parent | 14b583ac64884533ca75e3b5782454c019393591 (diff) | |
download | build-be14234dfe0c59d40a2394fcf2cc466335c78fe8.tar.gz |
kleaf: Fix unit tests for --incompatible_sandbox_hermetic_tmp.
Fix errors like:
output 'build/kernel/kleaf/tests/ddk_test/makefiles_test_suite_subdir_test_subdir_sources_same_name_subdir_kbuild/subdir/Kbuild' is a dangling symbolic link
Test: bazel test //build/kernel/kleaf/tests
Bug: 319893821
Bug: 319077326
Change-Id: I445c3e49f56cdf82bbae7760b8abbe77b985a189
(cherry picked from commit ba157874458502fad044dd87342d1634a4cb1bf7)
3 files changed, 3 insertions, 3 deletions
diff --git a/kleaf/tests/ddk_test/makefiles_test.bzl b/kleaf/tests/ddk_test/makefiles_test.bzl index 4d8960dc..555d1241 100644 --- a/kleaf/tests/ddk_test/makefiles_test.bzl +++ b/kleaf/tests/ddk_test/makefiles_test.bzl @@ -151,7 +151,7 @@ def _get_top_level_file_impl(ctx): hermetic_tools = hermetic_toolchain.get(ctx) command = hermetic_tools.setup + """ if [[ -f {src} ]]; then - cp -pl {src} {out} + cp -pL {src} {out} else : > {out} fi diff --git a/kleaf/tests/kernel_config_test/kernel_config_option_test.bzl b/kleaf/tests/kernel_config_test/kernel_config_option_test.bzl index 2898e132..bf2e0683 100644 --- a/kleaf/tests/kernel_config_test/kernel_config_option_test.bzl +++ b/kleaf/tests/kernel_config_test/kernel_config_option_test.bzl @@ -56,7 +56,7 @@ def _get_config_file(ctx, kernel_build, filename): hermetic_tools = hermetic_toolchain.get(ctx) command = hermetic_tools.setup + """ - cp -pl {out_dir}/.config {out} + cp -pL {out_dir}/.config {out} """.format( out_dir = out_dir.path, out = out.path, diff --git a/kleaf/tests/kernel_config_test/kernel_defconfig_fragments_test.bzl b/kleaf/tests/kernel_config_test/kernel_defconfig_fragments_test.bzl index 8da1c3d7..2a84672e 100644 --- a/kleaf/tests/kernel_config_test/kernel_defconfig_fragments_test.bzl +++ b/kleaf/tests/kernel_config_test/kernel_defconfig_fragments_test.bzl @@ -68,7 +68,7 @@ def _get_config_impl(ctx): out = ctx.actions.declare_file("{}/.config".format(ctx.label.name)) hermetic_tools = hermetic_toolchain.get(ctx) command = hermetic_tools.setup + """ - cp -pl {out_dir}/.config {out} + cp -pL {out_dir}/.config {out} """.format( out_dir = out_dir.path, out = out.path, |