[PATCH] D19207: [gold-plugin] Improve coverage with tests

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 08:01:48 PDT 2016


> @@ -0,0 +1,5 @@
> +; RUN: rm -rf %t.notexists

You probably don't need the rm -rf since the file is not created.

> +; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so  -shared \
> +; RUN:    %t.notexists 2>&1 | FileCheck %s -check-prefix=ENOENT
> +
> +; ENOENT: No such file or directory


> ===================================================================
> --- /dev/null
> +++ test/tools/gold/invalid-dir.ll
> @@ -0,0 +1,7 @@
> +; RUN: rm -rf %t.output

rmdir maybe

> +; RUN: mkdir %t.output
> +; RUN: llvm-as %s -o %t.o
> +; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so  -shared \
> +; RUN:    %t.o -o %t.output 2>&1 | FileCheck %s -check-prefix=OUTDIR
> +
> +; OUTDIR: fatal error:

Can you add a bit more of the error message?


More information about the llvm-commits mailing list