#!/usr/bin/env bash # Minimal repro: patches' own tests depend on later patches. # repro_prefix_tests.sh # 1) at 0002: test_fileops/t/001 sets max_logical_revert_workers (added in 0005) # -> FATAL: unrecognized configuration parameter; pg_ctl start fails. # 2) at 0004: recovery/t/073 (and 074,075,083,089, test_checksums/025) do # CREATE TABLE ... USING flux (added in 0019) # -> ERROR: access method "flux" does not exist. # recovery/t/114 needs shared_preload_libraries=test_idxundo (added in 0006). set -eu SRC=$1; T2=$2; T4=$3; W=$(mktemp -d) run() { # $1 tag, $2 test dir, $3 tests git -C "$SRC" worktree add -q --detach "$W/$1" "$1" (cd "$W/$1" && ./configure -q --enable-cassert --enable-tap-tests --enable-injection-points \ --without-icu >/dev/null && make -s -j8 >/dev/null && make -s -C contrib -j8 >/dev/null \ && make -C "$2" check PROVE_TESTS="$3" 2>&1 | tail -5) grep -hE 'FATAL|ERROR' "$W/$1/$2"/tmp_check/log/* | head -3 } run "$T2" src/test/modules/test_fileops t/001_fileops_apply_failure.pl run "$T4" src/test/recovery t/073_perbackend_2pc_rollback.pl