mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-19 20:00:51 +08:00
meson: ci: ensure tests are built before running them
Meson 1.7 stopped building all the dependencies of tests as part of the default build target. But it does breaks CI because we only built the default target before running the test, and ran the tests with --no-rebuild. The simplest fix would be to remove --no-rebuild from MTEST_ARGS, but it seems better to explicitly build the test dependencies, so compiler warnings / errors are visible as part of the build step. Discussion: https://postgr.es/m/CAGECzQSvM3iSDmjF+=Kof5an6jN8UbkP_4cKKT9w6GZavmb5yQ@mail.gmail.com Backpatch: 16-, where meson was added
This commit is contained in:
parent
26aca4de43
commit
b2bdb972c0
@ -17,6 +17,9 @@ env:
|
||||
CHECK: check-world PROVE_FLAGS=$PROVE_FLAGS
|
||||
CHECKFLAGS: -Otarget
|
||||
PROVE_FLAGS: --timer
|
||||
# Build test dependencies as part of the build step, to see compiler
|
||||
# errors/warnings in one place.
|
||||
MBUILD_TARGET: all testprep
|
||||
MTEST_ARGS: --print-errorlogs --no-rebuild -C build
|
||||
PGCTLTIMEOUT: 120 # avoids spurious failures during parallel tests
|
||||
TEMP_CONFIG: ${CIRRUS_WORKING_DIR}/src/tools/ci/pg_ci_base.conf
|
||||
@ -99,7 +102,7 @@ task:
|
||||
EOF
|
||||
build_script: |
|
||||
su postgres <<-EOF
|
||||
ninja -C build -j${BUILD_JOBS}
|
||||
ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}
|
||||
EOF
|
||||
upload_caches: ccache
|
||||
|
||||
@ -178,7 +181,7 @@ task:
|
||||
-Dextra_lib_dirs=/usr/local/lib -Dextra_include_dirs=/usr/local/include/ \
|
||||
build
|
||||
EOF
|
||||
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
|
||||
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}'
|
||||
upload_caches: ccache
|
||||
|
||||
test_world_script: |
|
||||
@ -381,8 +384,8 @@ task:
|
||||
build-32
|
||||
EOF
|
||||
|
||||
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
|
||||
build_32_script: su postgres -c 'ninja -C build-32 -j${BUILD_JOBS}'
|
||||
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}'
|
||||
build_32_script: su postgres -c 'ninja -C build-32 -j${BUILD_JOBS} ${MBUILD_TARGET}'
|
||||
|
||||
upload_caches: ccache
|
||||
|
||||
@ -503,7 +506,7 @@ task:
|
||||
-Duuid=e2fs -Ddtrace=auto \
|
||||
build
|
||||
|
||||
build_script: ninja -C build -j${BUILD_JOBS}
|
||||
build_script: ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}
|
||||
upload_caches: ccache
|
||||
|
||||
test_world_script: |
|
||||
@ -576,7 +579,7 @@ task:
|
||||
|
||||
build_script: |
|
||||
vcvarsall x64
|
||||
ninja -C build
|
||||
ninja -C build %MBUILD_TARGET%
|
||||
|
||||
check_world_script: |
|
||||
vcvarsall x64
|
||||
@ -634,7 +637,7 @@ task:
|
||||
%BASH% -c "meson setup -Ddebug=true -Doptimization=g -Dcassert=true -Dinjection_points=true -Db_pch=true -Dnls=disabled -DTAR=%TAR% build"
|
||||
|
||||
build_script: |
|
||||
%BASH% -c "ninja -C build"
|
||||
%BASH% -c "ninja -C build ${MBUILD_TARGET}"
|
||||
|
||||
upload_caches: ccache
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user