Commit d3427850 authored by hidehiko's avatar hidehiko Committed by Commit bot

Non-SFI mode: Enable PnaclTransitional Non-SFI browser tests on x86-64 bots.

Now, NaCl supports to build x86-32 nonsfi binary even with target_arch=x64,
so this CL enables browser_tests for PPAPI.

BUG=358465
TEST=browser_tests --gtest_filter=*Transitional* locally. Run trybots.
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_rel_precise32,linux_arm_compile,linux_arm

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

Cr-Commit-Position: refs/heads/master@{#314148}
parent 84567cea
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
}, },
}], }],
[('disable_nacl==0 and OS=="linux" and ' [('disable_nacl==0 and OS=="linux" and '
'(target_arch=="ia32" or target_arch=="arm")'), { '(target_arch=="ia32" or target_arch=="x64" or target_arch=="arm")'), {
'variables': { 'variables': {
'files': [ 'files': [
'<(PRODUCT_DIR)/ppapi_nacl_tests_pnacl_nonsfi.nmf', '<(PRODUCT_DIR)/ppapi_nacl_tests_pnacl_nonsfi.nmf',
...@@ -145,6 +145,14 @@ ...@@ -145,6 +145,14 @@
], ],
}, },
}], }],
['disable_nacl==0 and OS=="linux" and '
'(target_arch=="x64" or target_arch=="ia32")', {
'variables': {
'files': [
'<(PRODUCT_DIR)/ppapi_nacl_tests_pnacl_newlib_x32_nonsfi.nexe',
],
},
}],
['OS=="mac"', { ['OS=="mac"', {
'variables': { 'variables': {
'files': [ 'files': [
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
], ],
}, },
'conditions': [ 'conditions': [
['target_arch=="ia32" and OS=="linux"', { ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', {
# Enable nonsfi testing on ia32-linux environment. # Enable nonsfi testing on ia32-linux environment.
# This flag causes test_files to be copied into nonsfi directory, # This flag causes test_files to be copied into nonsfi directory,
# too. # too.
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
# disabled, but building the binary should work. # disabled, but building the binary should work.
# We cannot disable building, as enable_XXX variables are also used # We cannot disable building, as enable_XXX variables are also used
# to build newlib linked nexes. # to build newlib linked nexes.
['target_arch=="ia32" and OS=="linux"', { ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', {
# Enable nonsfi testing on ia32-linux environment. # Enable nonsfi testing on ia32-linux environment.
'variables': { 'variables': {
'build_pnacl_newlib': 1, 'build_pnacl_newlib': 1,
...@@ -594,7 +594,7 @@ ...@@ -594,7 +594,7 @@
'ppapi_test_lib', 'ppapi_test_lib',
], ],
'conditions': [ 'conditions': [
['target_arch=="ia32" and OS=="linux"', { ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', {
# Enable nonsfi testing on ia32-linux environment. # Enable nonsfi testing on ia32-linux environment.
'variables': { 'variables': {
'enable_x86_32_nonsfi': 1, 'enable_x86_32_nonsfi': 1,
......
...@@ -219,11 +219,10 @@ class NaClBrowserTestGLibcExtension : public NaClBrowserTestGLibc { ...@@ -219,11 +219,10 @@ class NaClBrowserTestGLibcExtension : public NaClBrowserTestGLibc {
# define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case
#endif #endif
// Similar to MAYBE_TRANSITIONAL_NONSFI, this is available only on x86-32 or // Similar to MAYBE_TRANSITIONAL_NONSFI, this is available only on x86-32,
// ARM. // x86-64 or ARM linux.
// TODO(hidehiko,mazda): Merge this to the MAYBE_PNACL_NONSFI when it is #if defined(OS_LINUX) && \
// supported on x86-64. (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL))
#if defined(OS_LINUX) && (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL))
# define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) test_case # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) test_case
#else #else
# define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case
......
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
}, },
], ],
}], }],
['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="arm") and OS=="linux"', { ['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="x64" or target_arch=="arm") and OS=="linux"', {
# In addition to above configuration, build x86-32 and arm nonsfi # In addition to above configuration, build x86-32 and arm nonsfi
# .nexe files by translating from .pexe binary, for non-SFI mode PPAPI # .nexe files by translating from .pexe binary, for non-SFI mode PPAPI
# testing. # testing.
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
'nmf_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_nonsfi.nmf', 'nmf_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_nonsfi.nmf',
}, },
'conditions': [ 'conditions': [
['target_arch=="ia32"', { ['target_arch=="ia32" or target_arch=="x64"', {
'variables': { 'variables': {
'enable_x86_32_nonsfi': 1, 'enable_x86_32_nonsfi': 1,
}, },
...@@ -270,17 +270,35 @@ ...@@ -270,17 +270,35 @@
'--output=>(nmf_nonsfi)', '--output=>(nmf_nonsfi)',
], ],
'target_conditions': [ 'target_conditions': [
['enable_x86_32_nonsfi==1', { ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="ia32"', {
'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'],
'action': [ 'action': [
'--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
'--arch=x86-32', '--arch=x86-32',
], ]
}],
['enable_x86_32_nonsfi==1 and "<(target_arch)"=="x64"', {
'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'],
'action': [
'--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
# This should be used only for nacl_helper_nonsfi test.
# In theory this should be x86-32. However, currently
# fallback logic to x86-32-nonsfi is not implemented,
# and, moreover, it would break the tests for current
# nacl_helper in Non-SFI mode on x64 Chrome.
# So, here we introduce the hack to use "x86-64" in order
# to take the benefit to run nacl_helper_nonsfi tests on
# x64 Chrome.
# TODO(hidehiko): Remove this hack.
'--arch=x86-64',
]
}], }],
['enable_arm_nonsfi==1', { ['enable_arm_nonsfi==1', {
'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'],
'action': [ 'action': [
'--program=>(out_pnacl_newlib_arm_nonsfi_nexe)', '--program=>(out_pnacl_newlib_arm_nonsfi_nexe)',
'--arch=arm', '--arch=arm',
], ]
}], }],
], ],
}, },
......
...@@ -221,13 +221,29 @@ ...@@ -221,13 +221,29 @@
'--output=>(nmf_pnacl_newlib_nonsfi)', '--output=>(nmf_pnacl_newlib_nonsfi)',
], ],
'target_conditions': [ 'target_conditions': [
['enable_x86_32_nonsfi==1', { ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="ia32"', {
'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'],
'action': [ 'action': [
'--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
'--arch=x86-32', '--arch=x86-32',
] ]
}], }],
['enable_x86_32_nonsfi==1 and "<(target_arch)"=="x64"', {
'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'],
'action': [
'--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
# This should be used only for nacl_helper_nonsfi test.
# In theory this should be x86-32. However, currently
# fallback logic to x86-32-nonsfi is not implemented,
# and, moreover, it would break the tests for current
# nacl_helper in Non-SFI mode on x64 Chrome.
# So, here we introduce the hack to use "x86-64" in order
# to take the benefit to run nacl_helper_nonsfi tests on
# x64 Chrome.
# TODO(hidehiko): Remove this hack.
'--arch=x86-64',
]
}],
['enable_arm_nonsfi==1', { ['enable_arm_nonsfi==1', {
'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'],
'action': [ 'action': [
......
...@@ -31,7 +31,7 @@ def ParseArgs(): ...@@ -31,7 +31,7 @@ def ParseArgs():
parser.add_argument( parser.add_argument(
'--program', metavar='FILE', help='Main program nexe') '--program', metavar='FILE', help='Main program nexe')
parser.add_argument( parser.add_argument(
'--arch', metavar='ARCH', choices=('x86-32', 'arm'), '--arch', metavar='ARCH', choices=('x86-32', 'x86-64', 'arm'),
help='The archtecture of main program nexe') help='The archtecture of main program nexe')
# To keep compatibility with create_nmf.py, we use -x and --extra-files # To keep compatibility with create_nmf.py, we use -x and --extra-files
# as flags. # as flags.
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
], ],
}, },
'conditions': [ 'conditions': [
['target_arch=="ia32" and OS=="linux"', { ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', {
# Enable nonsfi testing only on ia32-linux environment. # Enable nonsfi testing only on ia32-linux environment.
# See chrome/test/data/nacl/nacl_test_data.gyp for more info. # See chrome/test/data/nacl/nacl_test_data.gyp for more info.
'variables': { 'variables': {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment