From 933fbaf5acbd292887c584e997811326247a65ea Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 24 May 2016 11:45:42 -0700 Subject: Add distrib test support for c++. --- tools/run_tests/distribtest_targets.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'tools/run_tests/distribtest_targets.py') diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index ae918be21d..1a7aa0bfc8 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -238,9 +238,37 @@ class PHPDistribTest(object): return self.name +class CppDistribTest(object): + """Tests Cpp make intall by building examples.""" + + def __init__(self, platform, arch, docker_suffix=None): + self.name = 'cpp_%s_%s_%s' % (platform, arch, docker_suffix) + self.platform = platform + self.arch = arch + self.docker_suffix = docker_suffix + self.labels = ['distribtest', 'cpp', platform, arch, docker_suffix] + + def pre_build_jobspecs(self): + return [] + + def build_jobspec(self): + if self.platform == 'linux': + return create_docker_jobspec(self.name, + 'tools/dockerfile/distribtest/cpp_%s_%s' % ( + self.docker_suffix, + self.arch), + 'test/distrib/cpp/run_distrib_test.sh') + else: + raise Exception("Not supported yet.") + + def __str__(self): + return self.name + + def targets(): """Gets list of supported targets""" - return [CSharpDistribTest('linux', 'x64', 'wheezy'), + return [CppDistribTest('linux', 'x64', 'jessie'), + CSharpDistribTest('linux', 'x64', 'wheezy'), CSharpDistribTest('linux', 'x64', 'jessie'), CSharpDistribTest('linux', 'x86', 'jessie'), CSharpDistribTest('linux', 'x64', 'centos7'), -- cgit v1.2.3