Skip to content

Commit

Permalink
[libphonenumber] Run tests on swarming
Browse files Browse the repository at this point in the history
Also adding some files and their tests.

BUG=585151

Review URL: https://codereview.chromium.org/1759723002

Cr-Commit-Position: refs/heads/master@{#382114}
  • Loading branch information
mathp authored and Commit bot committed Mar 18, 2016
1 parent 4ffe267 commit 85d385a
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 7 deletions.
12 changes: 12 additions & 0 deletions testing/buildbot/chromium.linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,12 @@
},
"test": "jingle_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"test": "mash_unittests"
},
Expand Down Expand Up @@ -1201,6 +1207,12 @@
},
"test": "jingle_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down
12 changes: 12 additions & 0 deletions testing/buildbot/chromium.mac.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@
},
"test": "jingle_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down Expand Up @@ -1148,6 +1154,12 @@
},
"test": "jingle_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down
12 changes: 12 additions & 0 deletions testing/buildbot/chromium.win.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@
{
"test": "keyboard_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down Expand Up @@ -1432,6 +1438,12 @@
},
"test": "jingle_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "libphonenumber_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down
9 changes: 4 additions & 5 deletions testing/buildbot/gn_isolate_map.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,10 @@
#"label": "//third_party/libaddressinput:libaddressinput_unittests",
#"type": "console_test_launcher",
#},
# See http://crbug.com/585151
#"libphonenumber_unittests": {
#"label": "//third_party/libphonenumber:libphonenumber_unittests",
#"type": "console_test_launcher",
#},
"libphonenumber_unittests": {
"label": "//third_party/libphonenumber:libphonenumber_unittests",
"type": "console_test_launcher",
},
"media_unittests": {
"label": "//media:media_unittests",
"type": "windowed_test_launcher",
Expand Down
12 changes: 11 additions & 1 deletion third_party/libphonenumber/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ config("libphonenumber_config") {
"dist/cpp/src",
"$root_gen_dir/third_party/libphonenumber",
]
defines = [ "I18N_PHONENUMBERS_USE_ICU_REGEXP=1" ]
defines = [
"I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS=1",
"I18N_PHONENUMBERS_USE_ICU_REGEXP=1",
]
if (!is_android) {
defines += [ "I18N_PHONENUMBERS_NO_THREAD_SAFETY=1" ]
}
Expand All @@ -36,6 +39,7 @@ config("libphonenumber_config_internal") {
# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_without_metadata
static_library("libphonenumber_without_metadata") {
sources = [
"dist/cpp/src/phonenumbers/alternate_format.cc",
"dist/cpp/src/phonenumbers/asyoutypeformatter.cc",
"dist/cpp/src/phonenumbers/base/strings/string_piece.cc",
"dist/cpp/src/phonenumbers/default_logger.cc",
Expand Down Expand Up @@ -99,15 +103,21 @@ test("libphonenumber_unittests") {
"dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc",
"dist/cpp/test/phonenumbers/phonenumberutil_test.cc",
"dist/cpp/test/phonenumbers/regexp_adapter_test.cc",
"dist/cpp/test/phonenumbers/regexp_cache_test.cc",
"dist/cpp/test/phonenumbers/stringutil_test.cc",
"dist/cpp/test/phonenumbers/test_util.cc",
"dist/cpp/test/phonenumbers/unicodestring_test.cc",
"dist/cpp/test/phonenumbers/utf/unicodetext_test.cc",
]

configs += [ ":libphonenumber_config_internal" ]

include_dirs = [ "dist/cpp/test" ]

data = [
"dist/resources/test/",
]

deps = [
":libphonenumber_without_metadata",
"//base",
Expand Down
24 changes: 23 additions & 1 deletion third_party/libphonenumber/libphonenumber.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@
'dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc',
'dist/cpp/test/phonenumbers/phonenumberutil_test.cc',
'dist/cpp/test/phonenumbers/regexp_adapter_test.cc',
'dist/cpp/test/phonenumbers/regexp_cache_test.cc',
'dist/cpp/test/phonenumbers/stringutil_test.cc',
'dist/cpp/test/phonenumbers/test_util.cc',
'dist/cpp/test/phonenumbers/unicodestring_test.cc',
'dist/cpp/test/phonenumbers/utf/unicodetext_test.cc',
],
'dependencies': [
'../icu/icu.gyp:icui18n',
Expand Down Expand Up @@ -160,5 +162,25 @@
],
}],
],
}]
}],
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'libphonenumber_unittests_run',
'type': 'none',
'dependencies': [
'libphonenumber_unittests',
],
'includes': [
'../../build/isolate.gypi',
],
'sources': [
'libphonenumber_unittests.isolate',
],
},
],
}, {
}],
],
}
20 changes: 20 additions & 0 deletions third_party/libphonenumber/libphonenumber_unittests.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 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.
{
'conditions': [
['OS=="linux" or OS=="mac" or OS=="win"', {
'variables': {
'command': [
'<(PRODUCT_DIR)/libphonenumber_unittests<(EXECUTABLE_SUFFIX)',
],
'files': [
'dist/resources/test/',
],
},
}],
],
'includes': [
'../../base/base.isolate',
],
}

0 comments on commit 85d385a

Please sign in to comment.