Repository: aurora Updated Branches: refs/heads/master 80ae5e8ca -> 43f58bb86
Simplify test BUILD files to one target per directory. Reviewed at https://reviews.apache.org/r/41778/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/43f58bb8 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/43f58bb8 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/43f58bb8 Branch: refs/heads/master Commit: 43f58bb862cd0ea464589fadf2bb9c2051502d39 Parents: 80ae5e8 Author: Bill Farner <[email protected]> Authored: Tue Dec 29 18:06:46 2015 -0800 Committer: Bill Farner <[email protected]> Committed: Tue Dec 29 18:06:46 2015 -0800 ---------------------------------------------------------------------- src/test/python/BUILD | 21 -- src/test/python/apache/aurora/BUILD | 14 +- src/test/python/apache/aurora/admin/BUILD | 53 +---- src/test/python/apache/aurora/client/BUILD | 36 +--- src/test/python/apache/aurora/client/api/BUILD | 101 +--------- src/test/python/apache/aurora/client/cli/BUILD | 192 +------------------ .../python/apache/aurora/client/hooks/BUILD | 19 +- src/test/python/apache/aurora/common/BUILD | 65 +------ .../apache/aurora/common/health_check/BUILD | 22 +-- src/test/python/apache/aurora/config/BUILD | 38 +--- src/test/python/apache/aurora/executor/BUILD | 89 +-------- .../python/apache/aurora/executor/bin/BUILD | 11 +- .../python/apache/aurora/executor/common/BUILD | 136 +------------ src/test/python/apache/aurora/tools/BUILD | 13 +- src/test/python/apache/thermos/BUILD | 24 --- src/test/python/apache/thermos/cli/BUILD | 21 +- src/test/python/apache/thermos/common/BUILD | 27 +-- src/test/python/apache/thermos/config/BUILD | 11 +- src/test/python/apache/thermos/core/BUILD | 100 +--------- src/test/python/apache/thermos/monitoring/BUILD | 32 +--- src/test/python/apache/thermos/observer/BUILD | 12 +- .../python/apache/thermos/observer/http/BUILD | 12 +- 22 files changed, 71 insertions(+), 978 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/BUILD b/src/test/python/BUILD deleted file mode 100644 index a607f32..0000000 --- a/src/test/python/BUILD +++ /dev/null @@ -1,21 +0,0 @@ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -target( - name = 'all', - dependencies = [ - 'src/test/python/apache/aurora:all', - 'src/test/python/apache/thermos:all', - ] -) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/BUILD b/src/test/python/apache/aurora/BUILD index 82e944a..626f110 100644 --- a/src/test/python/apache/aurora/BUILD +++ b/src/test/python/apache/aurora/BUILD @@ -12,20 +12,8 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - 'src/test/python/apache/aurora/admin:all', - 'src/test/python/apache/aurora/client:all', - 'src/test/python/apache/aurora/common:all', - 'src/test/python/apache/aurora/config:all', - 'src/test/python/apache/aurora/executor:all', - 'src/test/python/apache/aurora/tools:all', - ] -) - python_library( - name = 'api_util', + name = 'aurora', sources = [ 'api_util.py' ], dependencies = [ 'api/src/main/thrift/org/apache/aurora/gen', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/admin/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/admin/BUILD b/src/test/python/apache/aurora/admin/BUILD index ca05c3f..093537e 100644 --- a/src/test/python/apache/aurora/admin/BUILD +++ b/src/test/python/apache/aurora/admin/BUILD @@ -12,63 +12,18 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':admin', - ':host_maintenance', - ':maintenance' - ], -) - python_tests( - name='admin', - sources = [ - 'test_admin.py', - 'test_admin_sla.py', - 'test_admin_util.py', - ], + name = 'admin', + sources = globs('*.py'), dependencies = [ - ':util', '3rdparty/python:mock', '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/admin', - 'api/src/main/thrift/org/apache/aurora/gen', - ], -) - -python_tests(name = 'host_maintenance', - sources = ['test_host_maintenance.py'], - dependencies = [ - ':util', - '3rdparty/python:mock', '3rdparty/python:twitter.common.log', '3rdparty/python:twitter.common.quantity', - 'src/main/python/apache/aurora/admin', - 'src/main/python/apache/aurora/client', - 'src/main/python/apache/aurora/common', 'api/src/main/thrift/org/apache/aurora/gen', - ], -) - -python_tests( - name='maintenance', - sources = [ - 'test_maintenance.py', - ], - dependencies = [ - ':util', - '3rdparty/python:mock', 'src/main/python/apache/aurora/admin', - ], -) - -python_library( - name='util', - sources = [ 'util.py' ], - dependencies = [ - '3rdparty/python:mock', - 'api/src/main/thrift/org/apache/aurora/gen', 'src/main/python/apache/aurora/client', - 'src/test/python/apache/aurora:api_util', + 'src/main/python/apache/aurora/common', + 'src/test/python/apache/aurora', ], ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/client/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/BUILD b/src/test/python/apache/aurora/client/BUILD index c9d7616..0dc7b8e 100644 --- a/src/test/python/apache/aurora/client/BUILD +++ b/src/test/python/apache/aurora/client/BUILD @@ -12,47 +12,21 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':base', - ':binding_helper', - ':config', - 'src/test/python/apache/aurora/client/api:all', - 'src/test/python/apache/aurora/client/cli:all', - 'src/test/python/apache/aurora/client/hooks:all', - ], -) - python_tests( - name = 'binding_helper', - sources = ['test_binding_helper.py'], - dependencies = [ - '3rdparty/python:pystachio', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - 'src/main/python/apache/aurora/config', - ], -) - -python_tests(name = 'base', - sources = ['test_base.py'], + name = 'client', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - ], -) - -python_tests(name = 'config', - sources = ['test_config.py'], - dependencies = [ '3rdparty/python:mox', '3rdparty/python:pystachio', + '3rdparty/python:twitter.common.contextutil', 'src/main/python/apache/aurora/client', + 'src/main/python/apache/aurora/config', ], ) python_library( - name = 'fake_scheduler_proxy', + name = 'lib_fake_scheduler_proxy', sources = ['fake_scheduler_proxy.py'], dependencies = [ 'src/main/python/apache/aurora/client', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/client/api/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/api/BUILD b/src/test/python/apache/aurora/client/api/BUILD index 2a55cec..e974224 100644 --- a/src/test/python/apache/aurora/client/api/BUILD +++ b/src/test/python/apache/aurora/client/api/BUILD @@ -12,108 +12,15 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':api', - ':instance_watcher', - ':job_monitor', - ':mux', - ':quota_check', - ':restarter', - ':scheduler_client', - ':sla', - ':task_util', - ':updater_util' - ], -) - -python_tests(name = 'api', - sources = ['test_api.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen' - ], -) - -python_tests(name = 'job_monitor', - sources = ['test_job_monitor.py'], +python_tests( + name = 'api', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen', - 'src/test/python/apache/aurora/client:fake_scheduler_proxy', - ], -) - -python_tests(name = 'instance_watcher', - sources = ['test_instance_watcher.py', 'test_health_check.py'], - dependencies = [ '3rdparty/python:mox', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests(name = 'mux', - sources = ['test_scheduler_mux.py'], - dependencies = [ - 'src/main/python/apache/aurora/client', - ] -) - -python_tests(name = 'quota_check', - sources = ['test_quota_check.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests(name = 'restarter', - sources = ['test_restarter.py'], - dependencies = [ - '3rdparty/python:mox', 'src/main/python/apache/aurora/client', 'src/main/python/apache/aurora/common', - 'api/src/main/thrift/org/apache/aurora/gen', - 'src/test/python/apache/aurora/client:fake_scheduler_proxy', - ], -) - -python_tests(name = 'scheduler_client', - sources = ['test_scheduler_client.py'], - dependencies = [ - '3rdparty/python:mock', - '3rdparty/python:mox', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests(name = 'sla', - sources = ['test_sla.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests(name = 'task_util', - sources = ['test_task_util.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests(name = 'updater_util', - sources = ['test_updater_util.py'], - dependencies = [ - 'src/main/python/apache/aurora/client', - 'api/src/main/thrift/org/apache/aurora/gen' + 'src/test/python/apache/aurora/client:lib_fake_scheduler_proxy', ], ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/client/cli/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/cli/BUILD b/src/test/python/apache/aurora/client/cli/BUILD index 6d4d5e9..16c4eb5 100644 --- a/src/test/python/apache/aurora/client/cli/BUILD +++ b/src/test/python/apache/aurora/client/cli/BUILD @@ -12,199 +12,13 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':api', - ':client', - ':command_hooks', - ':context', - ':cron', - ':inspect', - ':job', - ':config', - ':options', - ':plugins', - ':quota', - ':sla', - ':task', - ':supdate', - ':version', - ] -) - -python_library( - name = 'util', - sources = [ 'util.py' ], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - 'src/test/python/apache/aurora:api_util', - ] -) - -python_tests( - name='inspect', - sources = [ 'test_inspect.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name='supdate', - sources = [ 'test_supdate.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'command_hooks', - sources = [ 'test_command_hooks.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'api', - sources = [ 'test_api_from_cli.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - - -python_tests( - name = 'config', - sources = [ 'test_config_noun.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'job', - sources = [ - 'test_create.py', - 'test_diff.py', - 'test_kill.py', - 'test_open.py', - 'test_restart.py', - 'test_status.py', - ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - python_tests( - name = 'cron', - sources = [ - 'test_cron.py', - ], + name = 'cli', + sources = globs('*.py'), dependencies = [ - ':util', '3rdparty/python:mock', '3rdparty/python:twitter.common.contextutil', 'src/main/python/apache/aurora/client', - ] -) - - -python_tests( - name = 'quota', - sources = [ 'test_quota.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'sla', - sources = [ 'test_sla.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name='task', - sources = [ 'test_task.py'], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'plugins', - sources = [ 'test_plugins.py' ], - dependencies = [ - ':util', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'client', - sources = [ 'test_client.py' ], - dependencies = [ - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'version', - sources = [ 'test_version.py' ], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'context', - sources = [ 'test_context.py' ], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/client', - ] -) - -python_tests( - name = 'options', - sources = [ 'test_options.py' ], - dependencies = [ - 'src/main/python/apache/aurora/client', + 'src/test/python/apache/aurora', ] ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/client/hooks/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/hooks/BUILD b/src/test/python/apache/aurora/client/hooks/BUILD index 8d43e43..47c86d9 100644 --- a/src/test/python/apache/aurora/client/hooks/BUILD +++ b/src/test/python/apache/aurora/client/hooks/BUILD @@ -12,26 +12,11 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':hooked_api', - ':non_hooked_api', - ], -) - -python_tests(name = 'hooked_api', - sources = ['test_hooked_api.py'], +python_tests(name = 'hooks', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/aurora/common', 'src/main/python/apache/aurora/client', - ] -) - -python_tests(name = 'non_hooked_api', - sources = ['test_non_hooked_api.py'], - dependencies = [ - 'src/main/python/apache/aurora/common', - 'src/main/python/apache/aurora/client', ], ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/common/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/common/BUILD b/src/test/python/apache/aurora/common/BUILD index 7909ab5..b3991ee 100644 --- a/src/test/python/apache/aurora/common/BUILD +++ b/src/test/python/apache/aurora/common/BUILD @@ -12,75 +12,14 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':test_aurora_job_key', - ':test_cluster', - ':test_clusters', - ':test_cluster_option', - ':test_pex_version', - ':test_shellify', - ':test_transport', - ] -) - -python_tests(name = 'test_aurora_job_key', - sources = ['test_aurora_job_key.py'], - dependencies = [ - 'src/main/python/apache/aurora/common' - ], -) - python_tests( - name = 'test_pex_version', - sources = ['test_pex_version.py'], + name = 'common', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', - 'src/main/python/apache/aurora/common', - ] -) - -python_tests( - name = 'test_cluster', - sources = ['test_cluster.py'], - dependencies = [ - 'src/main/python/apache/aurora/common', - ] -) - -python_tests( - name = 'test_clusters', - sources = ['test_clusters.py'], - dependencies = [ '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/common', - ] -) - -python_tests( - name = 'test_cluster_option', - sources = ['test_cluster_option.py'], - dependencies = [ '3rdparty/python:twitter.common.options', - 'src/main/python/apache/aurora/common', - ] -) - -python_tests( - name = 'test_shellify', - sources = ['test_shellify.py'], - dependencies = [ - 'src/main/python/apache/aurora/common', - ] -) - -python_tests( - name = 'test_transport', - sources = ['test_transport.py'], - dependencies = [ 'api/src/main/thrift/org/apache/aurora/gen', 'src/main/python/apache/aurora/common', - '3rdparty/python:mock', ] ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/common/health_check/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/common/health_check/BUILD b/src/test/python/apache/aurora/common/health_check/BUILD index 98a2481..e73f0c0 100644 --- a/src/test/python/apache/aurora/common/health_check/BUILD +++ b/src/test/python/apache/aurora/common/health_check/BUILD @@ -12,28 +12,12 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':test_http_signaler', - ':test_shell', - ] -) - python_tests( - name = 'test_http_signaler', - sources = ['test_http_signaler.py'], + name = 'health_check', + sources = globs('*py'), dependencies = [ + '3rdparty/python:mock', '3rdparty/python:mox', 'src/main/python/apache/aurora/common', ] ) - -python_tests( - name = 'test_shell', - sources = ['test_shell.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/common', - ] -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/config/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/config/BUILD b/src/test/python/apache/aurora/config/BUILD index 2072422..52b6040 100644 --- a/src/test/python/apache/aurora/config/BUILD +++ b/src/test/python/apache/aurora/config/BUILD @@ -12,27 +12,12 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':test_base', - ':test_constraint_parsing', - ':test_loader', - ':test_thrift', - ] -) - -python_tests(name = 'test_base', - sources = ['test_base.py'], - dependencies = [ - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/config', - ] -) - -python_tests(name = 'test_loader', - sources = ['test_loader.py'], +python_tests( + name = 'config', + sources = globs('*py'), dependencies = [ '3rdparty/python:twitter.common.contextutil', + 'api/src/main/thrift/org/apache/aurora/gen', 'src/main/python/apache/aurora/config', ], coverage = [ @@ -40,18 +25,3 @@ python_tests(name = 'test_loader', 'apache.thermos.config' ] ) - -python_tests(name = 'test_constraint_parsing', - sources = ['test_constraint_parsing.py'], - dependencies = [ - 'src/main/python/apache/aurora/config', - ] -) - -python_tests(name = 'test_thrift', - sources = ['test_thrift.py'], - dependencies = [ - 'src/main/python/apache/aurora/config', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/executor/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/executor/BUILD b/src/test/python/apache/aurora/executor/BUILD index d50948a..d572474 100644 --- a/src/test/python/apache/aurora/executor/BUILD +++ b/src/test/python/apache/aurora/executor/BUILD @@ -12,97 +12,22 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':executor-small', - ':executor-large', - ] -) - - -target( - name = 'executor-small', - dependencies = [ - ':executor_base', - ':executor_vars', - ':http_lifecycle', - ':status_manager', - ':thermos_task_runner', - 'src/test/python/apache/aurora/executor/common:all', - ], -) - - -target( - name = 'executor-large', - dependencies = [ - ':thermos_executor', - ] -) - -python_tests(name = 'thermos_executor', - sources = ['test_thermos_executor.py'], -# timeout = Amount(5, Time.MINUTES), +python_tests( + name = 'executor', + sources = globs('*.py'), dependencies = [ + '3rdparty/python:mesos.interface', '3rdparty/python:mock', '3rdparty/python:twitter.common.app', + '3rdparty/python:twitter.common.contextutil', + '3rdparty/python:twitter.common.dirutil', '3rdparty/python:twitter.common.exceptions', + '3rdparty/python:twitter.common.log', '3rdparty/python:twitter.common.quantity', 'api/src/main/thrift/org/apache/aurora/gen', 'src/main/python/apache/aurora/config', 'src/main/python/apache/aurora/executor', 'src/main/python/apache/thermos/core', 'src/main/python/apache/thermos/monitoring', - ] -) - -python_tests(name = 'thermos_task_runner', - sources = ['test_thermos_task_runner.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - '3rdparty/python:twitter.common.dirutil', - '3rdparty/python:twitter.common.log', - '3rdparty/python:twitter.common.quantity', - 'src/main/python/apache/aurora/config', - 'src/main/python/apache/aurora/executor', - ] -) - -python_tests(name = 'executor_base', - sources = ['test_executor_base.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.log', - 'src/main/python/apache/aurora/executor', - ], -) - -python_tests(name = 'status_manager', - sources = ['test_status_manager.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - '3rdparty/python:mock', - 'src/main/python/apache/aurora/executor', - ], -) - -python_tests(name = 'executor_vars', - sources = ['test_executor_vars.py'], - dependencies = [ - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/executor', - ] -) - -python_tests(name = 'http_lifecycle', - sources = ['test_http_lifecycle.py'], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/config', - 'src/main/python/apache/aurora/executor', ], ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/executor/bin/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/executor/bin/BUILD b/src/test/python/apache/aurora/executor/bin/BUILD index ca8b5f7..c9dcb9f 100644 --- a/src/test/python/apache/aurora/executor/bin/BUILD +++ b/src/test/python/apache/aurora/executor/bin/BUILD @@ -12,16 +12,9 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':thermos_executor_entry_point', - ] -) - python_tests( - name = 'thermos_executor_entry_point', - sources = ['test_thermos_executor_entry_point.py'], + name = 'bin', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/aurora/executor', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/executor/common/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/executor/common/BUILD b/src/test/python/apache/aurora/executor/common/BUILD index 025947e..5b79430 100644 --- a/src/test/python/apache/aurora/executor/common/BUILD +++ b/src/test/python/apache/aurora/executor/common/BUILD @@ -12,144 +12,22 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':announcer', - ':directory_sandbox', - ':executor_detector', - ':executor_timeout', - ':health_checker', - ':kill_manager', - ':path_detector', - ':status_checker', - ':task_info', - ] -) - -python_tests(name = 'executor_detector', - sources = [ 'test_executor_detector.py' ], - dependencies = [ - '3rdparty/python:twitter.common.contextutil', - '3rdparty/python:twitter.common.dirutil', - 'src/main/python/apache/aurora/executor', - ] -) - -python_tests(name = 'path_detector', - sources = [ 'test_path_detector.py' ], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/executor', - ] -) - -python_library( - name = 'fixtures', - sources = ['fixtures.py'], - dependencies = [ - 'src/main/python/apache/aurora/config', - 'api/src/main/thrift/org/apache/aurora/gen', - ], -) - -python_tests( - name = 'announcer', - sources = ['test_announcer.py'], - dependencies = [ - '3rdparty/python:mock', - '3rdparty/python:twitter.common.quantity', - '3rdparty/python:twitter.common.testing', - 'src/main/python/apache/aurora/executor', - ], -) - python_tests( - name = 'directory_sandbox', - sources = ['test_directory_sandbox.py'], - dependencies = [ - '3rdparty/python:mock', - '3rdparty/python:twitter.common.contextutil', - 'src/main/python/apache/aurora/executor', - ], -) - -python_tests( - name = 'health_checker', - sources = ['test_health_checker.py'], - dependencies = [ - ':fixtures', - '3rdparty/python:mesos.interface', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.testing', - 'src/main/python/apache/aurora/common', - 'src/main/python/apache/aurora/executor', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests( - name = 'status_checker', - sources = ['test_status_checker.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - 'src/main/python/apache/aurora/executor', - ] -) - -python_tests( - name = 'kill_manager', - sources = ['test_kill_manager.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - 'src/main/python/apache/aurora/executor', - ], -) - -python_tests( - name = 'task_info', - sources = ['test_task_info.py'], - dependencies = [ - ':fixtures', - 'src/main/python/apache/aurora/executor', - 'api/src/main/thrift/org/apache/aurora/gen', - ] -) - -python_tests( - name = 'executor_timeout', - sources = ['test_executor_timeout.py'], - dependencies = [ - '3rdparty/python:mesos.interface', - '3rdparty/python:mock', - '3rdparty/python:twitter.common.quantity', - 'src/main/python/apache/aurora/executor', - ], -) - -python_tests( - name = 'resource_manager', - sources = [ 'test_resource_manager.py' ], - dependencies = [ - '3rdparty/python:mock', - 'src/main/python/apache/aurora/config', - 'src/main/python/apache/aurora/executor', - 'src/main/python/apache/thermos/config', - 'src/main/python/apache/thermos/monitoring', - ] -) - -python_tests( - name = 'resource_manager_integration', - sources = [ 'test_resource_manager_integration.py' ], + name = 'common', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mesos.interface', '3rdparty/python:mock', '3rdparty/python:twitter.common.contextutil', '3rdparty/python:twitter.common.dirutil', + '3rdparty/python:twitter.common.quantity', + '3rdparty/python:twitter.common.testing', 'api/src/main/thrift/org/apache/aurora/gen', + 'src/main/python/apache/aurora/common', 'src/main/python/apache/aurora/config', 'src/main/python/apache/aurora/executor', + 'src/main/python/apache/thermos/config', 'src/main/python/apache/thermos/core', + 'src/main/python/apache/thermos/monitoring', ] ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/aurora/tools/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/tools/BUILD b/src/test/python/apache/aurora/tools/BUILD index c6014df..bf3bbf9 100644 --- a/src/test/python/apache/aurora/tools/BUILD +++ b/src/test/python/apache/aurora/tools/BUILD @@ -12,16 +12,11 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':thermos_observer_entry_point', - ] -) - -python_tests(name = 'thermos_observer_entry_point', - sources = ['test_thermos_observer_entry_point.py'], +python_tests( + name = 'tools', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/aurora/tools:thermos_observer', ] -) \ No newline at end of file +) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/BUILD b/src/test/python/apache/thermos/BUILD deleted file mode 100644 index 206fc05..0000000 --- a/src/test/python/apache/thermos/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -target( - name = 'all', - dependencies = [ - 'src/test/python/apache/thermos/common:all', - 'src/test/python/apache/thermos/config:all', - 'src/test/python/apache/thermos/core:all', - 'src/test/python/apache/thermos/cli:all', - 'src/test/python/apache/thermos/monitoring:all', - ] -) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/cli/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/cli/BUILD b/src/test/python/apache/thermos/cli/BUILD index e6284e3..401bdba 100644 --- a/src/test/python/apache/thermos/cli/BUILD +++ b/src/test/python/apache/thermos/cli/BUILD @@ -12,28 +12,11 @@ # limitations under the License. # -target( - name = 'all', - dependencies = [ - ':common', - ':main', - 'src/test/python/apache/thermos/cli/commands', - ] -) - python_tests( - name = 'common', - sources = ['test_common.py'], + name = 'cli', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/thermos/cli', ] ) - -python_tests( - name = 'main', - sources = ['test_main.py'], - dependencies = [ - 'src/main/python/apache/thermos/cli', - ] -) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/common/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/common/BUILD b/src/test/python/apache/thermos/common/BUILD index 460c82e..b570759 100644 --- a/src/test/python/apache/thermos/common/BUILD +++ b/src/test/python/apache/thermos/common/BUILD @@ -12,30 +12,9 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':test_pathspec', - ':test_planner', - ':test_task_planner', - ] -) - -python_tests(name = 'test_pathspec', - sources = ['test_pathspec.py'], - dependencies = [ - 'src/main/python/apache/thermos/common', - ], -) - -python_tests(name = 'test_planner', - sources = ['test_planner.py'], - dependencies = [ - 'src/main/python/apache/thermos/common', - ], -) - -python_tests(name = 'test_task_planner', - sources = ['test_task_planner.py'], +python_tests( + name = 'common', + sources = globs('*.py'), dependencies = [ '3rdparty/python:twitter.common.testing', 'src/main/python/apache/thermos/common', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/config/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/config/BUILD b/src/test/python/apache/thermos/config/BUILD index f11b9ee..a507157 100644 --- a/src/test/python/apache/thermos/config/BUILD +++ b/src/test/python/apache/thermos/config/BUILD @@ -12,14 +12,9 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':test_schema', - ] -) - -python_tests(name = 'test_schema', - sources = ['test_schema.py'], +python_tests( + name = 'config', + sources = globs('*.py'), dependencies = [ '3rdparty/python:twitter.common.collections', 'src/main/python/apache/thermos/config', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/core/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/core/BUILD b/src/test/python/apache/thermos/core/BUILD index 93c6e10..acfb79b 100644 --- a/src/test/python/apache/thermos/core/BUILD +++ b/src/test/python/apache/thermos/core/BUILD @@ -12,104 +12,16 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':small', - ':medium', - ':large', - ] -) - -target(name = 'small', - dependencies = [ - ':test_process', - ] -) - -target(name = 'medium', - dependencies = [ - ':test_ephemerals', - ':test_failing_runner', - ':test_failure_limit', - ':test_finalization', - ':test_helper', - ':test_runner_integration', - ] -) - -target(name = 'large', - dependencies = [ - ':test_angry', - ':test_staged_kill' - ] -) - -python_tests(name = 'test_runner_integration', - sources = ['test_runner_integration.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_angry', - sources = ['test_angry.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -# timeout = Amount(5, Time.MINUTES) -) - -python_tests(name = 'test_ephemerals', - sources = ['test_ephemerals.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_failing_runner', - sources = ['test_failing_runner.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_finalization', - sources = ['test_finalization.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_failure_limit', - sources = ['test_failure_limit.py'], - dependencies = [ - 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_helper', - sources = ['test_helper.py'], +python_tests( + name = 'core', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', '3rdparty/python:psutil', - 'src/main/python/apache/thermos/core', - ] -) - -python_tests(name = 'test_process', - sources = ['test_process.py'], - dependencies = [ - '3rdparty/python:mock', '3rdparty/python:twitter.common.contextutil', + '3rdparty/python:twitter.common.process', + 'src/main/python/apache/thermos/core', + 'src/main/python/apache/thermos/monitoring', 'src/main/python/apache/thermos/testing', - ], -) - -python_tests(name = 'test_staged_kill', - sources = ['test_staged_kill.py'], - dependencies = [ - '3rdparty/python:twitter.common.process', - 'src/main/python/apache/thermos/testing', - 'src/main/python/apache/thermos/monitoring', ] ) http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/monitoring/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/monitoring/BUILD b/src/test/python/apache/thermos/monitoring/BUILD index 514dd6c..8f2b393 100644 --- a/src/test/python/apache/thermos/monitoring/BUILD +++ b/src/test/python/apache/thermos/monitoring/BUILD @@ -12,36 +12,14 @@ # limitations under the License. # -target(name = 'all', - dependencies = [ - ':test_disk', - ':test_detector', - ':test_resource', - ] -) - -python_tests(name = 'test_disk', - sources = ['test_disk.py'], - dependencies = [ - 'src/main/python/apache/thermos/monitoring', - '3rdparty/python:twitter.common.quantity', - ] -) - -python_tests(name = 'test_detector', - sources = ['test_detector.py'], +python_tests( + name = 'monitoring', + sources = globs('*.py'), dependencies = [ + '3rdparty/python:mock', '3rdparty/python:twitter.common.contextutil', '3rdparty/python:twitter.common.dirutil', - 'src/main/python/apache/thermos/common', - 'src/main/python/apache/thermos/monitoring', - ] -) - -python_tests(name = 'test_resource', - sources = ['test_resource.py'], - dependencies = [ - '3rdparty/python:mock', + '3rdparty/python:twitter.common.quantity', 'src/main/python/apache/thermos/common', 'src/main/python/apache/thermos/monitoring', ] http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/observer/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/observer/BUILD b/src/test/python/apache/thermos/observer/BUILD index aec3feb..f3f697c 100644 --- a/src/test/python/apache/thermos/observer/BUILD +++ b/src/test/python/apache/thermos/observer/BUILD @@ -12,17 +12,9 @@ # limitations under the License. # - -target( - name = 'all', - dependencies = [ - ':test_detector', - ] -) - python_tests( - name = 'test_detector', - sources = ['test_detector.py'], + name = 'observer', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/thermos/observer', http://git-wip-us.apache.org/repos/asf/aurora/blob/43f58bb8/src/test/python/apache/thermos/observer/http/BUILD ---------------------------------------------------------------------- diff --git a/src/test/python/apache/thermos/observer/http/BUILD b/src/test/python/apache/thermos/observer/http/BUILD index 8dc3097..708f09b 100644 --- a/src/test/python/apache/thermos/observer/http/BUILD +++ b/src/test/python/apache/thermos/observer/http/BUILD @@ -12,17 +12,9 @@ # limitations under the License. # - -target( - name = 'all', - dependencies = [ - ':test_file_browser', - ] -) - python_tests( - name = 'test_file_browser', - sources = ['test_file_browser.py'], + name = 'http', + sources = globs('*.py'), dependencies = [ '3rdparty/python:mock', 'src/main/python/apache/thermos/monitoring',
