aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-09-02 16:40:14 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-09-02 16:40:14 -0700
commitaca3211b0f41aa862a424327de6d3a36e455a3c4 (patch)
tree2efde70412cb2d79c859a6b776ad18ca5d5c2f8f /tools
parentbfe8719e78be1e51a98bbf6a555f40adcae3ea22 (diff)
parentb059ae54c362833b287d4342cb96aae69792279f (diff)
Merge pull request #3183 from ctiller/second-coming
Refactor Endpoint API
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests/run_sanity.sh2
-rwxr-xr-xtools/run_tests/run_tests.py40
-rw-r--r--tools/run_tests/sources_and_headers.json14
-rw-r--r--tools/run_tests/tests.json30
4 files changed, 65 insertions, 21 deletions
diff --git a/tools/run_tests/run_sanity.sh b/tools/run_tests/run_sanity.sh
index 32e25661fa..c18160a891 100755
--- a/tools/run_tests/run_sanity.sh
+++ b/tools/run_tests/run_sanity.sh
@@ -52,7 +52,7 @@ diff -u $submodules $want_submodules
rm $submodules $want_submodules
-if git ls-files cache.mk --error-unmatch &> /dev/null ; then
+if [ -f cache.mk ] ; then
echo "Please don't commit cache.mk"
exit 1
fi
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 8e7dd06cad..2da02b2662 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -141,7 +141,8 @@ class CLanguage(object):
if travis and target['flaky']:
continue
if self.platform == 'windows':
- binary = 'vsprojects/test_bin/%s.exe' % (target['name'])
+ binary = 'vsprojects/%s/%s.exe' % (
+ _WINDOWS_CONFIG[config.build_config], target['name'])
else:
binary = 'bins/%s/%s' % (config.build_config, target['name'])
if os.path.isfile(binary):
@@ -151,6 +152,9 @@ class CLanguage(object):
return sorted(out)
def make_targets(self):
+ if platform_string() == 'windows':
+ # don't build tools on windows just yet
+ return ['buildtests_%s' % self.make_target]
return ['buildtests_%s' % self.make_target, 'tools_%s' % self.make_target]
def build_steps(self):
@@ -388,6 +392,11 @@ _LANGUAGES = {
'build': Build(),
}
+_WINDOWS_CONFIG = {
+ 'dbg': 'Debug',
+ 'opt': 'Release',
+ }
+
# parse command line
argp = argparse.ArgumentParser(description='Run grpc tests.')
argp.add_argument('-c', '--config',
@@ -468,24 +477,31 @@ if len(build_configs) > 1:
if platform.system() == 'Windows':
def make_jobspec(cfg, targets):
- return jobset.JobSpec(['make.bat', 'CONFIG=%s' % cfg] + targets,
- cwd='vsprojects', shell=True,
- timeout_seconds=30*60)
+ extra_args = []
+ if args.travis:
+ extra_args.extend(["/m", "/p:GenerateDebugInformation=false"])
+ return [
+ jobset.JobSpec(['vsprojects\\build.bat',
+ 'vsprojects\\%s.sln' % target,
+ '/p:Configuration=%s' % _WINDOWS_CONFIG[cfg]] +
+ extra_args,
+ shell=True, timeout_seconds=90*60)
+ for target in targets]
else:
def make_jobspec(cfg, targets):
- return jobset.JobSpec([os.getenv('MAKE', 'make'),
- '-j', '%d' % (multiprocessing.cpu_count() + 1),
- 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
- args.slowdown,
- 'CONFIG=%s' % cfg] + targets,
- timeout_seconds=30*60)
+ return [jobset.JobSpec([os.getenv('MAKE', 'make'),
+ '-j', '%d' % (multiprocessing.cpu_count() + 1),
+ 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
+ args.slowdown,
+ 'CONFIG=%s' % cfg] + targets,
+ timeout_seconds=30*60)]
make_targets = list(set(itertools.chain.from_iterable(
l.make_targets() for l in languages)))
build_steps = []
if make_targets:
- build_steps.extend(set(make_jobspec(cfg, make_targets)
- for cfg in build_configs))
+ make_commands = itertools.chain.from_iterable(make_jobspec(cfg, make_targets) for cfg in build_configs)
+ build_steps.extend(set(make_commands))
build_steps.extend(set(
jobset.JobSpec(cmdline, environ={'CONFIG': cfg})
for cfg in build_configs
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 3a94b9ee6b..629a3234e8 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -150,6 +150,20 @@
],
"headers": [],
"language": "c",
+ "name": "endpoint_pair_test",
+ "src": [
+ "test/core/iomgr/endpoint_pair_test.c"
+ ]
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "fd_conservation_posix_test",
"src": [
"test/core/iomgr/fd_conservation_posix_test.c"
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index 11fc4951df..ad37688c92 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -183,6 +183,24 @@
"ci_platforms": [
"linux",
"mac",
+ "posix",
+ "windows"
+ ],
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "endpoint_pair_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "ci_platforms": [
+ "linux",
+ "mac",
"posix"
],
"exclude_configs": [],
@@ -643,8 +661,7 @@
"ci_platforms": [
"linux",
"mac",
- "posix",
- "windows"
+ "posix"
],
"exclude_configs": [],
"flaky": false,
@@ -653,8 +670,7 @@
"platforms": [
"linux",
"mac",
- "posix",
- "windows"
+ "posix"
]
},
{
@@ -1121,8 +1137,7 @@
"ci_platforms": [
"linux",
"mac",
- "posix",
- "windows"
+ "posix"
],
"exclude_configs": [],
"flaky": false,
@@ -1131,8 +1146,7 @@
"platforms": [
"linux",
"mac",
- "posix",
- "windows"
+ "posix"
]
},
{