This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch merge-with-upstream
in repository https://gitbox.apache.org/repos/asf/cloudberry-pxf.git

commit b42eb7096793c87e14c2ff87844091ab4dd2a479
Author: Himanshu Pandey <[email protected]>
AuthorDate: Thu Oct 20 14:17:37 2022 -0700

    Resolving conflicts
---
 .../components/common/DbSystemObject.java          |  1 -
 concourse/scripts/pxf_common.bash                  | 12 ++--
 concourse/scripts/test.bash                        | 75 +++++++++++++++++++---
 concourse/tasks/test.yml                           |  5 +-
 4 files changed, 72 insertions(+), 21 deletions(-)

diff --git 
a/automation/src/main/java/org/greenplum/pxf/automation/components/common/DbSystemObject.java
 
b/automation/src/main/java/org/greenplum/pxf/automation/components/common/DbSystemObject.java
index e07e2456..c389ea5b 100755
--- 
a/automation/src/main/java/org/greenplum/pxf/automation/components/common/DbSystemObject.java
+++ 
b/automation/src/main/java/org/greenplum/pxf/automation/components/common/DbSystemObject.java
@@ -358,7 +358,6 @@ public abstract class DbSystemObject extends 
BaseSystemObject implements IDbFunc
                if (table != null) {
                        tableName = table.getName();
                }
-               // TODO : Conflict with Alex's PR need to remove later.
                return metaData.getTables(null, null, "%" + tableName, new 
String[] { "TABLE", "FOREIGN TABLE" });
        }
 
