-
Notifications
You must be signed in to change notification settings - Fork 275
Add stub for new goto-harness tool [depends-on: #3920] #3875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hannes-steffenhagen-diffblue
merged 2 commits into
diffblue:develop
from
hannes-steffenhagen-diffblue:feature-goto_harness_stub
Jan 26, 2019
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_test_pl_tests( | ||
"$<TARGET_FILE:goto-harness>") |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
default: tests.log | ||
|
||
GOTO_HARNESS_EXE=../../../src/goto-harness/goto-harness | ||
|
||
test: | ||
@../test.pl -p -c ${GOTO_HARNESS_EXE} | ||
|
||
tests.log: ../test.pl | ||
@../test.pl -p -c ${GOTO_HARNESS_EXE} | ||
|
||
show: | ||
@for dir in *; do \ | ||
if [ -d "$$dir" ]; then \ | ||
vim -o "$$dir/*.c" "$$dir/*.out"; \ | ||
fi; \ | ||
done; | ||
|
||
clean: | ||
find -name '*.out' -execdir $(RM) '{}' \; | ||
find -name '*.gb' -execdir $(RM) {} \; | ||
$(RM) tests.log |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CORE | ||
dummy | ||
--version | ||
^\d+\.\d+ \([^)]+\) | ||
^EXIT=0$ | ||
^SIGNAL=0$ |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
file(GLOB_RECURSE sources "*.cpp" "*.h") | ||
add_executable(goto-harness ${sources}) | ||
generic_includes(goto-harness) | ||
|
||
target_link_libraries(goto-harness | ||
util | ||
) |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SRC = \ | ||
goto_harness_main.cpp \ | ||
goto_harness_parse_options.cpp \ | ||
# Empty last line | ||
|
||
OBJ += \ | ||
../util/util$(LIBEXT) \ | ||
# Empty last line | ||
|
||
INCLUDES= -I .. | ||
|
||
LIBS = | ||
|
||
CLEANFILES = goto-harness$(EXEEXT) | ||
|
||
include ../config.inc | ||
include ../common | ||
|
||
all: goto-harness$(EXEEXT) | ||
|
||
############################################################################### | ||
|
||
goto-harness$(EXEEXT): $(OBJ) | ||
$(LINKBIN) | ||
|
||
.PHONY: goto-harness-mac-signed | ||
|
||
goto-harness-mac-signed: goto-harness$(EXEEXT) | ||
codesign -v -s $(OSX_IDENTITY) goto-harness$(EXEEXT) |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/******************************************************************\ | ||
|
||
Module: goto_harness_main | ||
|
||
Author: Diffblue Ltd. | ||
|
||
\******************************************************************/ | ||
|
||
#include "goto_harness_parse_options.h" | ||
|
||
int main(int argc, const char *argv[]) | ||
{ | ||
auto parse_options = goto_harness_parse_optionst(argc, argv); | ||
return parse_options.main(); | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/******************************************************************\ | ||
|
||
Module: goto_harness_parse_options | ||
|
||
Author: Diffblue Ltd. | ||
|
||
\******************************************************************/ | ||
|
||
#include <cstddef> | ||
#include <iostream> | ||
#include <string> | ||
|
||
#include <util/exit_codes.h> | ||
#include <util/version.h> | ||
|
||
#include "goto_harness_parse_options.h" | ||
|
||
int goto_harness_parse_optionst::doit() | ||
{ | ||
if(cmdline.isset("version")) | ||
{ | ||
std::cout << CBMC_VERSION << '\n'; | ||
return CPROVER_EXIT_SUCCESS; | ||
} | ||
|
||
help(); | ||
return CPROVER_EXIT_USAGE_ERROR; | ||
} | ||
|
||
void goto_harness_parse_optionst::help() | ||
{ | ||
std::cout << '\n' | ||
<< banner_string("Goto-Harness", CBMC_VERSION) << '\n' | ||
<< align_center_with_border("Copyright (C) 2019") << '\n' | ||
<< align_center_with_border("Diffblue Ltd.") << '\n' | ||
<< align_center_with_border("[email protected]") | ||
// ^--- No idea if this is the right email address | ||
<< '\n' | ||
<< '\n' | ||
<< "Usage: Purpose:\n" | ||
<< '\n' | ||
<< " goto-harness [-?] [-h] [--help] show help\n" | ||
<< " goto-harness --version show version\n"; | ||
} | ||
|
||
goto_harness_parse_optionst::goto_harness_parse_optionst( | ||
int argc, | ||
const char *argv[]) | ||
: parse_options_baset{GOTO_HARNESS_OPTIONS, argc, argv} | ||
{ | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/******************************************************************\ | ||
|
||
Module: goto_harness_parse_options | ||
|
||
Author: Diffblue Ltd. | ||
|
||
\******************************************************************/ | ||
|
||
#ifndef CPROVER_GOTO_HARNESS_GOTO_HARNESS_PARSE_OPTIONS_H | ||
#define CPROVER_GOTO_HARNESS_GOTO_HARNESS_PARSE_OPTIONS_H | ||
|
||
#include <util/parse_options.h> | ||
|
||
#define GOTO_HARNESS_OPTIONS "(version)" // end GOTO_HARNESS_OPTIONS | ||
|
||
class goto_harness_parse_optionst : public parse_options_baset | ||
{ | ||
public: | ||
int doit() override; | ||
void help() override; | ||
|
||
goto_harness_parse_optionst(int argc, const char *argv[]); | ||
}; | ||
|
||
#endif // CPROVER_GOTO_HARNESS_GOTO_HARNESS_PARSE_OPTIONS_H |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
util | ||
goto-harness |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should likely have this
align_center_with_border
code for everyone...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3920