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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 17 18:46:13 PDT 2016


davide created this revision.
davide added a reviewer: rafael.
davide added a subscriber: llvm-commits.

http://reviews.llvm.org/D19207

Files:
  test/tools/gold/invalid-dir.ll
  test/tools/gold/lit.local.cfg
  test/tools/gold/nofile.ll

Index: test/tools/gold/nofile.ll
===================================================================
--- /dev/null
+++ test/tools/gold/nofile.ll
@@ -0,0 +1,5 @@
+; RUN: rm -rf %t.notexists
+; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so  -shared \
+; RUN:    %t.notexists 2>&1 | FileCheck %s -check-prefix=ENOENT
+
+; ENOENT: No such file or directory
Index: test/tools/gold/lit.local.cfg
===================================================================
--- /dev/null
+++ test/tools/gold/lit.local.cfg
@@ -0,0 +1,2 @@
+if (not 'ld_plugin' in  config.available_features):
+   config.unsupported = True
Index: test/tools/gold/invalid-dir.ll
===================================================================
--- /dev/null
+++ test/tools/gold/invalid-dir.ll
@@ -0,0 +1,7 @@
+; RUN: rm -rf %t.output
+; 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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19207.54021.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160418/d9f9ade6/attachment.bin>


More information about the llvm-commits mailing list