Skip to content

Commit

Permalink
ci: run passing tests on macos
Browse files Browse the repository at this point in the history
Problem: a subset of flux works on macos so far, but because we do
not run 'make check' in CI, regressions are likely.

Add a script that runs specific tests known to work on macos.
Call it from the macos builder in CI.
  • Loading branch information
garlick committed Dec 16, 2024
1 parent 726299f commit a472a28
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ jobs:
run: scripts/configure-macos.sh
- name: make, including test programs
run: make check -j4 TESTS=
- name: check what works so far
run: scripts/check-macos.sh

generate-matrix:
# https://stackoverflow.com/questions/59977364
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ EXTRA_DIST = \
scripts/install-deps-deb.sh \
scripts/install-deps-rpm.sh \
scripts/install-deps-macos.sh \
scripts/configure-macos.sh
scripts/configure-macos.sh \
scripts/check-macos.sh

ACLOCAL_AMFLAGS = -I config

Expand Down
27 changes: 27 additions & 0 deletions scripts/check-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Check what should work so far in src/common on macos

die() {
echo "$(basename $0): $@" >&2
exit 1
}

CONF_SCRIPT=scripts/configure-macos.sh

test -f $CONF_SCRIPT || die "please run from the top level of the source tree"
test -f configure || die "please run $CONF_SCRIPT first"

COMMON_WORKING="libtap libtestutil libyuarel libpmi liblsd libutil libflux libfluxutil libkvs libjob liboptparse libidset libtomlc99 libschedutil libeventlog libioencode librouter libdebugged libcontent libjob libhostlist libczmqcontainers libccan libzmqutil libtaskmap libfilemap libsdexec libmissing"
COMMON_BROKEN="libsubprocess libterminus librlist"

make -j4 -C src/common check SUBDIRS="$COMMON_WORKING" || die "check failed"

cat >&2 <<-EOT
=============================================
* Well the unit tests that worked before on macos still work!
* However, please note that the macos port of flux-core is incomplete.
* Search for 'macos' at https://github.com/flux-framework/flux-core/issues
* for portability issues that still need to be resolved.
=============================================
EOT

0 comments on commit a472a28

Please sign in to comment.