Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 866797d

Browse files
committed
[bugpoint] Add testcase for r203343.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203472 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent bdb05aa commit 866797d

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

test/BugPoint/compile-custom.ll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%s.py arg1 arg2" --output-prefix %t %s | FileCheck %s
2+
; REQUIRES: loadable_module
3+
4+
; Test that arguments are correctly passed in --compile-command. The output
5+
; of bugpoint includes the output of the custom tool, so we just echo the args
6+
; in the tool and check here.
7+
8+
; CHECK: Error: arg1 arg2
9+
10+
define void @noop() {
11+
ret void
12+
}

test/BugPoint/compile-custom.ll.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
5+
# Currently any print-out from the custom tool is interpreted as a crash
6+
# (i.e. test is still interesting)
7+
8+
print "Error: " + ' '.join(sys.argv[1:])
9+
10+
sys.exit(1)

0 commit comments

Comments
 (0)