Skip to content

Commit 10347a7

Browse files
committed
Fix CI: Standardize env sourcing style and add full regress dependencies
1 parent 6e86336 commit 10347a7

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/binary-swap-check.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,13 @@ jobs:
417417
# Compile pg_regress
418418
make -C "${SRC_DIR}/src/test/regress" pg_regress
419419
420-
# Prepare artifact directory
420+
cd "${SRC_DIR}/src/test/regress"
421+
make
421422
mkdir -p "${GITHUB_WORKSPACE}/regress_bin"
422-
cp "${SRC_DIR}/src/test/regress/pg_regress" "${GITHUB_WORKSPACE}/regress_bin/"
423+
cp pg_regress "${GITHUB_WORKSPACE}/regress_bin/"
424+
cp init_file "${GITHUB_WORKSPACE}/regress_bin/" || true
425+
cp *.pl "${GITHUB_WORKSPACE}/regress_bin/" || true
426+
cp *.pm "${GITHUB_WORKSPACE}/regress_bin/" || true
423427
# Copy any necessary shared libraries or init files if needed
424428
cp "${SRC_DIR}/src/test/regress/init_file" "${GITHUB_WORKSPACE}/regress_bin/" || true
425429
@@ -593,9 +597,9 @@ jobs:
593597
# The test_binary_swap.sh script expects pg_regress at ../regress/pg_regress
594598
# We are running from src/test/binary_swap, so it looks for src/test/regress/pg_regress
595599
mkdir -p "${SRC_DIR}/src/test/regress"
596-
cp "${GITHUB_WORKSPACE}/regress_bin/pg_regress" "${SRC_DIR}/src/test/regress/"
597-
cp "${GITHUB_WORKSPACE}/regress_bin/init_file" "${SRC_DIR}/src/test/regress/" || true
600+
cp ${GITHUB_WORKSPACE}/regress_bin/* "${SRC_DIR}/src/test/regress/"
598601
chmod +x "${SRC_DIR}/src/test/regress/pg_regress"
602+
chmod +x "${SRC_DIR}/src/test/regress/"*.pl || true
599603
ls -la "${SRC_DIR}/src/test/regress/"
600604
601605
- name: Run Binary Swap Tests

src/test/binary_swap/test_binary_swap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ if ! [ -e schedule1${VARIANT} -a \
121121
fi
122122

123123
## Grab the Cloudberry versions of each binary for display
124-
CURRENT_VERSION=`$GPHOME_CURRENT/bin/gpstart --version | awk '{ for (i=3; i<NF; i++) printf $i " "; print $NF }'`
125-
OTHER_VERSION=`$GPHOME_OTHER/bin/gpstart --version | awk '{ for (i=3; i<NF; i++) printf $i " "; print $NF }'`
124+
CURRENT_VERSION=$( (source $GPHOME_CURRENT/cloudberry-env.sh 2>/dev/null || source $GPHOME_CURRENT/greenplum_path.sh 2>/dev/null; $GPHOME_CURRENT/bin/gpstart --version) | awk '{ for (i=3; i<NF; i++) printf $i " "; print $NF }' )
125+
OTHER_VERSION=$( (source $GPHOME_OTHER/cloudberry-env.sh 2>/dev/null || source $GPHOME_OTHER/greenplum_path.sh 2>/dev/null; $GPHOME_OTHER/bin/gpstart --version) | awk '{ for (i=3; i<NF; i++) printf $i " "; print $NF }' )
126126

127127
echo "Binary Swap tests"
128128
echo "=================================================="

0 commit comments

Comments
 (0)