Skip to content

Commit fb29f89

Browse files
committed
test: add one more sanity-check that all tests are running
1 parent 30d385a commit fb29f89

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flake.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
pythonEnabledPostgres.plpython3
144144
multicornPostgresExtension
145145
]);
146+
147+
pgMajorVersion = pkgs.lib.versions.major test_postgresql.version;
148+
expectedTestCount = if pkgs.lib.versionOlder pgMajorVersion "14" then "18" else "19";
146149
in pkgs.stdenv.mkDerivation {
147150
name = "multicorn2-python-test-pg${test_postgresql.version}-py${test_python.version}";
148151

@@ -193,7 +196,7 @@
193196
# PG17+ has a regression-test optimization to reduce initdb runs by doing initdb once and copying it to future
194197
# tests. However, it fails to work in this build environment -- `with_temp_install=""` disables that
195198
# optimization.
196-
make with_temp_install="" easycheck
199+
make with_temp_install="" easycheck | tee /build/easycheck.log
197200
RESULT=$?
198201
set -e
199202
if [[ $RESULT -ne 0 ]]; then
@@ -204,6 +207,10 @@
204207
exit $RESULT
205208
fi
206209
210+
echo "Verifying all ${expectedTestCount} test suites were executed..."
211+
# should exit non-zero if grep doesn't match
212+
grep "All ${expectedTestCount} tests passed." /build/easycheck.log
213+
207214
runHook postCheck
208215
'';
209216
installPhase = "touch $out";

0 commit comments

Comments
 (0)