From 629dc072c7c81693e55cafaa90e63ff1128b0efe Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Fri, 21 Jul 2023 11:26:52 +0200 Subject: bugfix: stage symlinks as symlinks when creating an action directory Before this patch, when creating an action directory, symlinks were staged as regular files. --- test/end-to-end/symlinks/TARGETS | 8 +++++ test/end-to-end/symlinks/stage-links.sh | 55 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 test/end-to-end/symlinks/TARGETS create mode 100644 test/end-to-end/symlinks/stage-links.sh (limited to 'test/end-to-end/symlinks') diff --git a/test/end-to-end/symlinks/TARGETS b/test/end-to-end/symlinks/TARGETS new file mode 100644 index 00000000..12add451 --- /dev/null +++ b/test/end-to-end/symlinks/TARGETS @@ -0,0 +1,8 @@ +{ "stage-links": + { "type": ["end-to-end", "with remote"] + , "name": ["stage-links"] + , "test": ["stage-links.sh"] + , "deps": [["end-to-end", "tool-under-test"]] + } +, "TESTS": {"type": "install", "tainted": ["test"], "deps": ["stage-links"]} +} diff --git a/test/end-to-end/symlinks/stage-links.sh b/test/end-to-end/symlinks/stage-links.sh new file mode 100644 index 00000000..b8234d2a --- /dev/null +++ b/test/end-to-end/symlinks/stage-links.sh @@ -0,0 +1,55 @@ +#!/bin/sh +# Copyright 2023 Huawei Cloud Computing Technology Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +readonly JUST="${PWD}/bin/tool-under-test" + +touch ROOT +cat > TARGETS <