未验证 提交 483164a5 编写于 作者: L Larry Hamel 提交者: GitHub

Refactor test_gpdb.py for different modes (#3901)

- Handle missing case for codegen mode
Signed-off-by: NLarry Hamel <lhamel@pivotal.io>
上级 35a59e81
......@@ -9,6 +9,7 @@ import sys
from builds.GpBuild import GpBuild
def install_gpdb(dependency_name):
status = subprocess.call("mkdir -p /usr/local/gpdb", shell=True)
if status:
......@@ -18,6 +19,7 @@ def install_gpdb(dependency_name):
shell=True)
return status
def create_gpadmin_user():
status = subprocess.call("gpdb_src/concourse/scripts/setup_gpadmin_user.bash")
os.chmod('/bin/ping', os.stat('/bin/ping').st_mode | stat.S_ISUID)
......@@ -50,29 +52,22 @@ def configure():
"--with-perl",
"--with-libxml",
"--with-python",
"--disable-gpcloud",
"--with-libs=/usr/local/gpdb/lib",
"--with-includes=/usr/local/gpdb/include",
"--with-libs=/usr/local/gpdb/lib"
"--with-includes=/usr/local/gpdb/include"
"--prefix=/usr/local/gpdb"], env=p_env, shell=True, cwd="gpdb_src")
def main():
parser = optparse.OptionParser()
parser.add_option("--build_type", dest="build_type", default="RELEASE")
parser.add_option("--mode", choices=['orca', 'codegen', 'orca_codegen', 'planner'])
parser.add_option("--mode", choices=['orca', 'planner'])
parser.add_option("--compiler", dest="compiler")
parser.add_option("--cxxflags", dest="cxxflags")
parser.add_option("--output_dir", dest="output_dir", default="install")
parser.add_option("--gpdb_name", dest="gpdb_name")
(options, args) = parser.parse_args()
if options.mode == 'orca':
ciCommon = GpBuild(options.mode)
elif options.mode == 'planner':
ciCommon = GpBuild(options.mode)
gp_build = GpBuild(options.mode)
# for dependency in args:
# status = ciCommon.install_dependency(dependency)
# if status:
# return status
status = install_gpdb(options.gpdb_name)
if status:
return status
......@@ -83,12 +78,13 @@ def main():
if status:
return status
if os.getenv("TEST_SUITE", "icg") == 'icw':
status = ciCommon.install_check('world')
status = gp_build.install_check('world')
else:
status = ciCommon.install_check()
status = gp_build.install_check()
if status:
copy_output()
return status
if __name__ == "__main__":
sys.exit(main())
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册