[all-commits] [llvm/llvm-project] ccabe9: clang: Make tests using symlinks more consistent.

Nico Weber via All-commits all-commits at lists.llvm.org
Sun Apr 5 09:57:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ccabe9329857141e0b676951ff89092d7f88bed0
      https://github.com/llvm/llvm-project/commit/ccabe9329857141e0b676951ff89092d7f88bed0
  Author: Nico Weber <thakis at chromium.org>
  Date:   2020-04-05 (Sun, 05 Apr 2020)

  Changed paths:
    M clang/test/Driver/config-file3.c
    M clang/test/Driver/mingw-sysroot.cpp
    M clang/test/Driver/riscv32-toolchain-extra.c
    M clang/test/Driver/riscv64-toolchain-extra.c
    M clang/test/Driver/target-override.c

  Log Message:
  -----------
  clang: Make tests using symlinks more consistent.

Instead of checking if each symlink exists before removing it,
remove the whole temp dir housing the symlinks before recreating it.
This is a bit shorter, conceptually simpler (in that the first
and consecutive test runs have more similar behavior), it's what we're
already doing in almost all places where we do it, and it works if the
symlink exists but is a dead link (e.g. when it points into the build
dir but the build dir is renamed).

No intended behavior change.




More information about the All-commits mailing list