Skip to content

Commit

Permalink
Convert Mojo tests to use swarming.
Browse files Browse the repository at this point in the history
BUG=604847

Review-Url: https://codereview.chromium.org/1918143004
Cr-Commit-Position: refs/heads/master@{#390573}
  • Loading branch information
sammc authored and Commit bot committed Apr 29, 2016
1 parent 6684994 commit 98ecd4a
Show file tree
Hide file tree
Showing 29 changed files with 578 additions and 120 deletions.
27 changes: 22 additions & 5 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -638,17 +638,34 @@ group("mojo_apptests") {
testonly = true

deps = []
data_deps = []
data = []

if (is_win || is_linux) {
deps += [
"//components/resource_provider:resource_provider_unittests",
"//mash:mash_unittests",
"//media/mojo/services:tests",
"//ui/views/mus:tests",
deps += [ "//services/shell/standalone" ]
data_deps = [
"//media/mojo/services:media_apptests",
]
if (is_linux) {
data_deps += [ "//tools/xdisplaycheck" ]
}
data += [
"//mojo/tools/apptest_runner.py",
"//mojo/tools/data/apptests",
"//mojo/tools/mopy/",
"//testing/xvfb.py",
"//tools/swarming_client/utils/subprocess42.py",
]
}
}

group("mojo_apptests_run") {
testonly = true
deps = [
":mojo_apptests",
]
}

group("gn_only") {
testonly = true

Expand Down
4 changes: 3 additions & 1 deletion gin/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ source_set("gin_test") {
"test/v8_test.cc",
"test/v8_test.h",
]
data = [
"test/expect.js",
]

public_deps = [
":gin",
Expand Down Expand Up @@ -195,7 +198,6 @@ test("gin_unittests") {
data = [
"modules/module_registry_unittests.js",
"shell/hello_world.js",
"test/expect.js",
"test/file_unittests.js",
"test/gtest_unittests.js",
"../OWNERS",
Expand Down
19 changes: 19 additions & 0 deletions ipc/mojo/ipc_mojo.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,23 @@
],
},
],
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'ipc_mojo_unittests_run',
'type': 'none',
'dependencies': [
'ipc_mojo_unittests',
],
'includes': [
'../../build/isolate.gypi',
],
'sources': [
'ipc_mojo_unittests.isolate',
],
},
],
}],
],
}
23 changes: 23 additions & 0 deletions ipc/mojo/ipc_mojo_unittests.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../mojo/mojo.isolate',
],
'conditions': [
['OS=="win" or OS=="mac" or OS=="linux"', {
'variables': {
'command': [
'../../testing/test_env.py',
'<(PRODUCT_DIR)/ipc_mojo_unittests<(EXECUTABLE_SUFFIX)',
'--brave-new-test-launcher',
'--test-launcher-bot-mode',
],
'files': [
'../../testing/test_env.py',
],
},
}],
],
}
3 changes: 3 additions & 0 deletions mojo/edk/js/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ test("js_unittests") {
"//mojo/public/cpp/system",
"//mojo/public/interfaces/bindings/tests:test_interfaces",
"//mojo/public/interfaces/bindings/tests:test_interfaces_experimental",
"//mojo/public/js:tests",
]

sources = [
"//mojo/edk/js/handle_unittest.cc",
"run_js_tests.cc",
]
}
Expand All @@ -35,6 +37,7 @@ test("js_integration_tests") {
"//mojo/edk/test:test_support",
"//mojo/public/cpp/bindings",
"//mojo/public/interfaces/bindings/tests:test_interfaces",
"//mojo/public/js:bindings",
]

sources = [
Expand Down
6 changes: 6 additions & 0 deletions mojo/edk/js/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ source_set("js_to_cpp_tests") {
"js_to_cpp_tests.cc",
]

data = [
"connection_tests.js",
"js_to_cpp_tests.js",
"sample_service_tests.js",
]

configs += [ "//v8:external_startup_data" ]
}

