-
Notifications
You must be signed in to change notification settings - Fork 532
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
run IDA tests headlessly #1364
Comments
This technique is described by github here: https://docs.github.com/en/actions/security-guides/encrypted-secrets#storing-large-secrets |
might be a pain to figure out how to install IDA headlessly in CI |
Hi @williballenthin , could you please explain the above problem in detail. What is meant by headless IDA ? |
I mean that we want to run IDA Pro in our CI/CD setup so that we can execute our test cases. Typically this program is run with a GUI so by “headless” I mean we need to control it without a display.
|
Can we use the free IDA version ? I don't have the PRO version though. |
Unfortunately not because the free version doesn’t support scripting with Python. We’ll need to use one of our paid licenses for this, unless perhaps Hex-Rays donates a server license for us to use in CI/CD.
|
its a little tricky to invoke all the tests today, because they expect to be run against a bunch of different input samples and assert that features are extracted. we'll need to find a way to structure the tests such that they're easy to invoke in CI. one way might be to only run the test cases that match the currently loaded sample, and skip the remainder. then the CI configuration can invoke the test runner script against each sample referenced in the tests. its a little configuration-heavy, but wouldn't require too many changes and does get the job done. these changes would also support running Ghidra backend in CI more easily. |
today we have test_ida_features.py. this script is named like a pytest file; however, all the test cases inside are skipped because the tests don't actually run in pytest. this is ok. its just documentation. the file expects to be executed as a script inside of IDA. when the current file MD5 matches the file used by a feature test, then the test is invoked (directly, as a function, not via pytest) and the result printed to stdout. #1513 refines the test runner so that it can be invoked easily from the command line: |
our features tests currently reference the following files:
which means we can run all the feature tests in IDA like this:
|
there are a handful of failing tests @mike-hunhoff
|
it would be nice to invoke the capa tests under IDA without interacting with the IDA GUI. this would enable things like #1362 (run IDA tests in CI). the test runner inside IDA could emit the test results to a file specified via CLI and a wrapper script that invokes IDA might read and render this back to the user.
The text was updated successfully, but these errors were encountered: