-
Notifications
You must be signed in to change notification settings - Fork 679
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
Add option to generate XML test cases (--write-xml-tests) #1181
Conversation
…ered to Test-Comp Add option to provide original source file and its hash sum; TODO REMOVE namespace change
Wouldn't this be better as a ktest tool option, similar to the binary output one? |
@kren1 Not for test-comp. |
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.
Thanks, @MartinNowack , just a few minor comments.
@@ -289,6 +289,22 @@ namespace { | |||
cl::desc("Link the llvm libc++ library into the bitcode (default=false)"), | |||
cl::init(false), | |||
cl::cat(LinkCat)); | |||
|
|||
cl::OptionCategory TestCompCat("Options specific to Test-Comp", | |||
"Options specific to test-comp."); |
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.
Can you say something like "These are options specific to the Test-Comp competition" for consistency with the other category descriptions which are full sentences?
"Options specific to test-comp."); | ||
|
||
llvm::cl::opt<bool> WriteXMLTests("write-xml-tests", | ||
llvm::cl::desc("Write XML-formated tests"), |
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.
formatted
for (unsigned i=0; i<b.numObjects; i++) | ||
delete[] b.objects[i].bytes; | ||
delete[] b.objects; | ||
if (!WriteXMLTests) |
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.
I don't think this should be an OR, we should allow the generation of both .ktest and .xml files
cl::cat(TestCompCat)); | ||
|
||
llvm::cl::opt<std::string> TCOrig("tc-orig", | ||
llvm::cl::desc("Test-Comp original file"), |
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.
Can you explain a bit what this is?
What about some sort of usage like this A nice thing about this approach is it doesn't pollute KLEE code, but more importantly it's more flexible. For example you could do something like |
I think we should add this, as it's not an exotic option -- this XML-formatted tests are now supported by many other tools. There are also a number of KLEE-based tools participating in Test-Comp, and it's good to eliminate code duplication, especially if the format changes in the future. So let's merge this. @MartinNowack can you make the small changes I requested? |
@MartinNowack You will also need to fix compilation for LLVM < 4:
|
@MartinNowack any reason not to merge this? We receive regular inquiries about this, most recently on klee-dev. |
@MartinNowack I know this is not a priority, and from what I understand you don't plan to revive it. So let's close it. |
Add option to generate xml testcases. This patch generates test cases as XML files.
In addition, test-comp-specific, additional arguments are specific to generate experiment descriptions.