Expand Down
31 changes: 31 additions & 0 deletions mojo/mojo.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../base/base.isolate',
],
'conditions': [
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/mojo_public_test_support.dll',
],
},
}],
['OS=="linux"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/lib/libmojo_public_test_support.so',
],
},
}],
['OS=="mac"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/libmojo_public_test_support.dylib',
],
},
}],
],
}
23 changes: 1 addition & 22 deletions mojo/mojo_common_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# found in the LICENSE file.
{
'includes': [
'../base/base.isolate',
'../mojo/mojo.isolate',
],
'conditions': [
['OS=="win" or OS=="mac" or OS=="linux"', {
Expand All @@ -19,26 +19,5 @@
],
},
}],
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/mojo_public_test_support.dll',
],
},
}],
['OS=="linux"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/lib/libmojo_public_test_support.so',
],
},
}],
['OS=="mac"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/libmojo_public_test_support.dylib',
],
},
}],
],
}
39 changes: 39 additions & 0 deletions mojo/mojo_edk_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,45 @@
'mojo_public_system_unittests.isolate',
],
},
{
'target_name': 'mojo_js_unittests_run',
'type': 'none',
'dependencies': [
'mojo_js_unittests',
],
'includes': [
'../build/isolate.gypi',
],
'sources': [
'mojo_js_unittests.isolate',
],
},
{
'target_name': 'mojo_js_integration_tests_run',
'type': 'none',
'dependencies': [
'mojo_js_integration_tests',
],
'includes': [
'../build/isolate.gypi',
],
'sources': [
'mojo_js_integration_tests.isolate',
],
},
{
'target_name': 'mojo_system_unittests_run',
'type': 'none',
'dependencies': [
'mojo_system_unittests',
],
'includes': [
'../build/isolate.gypi',
],
'sources': [
'mojo_system_unittests.isolate',
],
},
],
}],
],
Expand Down
49 changes: 49 additions & 0 deletions mojo/mojo_js_integration_tests.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../gin/v8.isolate',
'../mojo/mojo.isolate',
'../third_party/icu/icu.isolate',
],
'conditions': [
['OS=="win" or OS=="mac" or OS=="linux"', {
'variables': {
'command': [
'../testing/test_env.py',
'<(PRODUCT_DIR)/mojo_js_integration_tests<(EXECUTABLE_SUFFIX)',
'--brave-new-test-launcher',
'--test-launcher-bot-mode',
],
'files': [
'../gin/test/expect.js',
'../mojo/edk/js/tests/',
'../mojo/public/js/',
'../testing/test_env.py',
'<(PRODUCT_DIR)/mojo_js_integration_tests<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/gen/mojo/common/common_custom_types.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/edk/js/tests/js_to_cpp.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/math_calculator.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/no_module.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/ping_service.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/rect.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/regression_tests.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_factory.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_import.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_import2.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_service.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/scoping.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_constants.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_native_types.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_structs.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_sync_methods.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom.js',
],
},
}],
],
}
46 changes: 22 additions & 24 deletions mojo/mojo_js_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# found in the LICENSE file.
{
'includes': [
'../gin/v8.isolate',
'../mojo/mojo.isolate',
'../third_party/icu/icu.isolate',
],
'conditions': [
Expand All @@ -17,30 +19,26 @@
'files': [
'../gin/test/expect.js',
'../testing/test_env.py',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/',
'bindings/js/',
'public/js/bindings/',
],
},
}],
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/mojo_public_test_support.dll',
],
},
}],
['OS=="linux"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/lib/libmojo_public_test_support.so',
],
},
}],
['OS=="mac"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/libmojo_public_test_support.dylib',
'public/interfaces/bindings/tests/data/validation/',
'public/js/',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/math_calculator.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/no_module.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/ping_service.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/rect.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/regression_tests.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_factory.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_import.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_import2.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/sample_service.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/scoping.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_constants.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_native_types.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_structs.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_sync_methods.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.js',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom.js',
],
},
}],
Expand Down
23 changes: 1 addition & 22 deletions mojo/mojo_public_bindings_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# found in the LICENSE file.
{
'includes': [
'../base/base.isolate',
'../mojo/mojo.isolate',
],
'conditions': [
['OS=="win" or OS=="mac" or OS=="linux"', {
Expand All @@ -19,26 +19,5 @@
],
},
}],
['OS=="win"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/mojo_public_test_support.dll',
],
},
}],
['OS=="linux"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/lib/libmojo_public_test_support.so',
],
},
}],
['OS=="mac"', {
'variables': {
'files': [
'<(PRODUCT_DIR)/libmojo_public_test_support.dylib',
],
},
}],
],
}
Loading

0 comments on commit 98ecd4a

Please sign in to comment.