diff --git a/concourse/scripts/pxf_common.bash 
b/concourse/scripts/pxf_common.bash
index c313a32c..d071d6e4 100755
--- a/concourse/scripts/pxf_common.bash
+++ b/concourse/scripts/pxf_common.bash
@@ -53,13 +53,11 @@ function inflate_dependencies() {
                tarballs+=(regression-tools/regression-tools.tar.gz)
        fi
 
-  # TODO : Conflict with Alex's PR need to remove later.
-  # when running automation against GP7, we need python2 dependencies shipped 
with gp6 to make Tinc work
-  # if required, these libraries will be fetched by a CI pipeline under 
gp6-python-libs directory
-  if [[ -f gp6-python-libs/gp6-python-libs.tar.gz ]]; then
-    tarballs+=(gp6-python-libs/gp6-python-libs.tar.gz)
-  fi
-
+       # when running automation against GP7, we need python2 dependencies 
shipped with gp6 to make Tinc work
+       # if required, these libraries will be fetched by a CI pipeline under 
gp6-python-libs directory
+       if [[ -f gp6-python-libs/gp6-python-libs.tar.gz ]]; then
+               tarballs+=(gp6-python-libs/gp6-python-libs.tar.gz)
+       fi
        (( ${#tarballs[@]} == 0 )) && return
        for t in "${tarballs[@]}"; do
                tar -xzf "${t}" -C ~gpadmin
diff --git a/concourse/scripts/test.bash b/concourse/scripts/test.bash
index b2e724ed..77f27409 100755
--- a/concourse/scripts/test.bash
+++ b/concourse/scripts/test.bash
@@ -67,6 +67,65 @@ function run_pg_regress() {
        su gpadmin -c ~gpadmin/run_pxf_automation_test.sh
 }
 
+function run_pxf_automation() {
+       # Let's make sure that automation/singlecluster directories are 
writeable
+       chmod a+w pxf_src/automation /singlecluster || true
+       find pxf_src/automation/tinc* -type d -exec chmod a+w {} \;
+
+       local extension_name="pxf"
+       if [[ ${USE_FDW} == "true" ]]; then
+               extension_name="pxf_fdw"
+       fi
+
+       #TODO: remove once exttable tests with GP7 are set
+       if [[ ${GROUP} == fdw_gpdb_schedule ]]; then
+               extension_name="pxf_fdw"
+       fi
+
+       su gpadmin -c "
+               source '${GPHOME}/greenplum_path.sh' &&
+               psql -p ${PGPORT} -d template1 -c 'CREATE EXTENSION 
${extension_name}'
+       "
+       # prepare certification output directory
+       mkdir -p certification
+       chmod a+w certification
+
+       cat > ~gpadmin/run_pxf_automation_test.sh <<-EOF
+               #!/usr/bin/env bash
+               set -exo pipefail
+
+               source ~gpadmin/.pxfrc
+
+               export PATH=\$PATH:${GPHD_ROOT}/bin
+               export GPHD_ROOT=${GPHD_ROOT}
+               export PXF_HOME=${PXF_HOME}
+               export PGPORT=${PGPORT}
+               export USE_FDW=${USE_FDW}
+
+               cd pxf_src/automation
+               time make GROUP=${GROUP} test
+
+               # if the test is successful, create certification file
+               gpdb_build_from_sql=\$(psql -c 'select version()' | grep 
Greenplum | cut -d ' ' -f 6,8)
+               gpdb_build_clean=\${gpdb_build_from_sql%)}
+               pxf_version=\$(< ${PXF_HOME}/version)
+               echo "GPDB-\${gpdb_build_clean/ commit:/-}-PXF-\${pxf_version}" 
> "${PWD}/certification/certification.txt"
+               echo
+               echo 
'****************************************************************************************************'
+               echo "Wrote certification : \$(< 
${PWD}/certification/certification.txt)"
+               echo 
'****************************************************************************************************'
+       EOF
+
+       chown gpadmin:gpadmin ~gpadmin/run_pxf_automation_test.sh
+       chmod a+x ~gpadmin/run_pxf_automation_test.sh
+
+       if [[ ${ACCEPTANCE} == true ]]; then
+               echo 'Acceptance test pipeline'
+               exit 1
+       fi
+
+       su gpadmin -c ~gpadmin/run_pxf_automation_test.sh
+}
 
 function generate_extras_fat_jar() {
        mkdir -p /tmp/fatjar
@@ -137,7 +196,6 @@ if [[ ${GP_VER} -ge 7 ]]; then
   cp ${HEADER_FILE_GP7}/extaccess.h  
${GPHOME}/include/postgresql/server/extension/gp_exttable_fdw
 fi
 
-
        # Install PXF
        if [[ -d pxf_package ]]; then
                # forward compatibility pipeline works with PXF rpms, not rpm 
tarballs
@@ -203,15 +261,12 @@ fi
 
        inflate_dependencies
 
-  # TODO : Conflict with Alex's PR need to remove later.
-  # To run Tinc against GP7 we need to modify PYTHONPATH in 
$GPHOME/greenplum_path.sh since Tinc calls that script
-  # we will set PYTHONPATH to point to the set of python libs compiled with 
Python2 for GP6
-  if [[ ${GP_VER} == 7 ]]; then
-    local gp6_python_libs=~gpadmin/python
-    echo "export PYTHONPATH=${gp6_python_libs}" >> 
/usr/local/greenplum-db/greenplum_path.sh
-  fi
-
-
+       # To run Tinc against GP7 we need to modify PYTHONPATH in 
$GPHOME/greenplum_path.sh since Tinc calls that script
+       # we will set PYTHONPATH to point to the set of python libs compiled 
with Python2 for GP6
+       if [[ ${GP_VER} == 7 ]]; then
+         local gp6_python_libs=~gpadmin/python
+         echo "export PYTHONPATH=${gp6_python_libs}" >> 
/usr/local/greenplum-db/greenplum_path.sh
+       fi
 
        ln -s "${PWD}/pxf_src" ~gpadmin/pxf_src
 
diff --git a/concourse/tasks/test.yml b/concourse/tasks/test.yml
index 6f89f8c9..b868ff46 100644
--- a/concourse/tasks/test.yml
+++ b/concourse/tasks/test.yml
@@ -13,9 +13,9 @@ inputs:
   optional: true
 - name: pxf_fdw_tarball
   optional: true
-- name: pxf_gp7_headerfile
+- name: gp6-python-libs
   optional: true
-- name: gp6-python-libs # TODO : Conflict with Alex's PR need to remove later.
+- name: pxf_gp7_headerfile
   optional: true
 
 params:
@@ -35,6 +35,5 @@ params:
   PG_REGRESS:
   USE_FDW: false
   ADJUST_AUTOMATION: true
-
 run:
   path: pxf_src/concourse/scripts/test.bash


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to