Skip to content

test: run tests on other BSD virtual machines#624

Merged
creativeprojects merged 16 commits into
masterfrom
test-other-platforms
Apr 8, 2026
Merged

test: run tests on other BSD virtual machines#624
creativeprojects merged 16 commits into
masterfrom
test-other-platforms

Conversation

@creativeprojects
Copy link
Copy Markdown
Owner

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.96%. Comparing base (cc83d53) to head (1735219).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #624      +/-   ##
==========================================
+ Coverage   80.76%   80.96%   +0.20%     
==========================================
  Files         164      163       -1     
  Lines       12116    12086      -30     
==========================================
  Hits         9785     9785              
+ Misses       1836     1806      -30     
  Partials      495      495              
Flag Coverage Δ
unittests 79.23% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@creativeprojects creativeprojects changed the title trying spawning freebsd VM test: run tests on other BSD virtual machines Apr 8, 2026
@creativeprojects creativeprojects marked this pull request as ready for review April 8, 2026 21:54
Copilot AI review requested due to automatic review settings April 8, 2026 21:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to enable running the repository’s Go build/test suite on additional BSD platforms by adding a dedicated GitHub Actions workflow and adjusting build constraints/tests that are not applicable on OpenBSD/NetBSD.

Changes:

  • Add a manual (“workflow_dispatch”) CI workflow to run go build / go test on FreeBSD, NetBSD, and OpenBSD VMs.
  • Adjust several //go:build constraints to exclude OpenBSD/NetBSD from systemd-related code/tests.
  • Reorganize a few scheduler handler type tests and add a small local qemu/ helper program + ignore its disk image directory.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
systemd/read.go Excludes OpenBSD/NetBSD from systemd unit reading implementation via build tags.
systemd/read_test.go Excludes OpenBSD/NetBSD from systemd unit reading tests via build tags.
systemd/generate.go Excludes OpenBSD/NetBSD from systemd unit generation implementation via build tags.
systemd/generate_test.go Excludes OpenBSD/NetBSD from systemd unit generation tests via build tags.
systemd/drop_ins.go Excludes OpenBSD/NetBSD from drop-in handling via build tags.
systemd/drop_ins_test.go Excludes OpenBSD/NetBSD from drop-in tests via build tags.
schedule/schedule_systemd_test.go Excludes OpenBSD/NetBSD from systemd scheduler init test via build tags.
schedule/handler_unix_test.go Removes some handler type tests; retains default-OS handler test.
schedule/handler_systemd.go Excludes OpenBSD/NetBSD from the systemd scheduler handler implementation via build tags.
schedule/handler_systemd_test.go Excludes OpenBSD/NetBSD from systemd handler tests via build tags; adds back a handler type assertion.
schedule/handler_darwin_test.go Removes a crond handler type assertion from Darwin-only tests.
schedule/handler_crond_test.go Adds a crond handler type assertion to the crond test file.
qemu/main.go Adds a small QEMU runner helper (local tooling).
preventsleep/caffeinate_test.go Restricts the caffeinate tests to darwin/windows/linux via build tags.
go.mod Bumps the go directive to 1.26.2.
crond/mock/main.go Simplifies mismatch reporting output in the crontab mock.
.gitignore Ignores qemu/disk_images/.
.github/workflows/test.yml Adds a new workflow to run tests on FreeBSD/NetBSD/OpenBSD VMs.
.github/workflows/build.yml Minor formatting change (removes an empty line).
Comments suppressed due to low confidence (1)

schedule/handler_unix_test.go:14

  • On openbsd/netbsd builds, HandlerSystemd is now excluded (see handler_systemd.go build tag), so this test won’t compile and the default OS handler will fall back to crond via the fallback provider. Update this test’s build tag to also exclude openbsd/netbsd, or change the assertion to expect HandlerCrond on those platforms (and avoid referencing HandlerSystemd where it doesn’t exist).
func TestHandlerDefaultOS(t *testing.T) {
	handler := NewHandler(SchedulerDefaultOS{})
	assert.IsType(t, &HandlerSystemd{}, handler)
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread schedule/handler_systemd.go Outdated
Comment thread schedule/schedule_systemd_test.go Outdated
Comment thread schedule/handler_systemd_test.go Outdated
Comment thread qemu/main.go Outdated
Comment thread .github/workflows/test.yml
@creativeprojects creativeprojects merged commit 6e338ae into master Apr 8, 2026
8 checks passed
@creativeprojects creativeprojects deleted the test-other-platforms branch April 8, 2026 22:15
@creativeprojects creativeprojects added this to the v0.34.0 milestone Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants