[Concept] CI: Use ln -sf to avoid failure on existing symlinks
Commit Message
From: Simon Glass <sjg@chromium.org>
The before_script creates symlinks for the qemu_arm64_lwip config and
for mapping the runner hostname to the travis-ci directory. With plain
ln -s, these fail if the symlinks already exist from a cached workspace
or a previous job, causing intermittent INTERNALERROR failures in pytest.
Use -sf for file symlinks and -sfn for directory symlinks to overwrite
any stale entries.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
.gitlab-ci.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -64,10 +64,10 @@ stages:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
# qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
# The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks
- - ln -s conf.qemu_arm64 test/hooks/bin/travis-ci/conf.qemu_arm64_lwip_na
- - ln -s u_boot_boardenv_qemu_arm64_na.py test/hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py
- - ln -s travis-ci test/hooks/bin/`hostname`
- - ln -s travis-ci test/hooks/py/`hostname`
+ - ln -sf conf.qemu_arm64 test/hooks/bin/travis-ci/conf.qemu_arm64_lwip_na
+ - ln -sf u_boot_boardenv_qemu_arm64_na.py test/hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py
+ - ln -sfn travis-ci test/hooks/bin/`hostname`
+ - ln -sfn travis-ci test/hooks/py/`hostname`
- if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]] || [[ "${TEST_PY_BD}" == "xilinx_mbv32_smode" ]]; then
wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.3.1/opensbi-1.3.1-rv-bin.tar.xz | tar -C /tmp -xJ;
export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;