Skip to content
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

test/system: Connect system tests to Meson #1062

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HarryMichal
Copy link
Member

A bit of plumbing in the build files has been done to accommodate the
change as much as possible. If we're to use meson.build in the
'test/system' subdir we better also install the data from there.

This also adjust the CI playbooks to launch the tests via Meson by
specifying the specific test suite ('system').

@HarryMichal HarryMichal added 3. Enhancement Improvement to an existing feature 6. Minor Change Should not cause breakage 2. CI Automation of testing, analysis and other actions 2. Build System Issue is related to the build system 2. Testing Related to testing of Toolbox - unit, system,.. labels May 30, 2022
@softwarefactory-project-zuul
Copy link

Build failed.

unit-test TIMED_OUT in 10m 48s
✔️ system-test-fedora-rawhide SUCCESS in 16m 48s
✔️ system-test-fedora-36 SUCCESS in 10m 36s
✔️ system-test-fedora-35 SUCCESS in 10m 48s
✔️ system-test-fedora-34 SUCCESS in 11m 42s

HarryMichal added a commit to HarryMichal/toolbox that referenced this pull request May 30, 2022
The project already has a number of different tests plugged into the
build system. To have greater control over which tests are executed,
assign them into different suites. 'linting' for formatting and linting
and 'unit' for unit tests and generally self-contained tests testing
a small portion of Toolbx.

containers#1062
HarryMichal added a commit to HarryMichal/toolbox that referenced this pull request May 30, 2022
A bit of plumbing in the build files has been done to accommodate the
change as much as possible. If we're to use meson.build in the
'test/system' subdir we better also install the data from there.

This also adjust the CI playbooks to launch the tests via Meson by
specifying the specific test suite ('system').

containers#1062
@HarryMichal HarryMichal force-pushed the test/system/add-to-meson-v2 branch from 9ae1251 to e4d823f Compare May 30, 2022 17:54
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 7m 07s
✔️ system-test-fedora-rawhide SUCCESS in 16m 00s
✔️ system-test-fedora-36 SUCCESS in 10m 33s
✔️ system-test-fedora-35 SUCCESS in 11m 16s
✔️ system-test-fedora-34 SUCCESS in 12m 10s

The project already has a number of different tests plugged into the
build system. To have greater control over which tests are executed,
assign them into different suites. 'linting' for formatting and linting
and 'unit' for unit tests and generally self-contained tests testing
a small portion of Toolbx. Also, in a follow-up commit the system tests
will be plugged into Meson and having a way of running only some of the
tests will be needed.

containers#1062
@HarryMichal HarryMichal force-pushed the test/system/add-to-meson-v2 branch from e4d823f to 0c42ab0 Compare September 30, 2023 19:55
HarryMichal added a commit to HarryMichal/toolbox that referenced this pull request Sep 30, 2023
A bit of plumbing in the build files has been done to accommodate the
change as much as possible. If we're to use meson.build in the
'test/system' subdir we better also install the data from there.

This also adjust the CI playbooks to launch the tests via Meson by
specifying the specific test suite ('system').

This change also means the test suite needs to be run from the
'test/system' subdirectory for the bats helper libraries to be
discovered correctly.

containers#1062
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/98aebe71640041ac9b228d1e345b36f5

unit-test RETRY_LIMIT in 7m 33s
unit-test-migration-path-for-coreos-toolbox RETRY_LIMIT in 1m 54s
unit-test-restricted RETRY_LIMIT in 6m 48s
system-test-fedora-rawhide RETRY_LIMIT in 7m 34s
system-test-fedora-38 RETRY_LIMIT in 7m 20s
system-test-fedora-37 RETRY_LIMIT in 7m 33s

HarryMichal added a commit to HarryMichal/toolbox that referenced this pull request Oct 1, 2023
A bit of plumbing in the build files has been done to accommodate the
change as much as possible. If we're to use meson.build in the
'test/system' subdir we better also install the data from there.

This also adjust the CI playbooks to launch the tests via Meson by
specifying the specific test suite ('system').

