@@ -112,51 +112,119 @@ jobs:
112112 ALL_TESTS='{
113113 "include": [
114114 {"test":"ic-good-opt-off",
115- "make_configs":["src/test/regress:installcheck-good"],
116- "pg_settings":{"optimizer":"off"}
115+ "make_configs":["src/test/regress:installcheck-good"],
116+ "pg_settings":{"optimizer":"off"}
117117 },
118- {"test":"ic-isolation2-basic",
119- "make_configs":["src/test/isolation2:installcheck-isolation2"],
120- "pg_settings":{"optimizer":"off"},
118+ {"test":"ic-good-opt-on",
119+ "make_configs":["src/test/regress:installcheck-good"],
120+ "pg_settings":{"optimizer":"on"}
121+ },
122+ {"test":"pax-ic-good-opt-off",
123+ "make_configs":[
124+ "contrib/pax_storage/:pax-test",
125+ "contrib/pax_storage/:regress_test"
126+ ],
127+ "pg_settings":{
128+ "optimizer":"off",
129+ "default_table_access_method":"pax"
130+ }
131+ },
132+ {"test":"pax-ic-good-opt-on",
133+ "make_configs":[
134+ "contrib/pax_storage/:pax-test",
135+ "contrib/pax_storage/:regress_test"
136+ ],
137+ "pg_settings":{
138+ "optimizer":"on",
139+ "default_table_access_method":"pax"
140+ }
141+ },
142+ {"test":"pax-ic-isolation2-opt-off",
143+ "make_configs":["contrib/pax_storage/:isolation2_test"],
144+ "pg_settings":{
145+ "optimizer":"off",
146+ "default_table_access_method":"pax"
147+ },
121148 "enable_core_check":false
149+ },
150+ {"test":"pax-ic-isolation2-opt-on",
151+ "make_configs":["contrib/pax_storage/:isolation2_test"],
152+ "pg_settings":{
153+ "optimizer":"on",
154+ "default_table_access_method":"pax"
155+ },
156+ "enable_core_check":false
157+ },
158+ {"test":"ic-expandshrink",
159+ "make_configs":["src/test/isolation2:installcheck-expandshrink"]
160+ },
161+ {"test":"ic-singlenode",
162+ "make_configs":["src/test/isolation:installcheck-singlenode",
163+ "src/test/singlenode_regress:installcheck-singlenode",
164+ "src/test/singlenode_isolation2:installcheck-singlenode"],
165+ "num_primary_mirror_pairs":0
166+ },
167+ {"test":"ic-resgroup-v2",
168+ "make_configs":["src/test/isolation2:installcheck-resgroup-v2"],
169+ "enable_cgroups":true
170+ },
171+ {"test":"ic-contrib",
172+ "make_configs":["contrib/auto_explain:installcheck",
173+ "contrib/amcheck:installcheck",
174+ "contrib/citext:installcheck",
175+ "contrib/btree_gin:installcheck",
176+ "contrib/btree_gist:installcheck",
177+ "contrib/dblink:installcheck",
178+ "contrib/dict_int:installcheck",
179+ "contrib/dict_xsyn:installcheck",
180+ "contrib/extprotocol:installcheck",
181+ "contrib/file_fdw:installcheck",
182+ "contrib/formatter_fixedwidth:installcheck",
183+ "contrib/hstore:installcheck",
184+ "contrib/indexscan:installcheck",
185+ "contrib/pg_trgm:installcheck",
186+ "contrib/indexscan:installcheck",
187+ "contrib/pgcrypto:installcheck",
188+ "contrib/pgstattuple:installcheck",
189+ "contrib/tablefunc:installcheck",
190+ "contrib/passwordcheck:installcheck",
191+ "contrib/pg_buffercache:installcheck",
192+ "contrib/sslinfo:installcheck"]
193+ },
194+ {"test":"ic-gpcontrib",
195+ "make_configs":["gpcontrib/orafce:installcheck",
196+ "gpcontrib/zstd:installcheck",
197+ "gpcontrib/gp_sparse_vector:installcheck",
198+ "gpcontrib/gp_toolkit:installcheck",
199+ "gpcontrib/gp_exttable_fdw:installcheck"]
200+ },
201+ {"test":"ic-fixme",
202+ "make_configs":["src/test/regress:installcheck-fixme"],
203+ "enable_core_check":false
204+ },
205+ {"test":"ic-isolation2",
206+ "make_configs":["src/test/isolation2:installcheck-isolation2"]
207+ },
208+ {"test":"ic-isolation2-hot-standby",
209+ "make_configs":["src/test/isolation2:installcheck-hot-standby"]
210+ },
211+ {"test":"ic-isolation2-crash",
212+ "make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
213+ "enable_core_check":false
214+ },
215+ {"test":"ic-parallel-retrieve-cursor",
216+ "make_configs":["src/test/isolation2:installcheck-parallel-retrieve-cursor"]
217+ },
218+ {"test":"ic-cbdb-parallel",
219+ "make_configs":["src/test/regress:installcheck-cbdb-parallel"]
220+ },
221+ {"test":"ic-recovery",
222+ "make_configs":["src/test/recovery:installcheck"],
223+ "enable_core_check":false
122224 }
123225 ]
124226 }'
125227
126- # Tests to be added as PG16 support improves:
127- # - ic-good-opt-off: Basic installcheck with optimizer off (includes greenplum_schedule)
128- # {"test":"ic-good-opt-off",
129- # "make_configs":["src/test/regress:installcheck-good"],
130- # "pg_settings":{"optimizer":"off"}
131- # }
132- #
133- # - ic-good-opt-on: Basic installcheck with optimizer on (requires ORCA)
134- # {"test":"ic-good-opt-on",
135- # "make_configs":["src/test/regress:installcheck-good"],
136- # "pg_settings":{"optimizer":"on"}
137- # }
138- #
139- # - ic-contrib: Contrib module tests
140- # {"test":"ic-contrib",
141- # "make_configs":["contrib/auto_explain:installcheck",
142- # "contrib/citext:installcheck"]
143- # }
144- #
145- # - ic-gpcontrib: GPContrib module tests
146- # {"test":"ic-gpcontrib",
147- # "make_configs":["gpcontrib/orafce:installcheck",
148- # "gpcontrib/gp_toolkit:installcheck"]
149- # }
150- #
151- # - ic-isolation2-advanced: More isolation2 tests
152- # {"test":"ic-isolation2-expandshrink",
153- # "make_configs":["src/test/isolation2:installcheck-expandshrink"]
154- # }
155- # {"test":"ic-isolation2-crash",
156- # "make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
157- # "enable_core_check":false
158- # }
159-
160228 # Function to apply defaults to test configurations
161229 apply_defaults() {
162230 echo "$1" | jq --arg npm "$DEFAULT_NUM_PRIMARY_MIRROR_PAIRS" \
@@ -656,62 +724,59 @@ jobs:
656724 NUM_PRIMARY_MIRROR_PAIRS=${{ matrix.num_primary_mirror_pairs }} make create-demo-cluster
657725 " 2>&1 | tee -a ${LOGS_DIR}/details/cluster-creation.log
658726
659- - name : Configure PostgreSQL Settings
727+ - name : Run Tests
660728 env :
661729 SRC_DIR : ${{ github.workspace }}
662730 run : |
663731 set -eo pipefail
664732
665- # Apply PostgreSQL settings from matrix configuration
666- su - gpadmin -c "
667- source ${INSTALL_PREFIX}/greenplum_path.sh
668- source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh
669-
670- # Set optimizer if specified
671- OPTIMIZER='${{ matrix.pg_settings.optimizer }}'
672- if [ -n \"\$OPTIMIZER\" ]; then
673- echo \"Setting optimizer to: \$OPTIMIZER\"
674- gpconfig -c optimizer -v \$OPTIMIZER
675- gpstop -u
733+ # Build PGOPTIONS from matrix pg_settings
734+ PG_OPTS=""
735+ if [[ "${{ matrix.pg_settings.optimizer != '' }}" == "true" ]]; then
736+ PG_OPTS="$PG_OPTS -c optimizer=${{ matrix.pg_settings.optimizer }}"
737+ fi
738+ if [[ "${{ matrix.pg_settings.default_table_access_method != '' }}" == "true" ]]; then
739+ PG_OPTS="$PG_OPTS -c default_table_access_method=${{ matrix.pg_settings.default_table_access_method }}"
740+ fi
741+
742+ # Read configs into array
743+ IFS=' ' read -r -a configs <<< "${{ join(matrix.make_configs, ' ') }}"
744+
745+ echo "=== Starting test execution for ${{ matrix.test }} ==="
746+ echo "Number of configurations to execute: ${#configs[@]}"
747+ echo "PGOPTIONS: ${PG_OPTS}"
748+ echo ""
749+
750+ overall_status=0
751+
752+ for ((i=0; i<${#configs[@]}; i++)); do
753+ config="${configs[$i]}"
754+ IFS=':' read -r dir target <<< "$config"
755+
756+ echo "=== Executing configuration $((i+1))/${#configs[@]} ==="
757+ echo "Make command: make -C $dir $target"
758+
759+ config_log="${LOGS_DIR}/details/make-${{ matrix.test }}-config$i.log"
760+
761+ if ! su - gpadmin -c "
762+ source ${INSTALL_PREFIX}/greenplum_path.sh
763+ source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh
764+ make -C ${SRC_DIR}/src/test/regress
765+ cd ${SRC_DIR}
766+ PGOPTIONS='${PG_OPTS}' make -C $dir $target
767+ " 2>&1 | tee "$config_log"; then
768+ echo "::warning::Test execution failed for configuration $((i+1)): make -C $dir $target"
769+ overall_status=1
676770 fi
677- " 2>&1 | tee -a ${LOGS_DIR}/details/pg-settings.log
771+ done
678772
679- - name : Run Tests
680- env :
681- SRC_DIR : ${{ github.workspace }}
682- run : |
683- set -eo pipefail
773+ if [ "$overall_status" -ne 0 ]; then
774+ echo "::error::One or more test configurations failed for ${{ matrix.test }}"
775+ exit 1
776+ fi
684777
685- # Run each make target from the test configuration
686- MAKE_CONFIGS='${{ join(matrix.make_configs, ' ') }}'
687-
688- su - gpadmin -c "
689- source ${INSTALL_PREFIX}/greenplum_path.sh
690- source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh
691-
692- cd ${SRC_DIR}
693-
694- echo '=== Running Tests for ${{ matrix.test }} ==='
695- echo 'Make configurations: ${MAKE_CONFIGS}'
696-
697- # Parse and run each make config
698- for config in ${MAKE_CONFIGS}; do
699- DIR=\$(echo \$config | cut -d: -f1)
700- TARGET=\$(echo \$config | cut -d: -f2)
701-
702- echo \"\"
703- echo \"Running: make -C \$DIR \$TARGET\"
704- echo \"\"
705-
706- if ! make -C \$DIR \$TARGET; then
707- echo \"::error::Test failed: \$DIR:\$TARGET\"
708- exit 1
709- fi
710- done
711-
712- echo \"\"
713- echo \"All tests completed successfully\"
714- " 2>&1 | tee -a ${LOGS_DIR}/details/test-run.log
778+ echo ""
779+ echo "All tests completed successfully"
715780
716781 - name : Collect Test Results
717782 if : always()
0 commit comments