mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Fixes CLI argument parsing
Accept more than one option for specifying test paths. Support non-zero exit code when tests fail Return a non-zero exit code (saturated to max value 255, even if more than 255 tests fail) indicating number of failed tests. This is helpful when running in a script (like in CI) to detect failures instead of detecting failures through manual visual inspection of output text.
This commit is contained in:
parent
0241b2b97e
commit
cd09ea0c4a
4 changed files with 46 additions and 13 deletions
|
@ -304,7 +304,7 @@ void FunctionTestCollection::runTests(list<string> &lateStream)
|
|||
/// Run through all XML files in the given list, processing each in turn.
|
||||
/// \param testFiles is the given list of test files
|
||||
/// \param s is the output stream to print results to
|
||||
void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
int FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
|
||||
{
|
||||
int4 totalTestsApplied = 0;
|
||||
|
@ -344,4 +344,5 @@ void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostrea
|
|||
if (iter == failures.end()) break;
|
||||
}
|
||||
}
|
||||
return totalTestsApplied - totalTestsSucceeded;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue