forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#1712 from karkhaz/kk-flush-all
Add --flush option to flush all output
- Loading branch information
Showing
14 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,7 @@ Author: Daniel Kroening, [email protected] | |
"(show-threaded)(list-calls-args)(print-path-lengths)" \ | ||
"(undefined-function-is-assume-false)" \ | ||
"(remove-function-body):"\ | ||
OPT_FLUSH \ | ||
"(splice-call):" \ | ||
OPT_REMOVE_CALLS_NO_BODY \ | ||
OPT_REPLACE_FUNCTION_BODY | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ Author: Daniel Kroening, [email protected] | |
|
||
ui_message_handlert::ui_message_handlert() | ||
: _ui(uit::PLAIN), | ||
always_flush(false), | ||
time(timestampert::make(timestampert::clockt::NONE)), | ||
out(std::cout), | ||
json_stream(nullptr) | ||
|
@@ -30,8 +31,10 @@ ui_message_handlert::ui_message_handlert() | |
ui_message_handlert::ui_message_handlert( | ||
uit __ui, | ||
const std::string &program, | ||
bool always_flush, | ||
timestampert::clockt clock_type) | ||
: _ui(__ui), | ||
always_flush(always_flush), | ||
time(timestampert::make(clock_type)), | ||
out(std::cout), | ||
json_stream(nullptr) | ||
|
@@ -79,6 +82,7 @@ ui_message_handlert::ui_message_handlert( | |
? uit::JSON_UI | ||
: uit::PLAIN, | ||
program, | ||
cmdline.isset("flush"), | ||
cmdline.isset("timestamp") | ||
? cmdline.get_value("timestamp") == "monotonic" | ||
? timestampert::clockt::MONOTONIC | ||
|
@@ -130,11 +134,13 @@ void ui_message_handlert::print( | |
{ | ||
case uit::PLAIN: | ||
{ | ||
console_message_handlert console_message_handler; | ||
console_message_handlert console_message_handler(always_flush); | ||
std::stringstream ss; | ||
const std::string timestamp = time->stamp(); | ||
ss << timestamp << (timestamp.empty() ? "" : " ") << message; | ||
console_message_handler.print(level, ss.str()); | ||
if(always_flush) | ||
console_message_handler.flush(level); | ||
} | ||
break; | ||
|
||
|
@@ -144,6 +150,8 @@ void ui_message_handlert::print( | |
source_locationt location; | ||
location.make_nil(); | ||
print(level, message, -1, location); | ||
if(always_flush) | ||
flush(level); | ||
} | ||
break; | ||
} | ||
|
@@ -302,7 +310,7 @@ void ui_message_handlert::flush(unsigned level) | |
{ | ||
case uit::PLAIN: | ||
{ | ||
console_message_handlert console_message_handler; | ||
console_message_handlert console_message_handler(always_flush); | ||
console_message_handler.flush(level); | ||
} | ||
break; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters