Skip to content

Add an API call to list available solvers for the current platform - #720

Open
daniel-raffler wants to merge 6 commits into
masterfrom
692-add-a-way-to-query-supported-solvers
Open

daniel-raffler wants to merge 6 commits into
masterfrom
692-add-a-way-to-query-supported-solvers

Conversation

@daniel-raffler

Copy link
Copy Markdown
Contributor

Hello,

this PR extends the JavaSMT API with a new call Solvers.available() to list all solvers that are supported on the current OS and CPU architecture. The call works similarly to the existing Solvers.values() and can be used to iterate over all available solvers during testing. Unlike Solvers.values() it skips over solvers that are not available on the platform, which helps to avoid failed tests due to missing libraries, when in reality the solver just isn't available for the testing platform

The PR also adds a new ant option "ignoreLinkErrors" to decide if tests should fail if solver binaries are not installed, or when there are linking issues due to missing system libraries. By default all SolverBasedTests are skipped if the solver binary can't be found, and only tests in SolverContextFactoryTest will fail as a warning about the configuration issue. Setting the new option "ignoreLinkErrors" to true causes the tests in SolverContextFactoryTest to also be skipped for the solver, while setting it to false makes all tests fail if there are missing binaries or linking issues

An example for how to use the "ignoreLinkErrors" can be found in the updated gitlab-ci.yml: Several of our solvers need a more recent version of libc than is available on the gitlab runner, and we're now setting "ignoreLinkErrors" to true to skip tests that would otherwise fail when these solver can't be loaded

…, or dependencies are missing

Set the property `javasmt.test.ignore-link-errors` to `false` to let the test fail. By default, tests are skipped when dependencies are missing
Several of the solvers require a newer version of libc and will fail to load with the current gitlab runner. We should revert this commit once the gitlab runner has been updated to a more recent version of Ubuntu

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Ensure tests in CI are not ignored unexpectedly due to missing dependencies Add a way to query supported solvers

1 participant