File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11# RUN: export LSAN_OPTIONS=detect_leaks=0
22# RUN: not llvm-reduce --test=%s.NotAFileInTestingDir %p/Inputs/test-output-format.ll 2>&1 | FileCheck -DFILENAME=%s.NotAFileInTestingDir --strict-whitespace %s
33
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 {
4545 /* SecondsToWait=*/ 0 , /* MemoryLimit=*/ 0 , &ErrMsg);
4646
4747 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 ());
5150 WithColor::error (errs (), ToolName) << toString (std::move (E)) << ' \n ' ;
5251 exit (1 );
5352 }
@@ -61,7 +60,8 @@ void TestRunner::writeOutput(StringRef Message) {
6160 EmitBitcode && !Program->isMIR () ? sys::fs::OF_None
6261 : sys::fs::OF_Text);
6362 if (EC) {
64- errs () << " Error opening output file: " << EC.message () << " !\n " ;
63+ WithColor::error (errs (), ToolName)
64+ << " opening output file: " << EC.message () << ' \n ' ;
6565 exit (1 );
6666 }
6767
You can’t perform that action at this time.
0 commit comments