r322065 - Avoid assumption that lit tests are writable (in a couple more places). NFC

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 10:47:53 PST 2018


I feel like this sort of change will regress quite quickly - in the sense
that most 'cp' in tests is probably there to put it somewhere writable (in
some cases its to put it in a particular location, not about writability).
Any way we could fix 'cp' in lit to do the right thing here? (I doubt any
test /needs/ cp to propagate the writability bit?)

On Tue, Jan 9, 2018 at 1:34 AM Sam McCall via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: sammccall
> Date: Tue Jan  9 01:32:53 2018
> New Revision: 322065
>
> URL: http://llvm.org/viewvc/llvm-project?rev=322065&view=rev
> Log:
> Avoid assumption that lit tests are writable (in a couple more places). NFC
>
> Modified:
>     cfe/trunk/test/Modules/modify-module.m
>     cfe/trunk/test/PCH/modified-header-crash.c
>
> Modified: cfe/trunk/test/Modules/modify-module.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/modify-module.m?rev=322065&r1=322064&r2=322065&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/modify-module.m (original)
> +++ cfe/trunk/test/Modules/modify-module.m Tue Jan  9 01:32:53 2018
> @@ -3,9 +3,9 @@
>
>  // RUN: rm -rf %t
>  // RUN: mkdir -p %t/include
> -// RUN: cp %S/Inputs/Modified/A.h %t/include
> -// RUN: cp %S/Inputs/Modified/B.h %t/include
> -// RUN: cp %S/Inputs/Modified/module.map %t/include
> +// RUN: cat %S/Inputs/Modified/A.h > %t/include/A.h
> +// RUN: cat %S/Inputs/Modified/B.h > %t/include/B.h
> +// RUN: cat %S/Inputs/Modified/module.map > %t/include/module.map
>  // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache
> -fmodules -fimplicit-module-maps -I %t/include %s -verify
>  // RUN: echo '' >> %t/include/B.h
>  // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache
> -fmodules -fimplicit-module-maps -I %t/include %s -verify
>
> Modified: cfe/trunk/test/PCH/modified-header-crash.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/modified-header-crash.c?rev=322065&r1=322064&r2=322065&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/modified-header-crash.c (original)
> +++ cfe/trunk/test/PCH/modified-header-crash.c Tue Jan  9 01:32:53 2018
> @@ -1,6 +1,6 @@
>  // Don't crash.
>
> -// RUN: cp %S/modified-header-crash.h %t.h
> +// RUN: cat %S/modified-header-crash.h > %t.h
>  // RUN: %clang_cc1 -DCAKE -x c-header %t.h -emit-pch -o %t
>  // RUN: echo 'int foobar;' >> %t.h
>  // RUN: not %clang_cc1 %s -include-pch %t -fsyntax-only
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180115/b98030ac/attachment.html>


More information about the cfe-commits mailing list