-
Notifications
You must be signed in to change notification settings - Fork 476
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
change from ninja and custom cmake target run_test
to using cmake & ctest.
#1700
Conversation
|
||
On macOS, using a package manager of your choice (we've picked Homebrew): | ||
|
||
brew install cmake ninja [email protected] wget doxygen graphviz astyle valgrind | ||
brew install cmake [email protected] wget doxygen graphviz astyle valgrind |
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.
Yikes -- we still suggest using OpenSSL1.1??
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.
oof. Good catch. I'll make another pr updating that to openssl@3
.
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 @Martyrshot for this improvement. I like the idea -- but I think quite a bit of our CI machinery depends on the (now) "old" way of selecting tests: That'd surely needs to be changed over, too.
… ctest. Upon reading issue #1494 I figured I'd give this a go. This PR aims to remove the need for ninja, and make tests platform agnostic. The new build process will work as follows: ``` cmake -B build cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ``` Since the `run_tests` rule was removed, and cmake doesn't have a way to skip tests by default, the `OQS_ENABLE_LONG_TESTS` variable is introduced. If you would like to run the long tests (currently only `test_kat_all`) you would do the following: ``` cmake -B build -DOQS_ENABLE_LONG_TESTS=on cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ```
Looking at the liboqs ci (I haven't looked at downstream projects) the majority of ci calls I was trying to avoid having to re-write all the tests in order to remove pytest, so as a nice side benefit ci should work. In a perfect world we would switch from |
run_test
to using cmake & ctest.run_test
to using cmake & ctest.
My support (for resolving that mess :-) you have. FWIW, the reason the latest oqs-provider release test fails is a combination of |
Is the inflexibility you're referring to being that it tests all of the algorithms? Or are the other issues that I can look at addressing when I remove |
Yes and No: The "inflexibility" I mean is that the test fixture for server startup only parameterizes on the sigalgs (not on the KEMs) and thus has to enable all KEMs to prepare/allow for the subsequent (all-)KEM tests (against each sigalg test server). This is conceptually fine and logical (why create different servers for different KEMs?). Unfortunately, Add/edit: All that said, it just dawns on me that I can use OpenSSL's config mechanism (via env var) activating only the KEM the client wants to test... But that then requires each test to fire up both server and client for the SIG/KEM combination under test (right now, I'd hope only count(SIG) |
Ah, ok. I understand. Well, I'll see what I can do. |
IIRC you can specify multiple algorithms at once. So, although not perfect, you could minimize the number of server/client spin ups to COUNT(algs)/44 ~= 2. Anyway, I'm going to focus on removing pytest from liboqs. This will probably turn into converting the |
Current tasks/conversations to have after yesterday's call: Investigate if we can still generate vscode projects with out build system. If not, do we care?
Do we want to keep pytest as the underlying test framework and just have cmake sit on top of it?
|
It definitely is. Particularly if the goal is to obtain the same level of performance/parallelization as afforded by |
Can I ask whether this PR can be shelved (closed) for the time being, @Martyrshot ? |
Sorry I haven't had much time to work on personal projects. :( If others think this PR still makes sense then I can look into wrapping it up. But if there is no demand for it, then we can close it. |
The one big benefit I see this PR would bring is much better testing (coverage) on non-UNIX'ish platforms. But as I don't see strong demand for |
@Martyrshot OK with you if I close this PR for the time being and leave a pointer to it in #1494? It would be nice to shorten our list of open PRs. Of course, it would be a welcome contribution should you find time to reopen it in the future. |
Closing in the interest of reducing our PR backlog, but please feel free to reopen at any time. |
change from ninja and custom cmake target
run_test
to using cmake & ctest.Upon reading issue #1494 I figured I'd give this a go.
This PR aims to remove the need for ninja, and make tests platform agnostic.
The new build process will work as follows:
Since the
run_tests
rule was removed, and cmake doesn't have a way to skip tests by default,the
OQS_ENABLE_LONG_TESTS
variable is introduced. If you would like to run the long tests(currently only
test_kat_all
) you would do the following: