File tree 3 files changed +12
-5
lines changed
3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
# RUN: export LSAN_OPTIONS=detect_leaks=0
2
2
# RUN: not llvm-reduce --test=%s.NotAFileInTestingDir %p/Inputs/test-output-format.ll 2>&1 | FileCheck -DFILENAME=%s.NotAFileInTestingDir --strict-whitespace %s
3
3
4
- # CHECK: Error running interesting-ness test: {{(Executable "[[FILENAME]]" doesn't exist$)?(program not executable$)?}}
4
+ # CHECK: error: running interesting-ness test: {{(Executable "[[FILENAME]]" doesn't exist$)?(program not executable$)?}}
Original file line number Diff line number Diff line change
1
+ # Python on an empty file will always succeed as interesting
2
+ # RUN: touch %t
3
+
4
+ # Fail on attempt to write output to a directory
5
+ # RUN: not llvm-reduce --delta-passes=instructions -o %p/Inputs --test %python --test-arg %t %p/Inputs/test-output-format.ll 2>&1 | FileCheck -DMSG=%errc_EISDIR %s
6
+
7
+ # CHECK: error: opening output file: [[MSG]]
Original file line number Diff line number Diff line change @@ -45,9 +45,8 @@ int TestRunner::run(StringRef Filename) const {
45
45
/* SecondsToWait=*/ 0 , /* MemoryLimit=*/ 0 , &ErrMsg);
46
46
47
47
if (Result < 0 ) {
48
- Error E = make_error<StringError>(" Error running interesting-ness test: " +
49
- ErrMsg,
50
- inconvertibleErrorCode ());
48
+ Error E = make_error<StringError>(
49
+ " running interesting-ness test: " + ErrMsg, inconvertibleErrorCode ());
51
50
WithColor::error (errs (), ToolName) << toString (std::move (E)) << ' \n ' ;
52
51
exit (1 );
53
52
}
@@ -61,7 +60,8 @@ void TestRunner::writeOutput(StringRef Message) {
61
60
EmitBitcode && !Program->isMIR () ? sys::fs::OF_None
62
61
: sys::fs::OF_Text);
63
62
if (EC) {
64
- errs () << " Error opening output file: " << EC.message () << " !\n " ;
63
+ WithColor::error (errs (), ToolName)
64
+ << " opening output file: " << EC.message () << ' \n ' ;
65
65
exit (1 );
66
66
}
67
67
You can’t perform that action at this time.
0 commit comments