未验证 提交 de7eaa9d 编写于 作者: S Shreedhar Hardikar 提交者: GitHub

Extract test_orca as a separate job outside of compile step (#10819)

This is done to speed up development iterations by reducing the time the
of the "compile" job in the following pipelines, and starting ICW jobs
sooner. Runs the unit tests in parallel to ICW jobs.

Pipelines modified:
- gporca-dev
- master build pipeline
- master build pipeline without asserts
- PR pipeline
Co-authored-by: NShreedhar Hardikar <hardikar@cs.wisc.edu>
Co-authored-by: NChris Hajas <chajas@vmware.com>
上级 bc7ab7bd
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
## file (example: templates/gpdb-tpl.yml) and regenerate the pipeline ## file (example: templates/gpdb-tpl.yml) and regenerate the pipeline
## using appropriate tool (example: gen_pipeline.py -t prod). ## using appropriate tool (example: gen_pipeline.py -t prod).
## ---------------------------------------------------------------------- ## ----------------------------------------------------------------------
## Generated by gen_pipeline.py at: 2020-11-02 11:53:06.131787 ## Generated by gen_pipeline.py at: 2020-09-15 11:19:24.645167
## Template file: gpdb-tpl.yml ## Template file: gpdb-tpl.yml
## OS Types: ['centos6', 'centos7', 'ubuntu18.04', 'win'] ## OS Types: ['centos6', 'centos7', 'ubuntu18.04', 'win']
## Test Sections: ['ICW', 'Replication', 'ResourceGroups', 'Interconnect', 'CLI', 'UD', 'Extensions'] ## Test Sections: ['ICW', 'Replication', 'ResourceGroups', 'Interconnect', 'CLI', 'UD', 'Extensions']
...@@ -181,6 +181,7 @@ groups: ...@@ -181,6 +181,7 @@ groups:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
- gpexpand - gpexpand
- pg_upgrade - pg_upgrade
- icw_gporca_ubuntu18.04 - icw_gporca_ubuntu18.04
...@@ -850,6 +851,18 @@ jobs: ...@@ -850,6 +851,18 @@ jobs:
MAKE_TEST_COMMAND: -k PGOPTIONS='-c gp_interconnect_type=tcp -c optimizer=on' installcheck-world MAKE_TEST_COMMAND: -k PGOPTIONS='-c gp_interconnect_type=tcp -c optimizer=on' installcheck-world
TEST_OS: centos TEST_OS: centos
- name: unit_tests_gporca_centos7
plan:
- in_parallel:
steps:
- get: gpdb_src
passed: [compile_gpdb_centos7]
trigger: true
- get: gpdb7-centos7-build
- task: unit_tests_gporca
file: gpdb_src/concourse/tasks/unit_tests_gporca.yml
image: gpdb7-centos7-build
- name: icw_gporca_ubuntu18.04 - name: icw_gporca_ubuntu18.04
plan: plan:
- in_parallel: - in_parallel:
...@@ -941,6 +954,7 @@ jobs: ...@@ -941,6 +954,7 @@ jobs:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
- get: icw_planner_centos7_dump - get: icw_planner_centos7_dump
passed: passed:
...@@ -952,6 +966,7 @@ jobs: ...@@ -952,6 +966,7 @@ jobs:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
trigger: true trigger: true
- put: bin_gpdb_centos7_icw_green - put: bin_gpdb_centos7_icw_green
...@@ -3262,6 +3277,7 @@ jobs: ...@@ -3262,6 +3277,7 @@ jobs:
- icw_gporca_icproxy_ubuntu18.04 - icw_gporca_icproxy_ubuntu18.04
- icw_planner_icproxy_ubuntu18.04 - icw_planner_icproxy_ubuntu18.04
- cli_cross_subnet - cli_cross_subnet
- unit_tests_gporca_centos7
- gpmovemirrors - gpmovemirrors
- gpmovemirrors_ubuntu18 - gpmovemirrors_ubuntu18
- gppkg - gppkg
...@@ -3313,6 +3329,7 @@ jobs: ...@@ -3313,6 +3329,7 @@ jobs:
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
- resource_group_centos7 - resource_group_centos7
- cli_cross_subnet - cli_cross_subnet
- unit_tests_gporca_centos7
- gpmovemirrors - gpmovemirrors
- gppkg - gppkg
- analyzedb - analyzedb
......
...@@ -140,3 +140,10 @@ jobs: ...@@ -140,3 +140,10 @@ jobs:
TEST_OS: centos TEST_OS: centos
CONFIGURE_FLAGS: ((configure_flags)) CONFIGURE_FLAGS: ((configure_flags))
timeout: 5h timeout: 5h
- task: unit_tests_gporca_centos7
file: gpdb_pr/concourse/tasks/unit_tests_gporca.yml
image: gpdb7-centos7-build
input_mapping:
gpdb_src: gpdb_pr
timeout: 1h
...@@ -208,6 +208,7 @@ groups: ...@@ -208,6 +208,7 @@ groups:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
{% endif %} {% endif %}
{% if "centos7" in os_types and "CLI" in test_sections %} {% if "centos7" in os_types and "CLI" in test_sections %}
- gpexpand - gpexpand
...@@ -996,6 +997,18 @@ jobs: ...@@ -996,6 +997,18 @@ jobs:
MAKE_TEST_COMMAND: -k PGOPTIONS='-c gp_interconnect_type=tcp -c optimizer=on' installcheck-world MAKE_TEST_COMMAND: -k PGOPTIONS='-c gp_interconnect_type=tcp -c optimizer=on' installcheck-world
TEST_OS: centos TEST_OS: centos
- name: unit_tests_gporca_centos7
plan:
- in_parallel:
steps:
- get: gpdb_src
passed: [compile_gpdb_centos7]
trigger: [[ test_trigger ]]
- get: gpdb7-centos7-build
- task: unit_tests_gporca
file: gpdb_src/concourse/tasks/unit_tests_gporca.yml
image: gpdb7-centos7-build
{% endif %} {% endif %}
{% if "ubuntu18.04" in os_types %} {% if "ubuntu18.04" in os_types %}
- name: icw_gporca_ubuntu18.04 - name: icw_gporca_ubuntu18.04
...@@ -1099,6 +1112,7 @@ jobs: ...@@ -1099,6 +1112,7 @@ jobs:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
{% if "Extensions" in test_sections %} {% if "Extensions" in test_sections %}
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
{% endif %} {% endif %}
...@@ -1114,6 +1128,7 @@ jobs: ...@@ -1114,6 +1128,7 @@ jobs:
- icw_gporca_icproxy_centos7 - icw_gporca_icproxy_centos7
- icw_planner_icproxy_centos7 - icw_planner_icproxy_centos7
- icw_gporca_ictcp_centos7 - icw_gporca_ictcp_centos7
- unit_tests_gporca_centos7
{% if "Extensions" in test_sections %} {% if "Extensions" in test_sections %}
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
{% endif %} {% endif %}
...@@ -1822,6 +1837,7 @@ jobs: ...@@ -1822,6 +1837,7 @@ jobs:
- icw_gporca_icproxy_ubuntu18.04 - icw_gporca_icproxy_ubuntu18.04
- icw_planner_icproxy_ubuntu18.04 - icw_planner_icproxy_ubuntu18.04
- cli_cross_subnet - cli_cross_subnet
- unit_tests_gporca_centos7
{% for test in CLI_BEHAVE_TESTS %} {% for test in CLI_BEHAVE_TESTS %}
- [[ test.name ]] - [[ test.name ]]
{% if "ubuntu18.04" in os_types %} {% if "ubuntu18.04" in os_types %}
...@@ -1847,6 +1863,7 @@ jobs: ...@@ -1847,6 +1863,7 @@ jobs:
- icw_extensions_gpcloud_centos7 - icw_extensions_gpcloud_centos7
- resource_group_centos7 - resource_group_centos7
- cli_cross_subnet - cli_cross_subnet
- unit_tests_gporca_centos7
{% for test in CLI_BEHAVE_TESTS %} {% for test in CLI_BEHAVE_TESTS %}
- [[ test.name ]] - [[ test.name ]]
{% endfor %} {% endfor %}
......
...@@ -230,18 +230,6 @@ function build_xerces() ...@@ -230,18 +230,6 @@ function build_xerces()
rm -rf build rm -rf build
} }
function test_orca()
{
if [ -n "${SKIP_UNITTESTS}" ]; then
return
fi
OUTPUT_DIR="../../../../gpAux/ext/${BLD_ARCH}"
pushd ${GPDB_SRC_PATH}/src/backend/gporca
concourse/build_and_test.py --build_type=RelWithDebInfo --output_dir=${OUTPUT_DIR}
concourse/build_and_test.py --build_type=Debug --output_dir=${OUTPUT_DIR}
popd
}
function _main() { function _main() {
mkdir gpdb_src/gpAux/ext mkdir gpdb_src/gpAux/ext
...@@ -249,7 +237,6 @@ function _main() { ...@@ -249,7 +237,6 @@ function _main() {
centos|ubuntu|sles) centos|ubuntu|sles)
prep_env prep_env
build_xerces build_xerces
test_orca
install_deps install_deps
;; ;;
win32) win32)
......
#!/bin/bash
set -exo pipefail
GPDB_SRC_PATH=${GPDB_SRC_PATH:=gpdb_src}
function build_xerces
{
OUTPUT_DIR="gpdb_src/gpAux/ext/${BLD_ARCH}"
mkdir -p xerces_patch/concourse
cp -r gpdb_src/src/backend/gporca/concourse/xerces-c xerces_patch/concourse
/usr/bin/python xerces_patch/concourse/xerces-c/build_xerces.py --output_dir=${OUTPUT_DIR}
rm -rf build
}
function test_orca
{
if [ -n "${SKIP_UNITTESTS}" ]; then
return
fi
OUTPUT_DIR="../../../../gpAux/ext/${BLD_ARCH}"
pushd ${GPDB_SRC_PATH}/src/backend/gporca
concourse/build_and_test.py --build_type=RelWithDebInfo --output_dir=${OUTPUT_DIR}
concourse/build_and_test.py --build_type=Debug --output_dir=${OUTPUT_DIR}
popd
}
function _main
{
mkdir gpdb_src/gpAux/ext
build_xerces
test_orca
}
_main "$@"
platform: linux
image_resource:
type: docker-image
inputs:
- name: gpdb_src
run:
path: gpdb_src/concourse/scripts/unit_tests_gporca.bash
...@@ -116,3 +116,8 @@ jobs: ...@@ -116,3 +116,8 @@ jobs:
TEST_OS: centos TEST_OS: centos
CONFIGURE_FLAGS: ((configure_flags)) CONFIGURE_FLAGS: ((configure_flags))
timeout: 5h timeout: 5h
- task: unit_tests_gporca_centos7
file: gpdb_src/concourse/tasks/unit_tests_gporca.yml
image: gpdb7-centos7-build
timeout: 1h
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册