From: Hubert Tong Date: Fri, 26 Jul 2019 20:09:37 +0000 (+0000) Subject: Partially revert rC365414; `ln -n` is not portable X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=536bf3f400fdcf39651b157affdc33cca678cb1a;p=clang Partially revert rC365414; `ln -n` is not portable This restores the use of `rm` instead of the non-portable `ln -n`. Such use being the status quo for the 12-month period between rC334972 and rC365414. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367147 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/no-canonical-prefixes.c b/test/Driver/no-canonical-prefixes.c index 85de9f1d70..c222dd4aa6 100644 --- a/test/Driver/no-canonical-prefixes.c +++ b/test/Driver/no-canonical-prefixes.c @@ -4,10 +4,11 @@ // RUN: cd %t.real // RUN: ln -sf %clang test-clang // RUN: cd .. -// If %.fake already is a symlink to %t.real when `ln -sf %t.real %t.fake` -// runs, then that would symlink %t.real to itself, forming a cycle. -// The `-n` flag prevents this. -// RUN: ln -sfn %t.real %t.fake +// Important to remove %t.fake: If it already is a symlink to %t.real when +// `ln -sf %t.real %t.fake` runs, then that would symlink %t.real to itself, +// forming a cycle. +// RUN: rm -f %t.fake +// RUN: ln -sf %t.real %t.fake // RUN: cd %t.fake // RUN: ./test-clang -v -S %s 2>&1 | FileCheck --check-prefix=CANONICAL %s // RUN: ./test-clang -v -S %s -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=NON-CANONICAL %s