-
Notifications
You must be signed in to change notification settings - Fork 0
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
.github: add initial workflow to run tests #38
Conversation
The `dev run` command exiting with an exit status of 0 does not currently imply that the tests pass. However, adding this workflow does at least allow us to enforce in CI that the commands to build and test don't exit non-zero.
Previously, the macOS GitHub Actions build errored with: meson.build:170:14: ERROR: C shared or static library 'crypto' not found because Meson's find_library() calls weren't searching where the libraries are installed on the macOS runner. For now, just add some symlinks, so that all the CI-related setup is in one place.
I sometimes prefer a single step when the same conceptual operation is performed on multiple OSes. But Miro prefers this, and I don't mind.
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.
It doesn't seem to deal w/ the exit code / crashes. For instance, it's certainly not working on Linux right now based on the runner output, but it still passes.
Also, since I'm generally not working on a Linux box and switching is a bit of a PITA, would appreciate some insight there.
Lines 128 to 139 in 8333004
looks like exit code is not honored in the |
Yes, my intention for this PR was simply to get I would've already added Line 133 in 8333004
and changing Lines 66 to 73 in 8333004
so just adding This is what I meant when I mentioned the typo yesterday, and with:
|
I don't understand the need to be rushing it in if it isn't where it needs to be. There's no need to overengineer the build; I don't want to do more than the bare minimum necessary (for instance with the dev script), because they're not a priority yet. Breaking this up feels like an invitation to bikeshed, and I would rather stay focused. |
Before this commit, the new test workflow would indicate success when it shouldn't (for example, when one of the tests produced a segfault). This happened because `dev run` would exit with an exit code of 0 even when `c4test` didn't. For now, make the `dev run` exit with the exit code of `c4test`. Note that we cannot currently add `set -e` in this script without making other changes.
Set the CON4M_DEV env var. From the commit message of the commit that added the initial test runner [1]: Also, the harness looks for two environment variables: 1) The tremendous amount of debug info now only shows up if you have CON4M_DEV set (ignores value). 2) The default search location is pulled from CON4M_TEST_DIR if provided. Internally, this env var sets dev_mode in src/tests/test.c: 514: if (c4m_get_env(c4m_new_utf8("CON4M_DEV"))) { 515: dev_mode = true; 516: } [1] 8333004, 2024-06-20, "Initial test runner"
It's just that:
But fair enough if we don't want to have, even for a momentary first implementation, a workflow that indicates success when the tests clearly error.
I can change
I've opened #41 including a stack trace and |
Just to document the current state in the latest Linux CI runs (see log): the segfaults are for
and the other failures are for
|
…ted, it's shaking out plenty of minor bugs.
…casional crash that was due to occasional u16 laying in memory in such a way as to look like a valid heap pointer. I need to go back and do ptr scanning for everything, but am thinking about whether it is more automatable to produce the ptr maps, e.g., via lib clang. Until then, I've made some of the data types wide.
This was approved by #49 (comment). Merging. |
Add an initial workflow to run
dev run
in CI on the Linux and macOS runners. The output currently needs to be inspected manually, but this PR gives us a base to build on and could already help catch regressions like #37 (and make it easier to verify fixes on other platforms).Note that currently:
dev run
command exiting with an exit status of 0 does not imply that the tests pass.dev run
segfaults.We can improve such things over time.
Also use the latest stable GCC release (GCC 14.1) in the Linux job to help make newer compiler warnings more visible.
Closes: #34 (we can make follow-up tickets for e.g. the exit status)
Refs: #35
Refs: #37
To-do:
meson.build:170:14: ERROR: C shared or static library 'crypto' not found
main
after we merge a PR that fixesc4test
segfaults with e.g.basic1.c4m
#37