-
Notifications
You must be signed in to change notification settings - Fork 187
kola: Add run-ext-bin command #1215
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| Integrating external test suites | ||
| === | ||
|
|
||
| Fedora CoreOS is comprised of a number of upstream projects, from | ||
| the Linux kernel to systemd, ostree, Ignition, podman and | ||
| numerous others. | ||
|
|
||
| We want to support keeping tests in their respective upstream | ||
| repositories, and allow these projects to target Fedora CoreOS | ||
| in e.g. their own CI. And we also want to run unmodified | ||
| upstream tests, *without rebuilding* the project. | ||
|
|
||
| Using kola run-ext-bin | ||
| === | ||
|
|
||
| The `kola run-ext-bin` is one way to accomplish this. The | ||
| core idea is to express your test suite as a binary (plus an optional | ||
| directory of dependencies) that will be uploaded to a CoreOS | ||
| system and run as a systemd unit. | ||
|
|
||
| Currently this systemd unit runs with full privileges - tests | ||
| are assumed to be (potentially) destructive and a general assumption | ||
| is tests are run in easily disposable virtual machines. | ||
|
|
||
| A best practice for doing this is to write your tests in a language | ||
| that compiles to a single binary - Rust and Go for example, but | ||
| there exist for example tools like [PyInstaller](https://realpython.com/pyinstaller-python/#pyinstaller) | ||
| too. | ||
|
|
||
| This mechanism is suitable for testing most userspace components | ||
| of CoreOS; for example, one can have the binary drive a container runtime. | ||
|
|
||
| An important feature of `run-ext-bin` is support for rebooting the host system. | ||
| This allows one to easily test OS updates. To do this, simply invoke the usual | ||
| `reboot` - the test framework will monitor the target systemd unit | ||
| and ignore the case where it exits with `SIGTERM`. | ||
|
|
||
| A test is considered failed if the unit exits with any non-zero exit | ||
| status or dies from any signal other than `SIGTERM`. | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.