This change also means the test suite needs to be run from the
'test/system' subdirectory for the bats helper libraries to be
discovered correctly.

containers#1062
@HarryMichal HarryMichal force-pushed the test/system/add-to-meson-v2 branch from 0c42ab0 to eb57489 Compare October 1, 2023 10:17
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/f7859340ef014e9ca967f2732d88976e

✔️ unit-test SUCCESS in 8m 21s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 11s
unit-test-restricted RETRY_LIMIT in 6m 38s
system-test-fedora-rawhide FAILURE in 37m 06s
✔️ system-test-fedora-38 SUCCESS in 25m 35s
✔️ system-test-fedora-37 SUCCESS in 25m 02s

A bit of plumbing in the build files has been done to accommodate the
change as much as possible. If we're to use meson.build in the
'test/system' subdir we better also install the data from there.

This also adjust the CI playbooks to launch the tests via Meson by
specifying the specific test suite ('system').

This change also means the test suite needs to be run from the
'test/system' subdirectory for the bats helper libraries to be
discovered correctly.

containers#1062
@HarryMichal HarryMichal force-pushed the test/system/add-to-meson-v2 branch from eb57489 to 20e9f6b Compare October 1, 2023 11:21
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/5a67bebfe51b41799880595f76f1dfbe

✔️ unit-test SUCCESS in 8m 13s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 08s
✔️ unit-test-restricted SUCCESS in 7m 04s
system-test-fedora-rawhide FAILURE in 35m 50s
✔️ system-test-fedora-38 SUCCESS in 25m 09s
✔️ system-test-fedora-37 SUCCESS in 24m 24s

Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @HarryMichal !

@@ -19,13 +19,8 @@ subid_dep = cc.find_library('subid', has_headers: ['shadow/subid.h'])
go = find_program('go')
go_md2man = find_program('go-md2man')

bats = find_program('bats', required: false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to move them? Isn't it a lot more obvious to have all the dependencies listed in the top level meson.build? Otherwise, distributors will have to go through all the meson.build files, which most won't do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary. To me it made sense to have purely testing dependencies specified in the test subdirectory. I can move those back to the root build file.

shellcheck = find_program('shellcheck', required: false)
skopeo = find_program('skopeo', required: false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of Podman and Skopeo, they aren't just dependencies for the test suite, but also runtime dependencies for the main toolbox(1) binary. So moving them under test/system can be misleading.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the podman binary is an oversight and I didn't realise at the time of writing that skopeo is now a runtime dependency. That wasn't the case in the past.

Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the output of the system tests changed.

They no longer have a working counter:

fedora-38 | ▶ 1/1 version: Check version using option --version in 52ms OK
fedora-38 | ▶ 1/1 help: Try to run toolbox with no command in 203ms OK
fedora-38 | ▶ 1/1 help: Run command 'help' in 146ms OK

It's always 1/1 and doesn't show how many more tests are left to go.

The reasons for a failure are also no longer shown:

fedora-rawhide | ▶ 1/1 version: Check version using option --version in 49ms OK
fedora-rawhide | ▶ 1/1 help: Try to run toolbox with no command in 212ms OK
fedora-rawhide | ▶ 1/1 help: Run command 'help' in 166ms FAIL

Finally, are the codespell tests failing on Ubuntu?

@HarryMichal
Copy link
Member Author

HarryMichal commented Nov 1, 2023

They no longer have a working counter:

This seems to be a deliberate design decision from Meson. This issue seems to be related to that. I'll ask around.

The reasons for a failure are also no longer shown

That is a known issue (mesonbuild/meson#11185) and is yet to be resolved. We could contribute that feature but who has the time :). Until then (and most likely even after) we can upload meson-logs as an artifact.

Finally, are the codespell tests failing on Ubuntu?

Once we start uploading the log artifacts, we'll know for sure :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. Build System Issue is related to the build system 2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,.. 3. Enhancement Improvement to an existing feature 6. Minor Change Should not cause breakage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants