This is an archive of the discontinued LLVM Phabricator instance.

[gold-plugin] Improve coverage with tests
ClosedPublic

Authored by davide on Apr 17 2016, 6:46 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

davide updated this revision to Diff 54021.Apr 17 2016, 6:46 PM
davide retitled this revision from to [gold-plugin] Improve coverage with tests.
davide updated this object.
davide added a reviewer: rafael.
davide added a subscriber: llvm-commits.
rafael edited edge metadata.Apr 19 2016, 8:01 AM
rafael added a subscriber: rafael.

@@ -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?

This revision was automatically updated to reflect the committed changes.