Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8bd74c4

Browse filesBrowse files
refackMylesBorins
authored andcommitted
tools,test: use Execute instead of check_output
subprocess.check_output is a python2.7 only feature. Using Execute allows keeping python2.6 compatibility PR-URL: #17381 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 2a4f4f8 commit 8bd74c4
Copy full SHA for 8bd74c4

File tree

Expand file treeCollapse file tree

1 file changed

+7
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-10
lines changed
Open diff view settings
Collapse file

‎tools/test.py‎

Copy file name to clipboardExpand all lines: tools/test.py
+7-10Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,18 +1562,15 @@ def ArgsToTestPaths(test_root, args, suites):
15621562
return paths
15631563

15641564

1565-
def get_env_type(vm, options_type):
1565+
def get_env_type(vm, options_type, context):
15661566
if options_type is not None:
15671567
env_type = options_type
15681568
else:
1569-
if "fips" in subprocess.check_output([vm, "-p",
1570-
"process.versions.openssl"]):
1571-
env_type = "fips"
1572-
# NOTE(nikhil): "simple" is the default value for var 'env_type' and should
1573-
# be set last if no if/elif matches. If you plan to add more values, use
1574-
# 'elif' above.
1575-
else:
1576-
env_type = "simple"
1569+
# 'simple' is the default value for 'env_type'.
1570+
env_type = 'simple'
1571+
ssl_ver = Execute([vm, '-p', 'process.versions.openssl'], context).stdout
1572+
if 'fips' in ssl_ver:
1573+
env_type = 'fips'
15771574
return env_type
15781575

15791576

@@ -1659,7 +1656,7 @@ def Main():
16591656
'mode': mode,
16601657
'system': utils.GuessOS(),
16611658
'arch': vmArch,
1662-
'type': get_env_type(vm, options.type),
1659+
'type': get_env_type(vm, options.type, context),
16631660
}
16641661
test_list = root.ListTests([], path, context, arch, mode)
16651662
unclassified_tests += test_list

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.