From 09727630b1c7a8240ce5c91f219b59b8a6a3dd73 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Feb 2016 13:09:21 -0800 Subject: [PATCH 1/4] Enable Node distrib tests on Mac --- tools/run_tests/distribtest_targets.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index fc7dd171458..b83cd168831 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -119,15 +119,21 @@ class NodeDistribTest(object): return [] def build_jobspec(self): - if self.platform not in ('linux',): + if self.platform == 'linux': + return create_docker_jobspec(self.name, + 'tools/dockerfile/distribtest/node_%s_%s' % ( + self.docker_suffix, + self.arch), + 'test/distrib/node/run_distrib_test.sh %s' % ( + self.node_version)) + elif self.platform == 'macos': + return create_jobspec(self.name, + ['test/distrib/node/run_distrib_test.sh', + str(self.node_version)], + environ={'EXTERNAL_GIT_ROOT': '../../..'}) + else: raise Exception("Not supported yet.") - return create_docker_jobspec(self.name, - 'tools/dockerfile/distribtest/node_%s_%s' % ( - self.docker_suffix, - self.arch), - 'test/distrib/node/run_distrib_test.sh %s' % ( - self.node_version)) def __str__(self): return self.name @@ -232,6 +238,6 @@ def targets(): ] + [ NodeDistribTest('linux', 'x64', os, version) for os in ('wheezy', 'jessie', 'ubuntu1204', 'ubuntu1404', - 'ubuntu1504', 'ubuntu1510', 'ubuntu1604') + 'ubuntu1504', 'ubuntu1510', 'ubuntu1604', 'macos') for version in ('0.10', '0.12', '3', '4', '5') ] From 617b4b8ac3375f37870d39c5cc2ff006c1e2156d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Feb 2016 14:45:45 -0800 Subject: [PATCH 2/4] Fixed node mac distrib tests --- tools/run_tests/distribtest_targets.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index b83cd168831..cc91e863fa7 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -106,14 +106,15 @@ class NodeDistribTest(object): """Tests Node package""" def __init__(self, platform, arch, docker_suffix, node_version): - self.name = 'node_npm_%s_%s_%s_%s' % (platform, arch, - docker_suffix, node_version) + self.name = 'node_npm_%s_%s_%s' % (platform, arch, node_version) self.platform = platform self.arch = arch - self.docker_suffix = docker_suffix self.node_version = node_version self.labels = ['distribtest', 'node', platform, arch, docker_suffix, 'node-%s' % node_version] + if docker_suffix is not None: + self.name += '_%s' % docker_suffix + self.docker_suffix = docker_suffix def pre_build_jobspecs(self): return [] @@ -234,6 +235,11 @@ def targets(): RubyDistribTest('linux', 'x64', 'ubuntu1504'), RubyDistribTest('linux', 'x64', 'ubuntu1510'), RubyDistribTest('linux', 'x64', 'ubuntu1604'), + NodeDistribTest('macos', 'x64', None, '0.10'), + NodeDistribTest('macos', 'x64', None, '0.12'), + NodeDistribTest('macos', 'x64', None, '3'), + NodeDistribTest('macos', 'x64', None, '4'), + NodeDistribTest('macos', 'x64', None, '5'), NodeDistribTest('linux', 'x86', 'jessie', '4') ] + [ NodeDistribTest('linux', 'x64', os, version) From f25318c65efe1e616901e3e65b1facbee484cd6c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Feb 2016 14:52:30 -0800 Subject: [PATCH 3/4] Removed macos from the docker_suffix list --- tools/run_tests/distribtest_targets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index cc91e863fa7..d0efdc0fd63 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -244,6 +244,6 @@ def targets(): ] + [ NodeDistribTest('linux', 'x64', os, version) for os in ('wheezy', 'jessie', 'ubuntu1204', 'ubuntu1404', - 'ubuntu1504', 'ubuntu1510', 'ubuntu1604', 'macos') + 'ubuntu1504', 'ubuntu1510', 'ubuntu1604') for version in ('0.10', '0.12', '3', '4', '5') ] From 830f9a7780d1f2243181fb47c955e51e5d39ab00 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 10 Feb 2016 10:28:28 -0800 Subject: [PATCH 4/4] Node Mac distribtest: fix handling of docker_suffix=None --- tools/run_tests/distribtest_targets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index d0efdc0fd63..a46917c71e5 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -111,10 +111,11 @@ class NodeDistribTest(object): self.arch = arch self.node_version = node_version self.labels = ['distribtest', 'node', platform, arch, - docker_suffix, 'node-%s' % node_version] + 'node-%s' % node_version] if docker_suffix is not None: self.name += '_%s' % docker_suffix self.docker_suffix = docker_suffix + self.labels.append(docker_suffix) def pre_build_jobspecs(self): return []