diff options
author | hidehiko <hidehiko@chromium.org> | 2015-02-02 07:26:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-02 15:27:08 +0000 |
commit | d3427850741e6d68f265943c25e998b51344d97c (patch) | |
tree | e4f768d5f774c2f24cc6c2a496dcf4e1c3545f00 | |
parent | 84567ceada9f89c8e962d18ab494b1d1bb5a3830 (diff) | |
download | chromium_src-d3427850741e6d68f265943c25e998b51344d97c.zip chromium_src-d3427850741e6d68f265943c25e998b51344d97c.tar.gz chromium_src-d3427850741e6d68f265943c25e998b51344d97c.tar.bz2 |
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}
-rw-r--r-- | chrome/browser_tests.isolate | 10 | ||||
-rw-r--r-- | chrome/test/data/nacl/nacl_test_data.gyp | 6 | ||||
-rw-r--r-- | chrome/test/nacl/nacl_browsertest_util.h | 9 | ||||
-rw-r--r-- | ppapi/ppapi_nacl.gyp | 28 | ||||
-rw-r--r-- | ppapi/ppapi_nacl_test_common.gypi | 18 | ||||
-rwxr-xr-x | ppapi/tests/create_nonsfi_test_nmf.py | 2 | ||||
-rw-r--r-- | ppapi/tests/extensions/extensions.gyp | 2 |
7 files changed, 58 insertions, 17 deletions
diff --git a/chrome/browser_tests.isolate b/chrome/browser_tests.isolate index 4956977..eaf72eb 100644 --- a/chrome/browser_tests.isolate +++ b/chrome/browser_tests.isolate @@ -107,7 +107,7 @@ }, }], [('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': { 'files': [ '<(PRODUCT_DIR)/ppapi_nacl_tests_pnacl_nonsfi.nmf', @@ -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"', { 'variables': { 'files': [ diff --git a/chrome/test/data/nacl/nacl_test_data.gyp b/chrome/test/data/nacl/nacl_test_data.gyp index 63c8545..06bb731 100644 --- a/chrome/test/data/nacl/nacl_test_data.gyp +++ b/chrome/test/data/nacl/nacl_test_data.gyp @@ -41,7 +41,7 @@ ], }, 'conditions': [ - ['target_arch=="ia32" and OS=="linux"', { + ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', { # Enable nonsfi testing on ia32-linux environment. # This flag causes test_files to be copied into nonsfi directory, # too. @@ -540,7 +540,7 @@ # disabled, but building the binary should work. # We cannot disable building, as enable_XXX variables are also used # 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. 'variables': { 'build_pnacl_newlib': 1, @@ -594,7 +594,7 @@ 'ppapi_test_lib', ], 'conditions': [ - ['target_arch=="ia32" and OS=="linux"', { + ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', { # Enable nonsfi testing on ia32-linux environment. 'variables': { 'enable_x86_32_nonsfi': 1, diff --git a/chrome/test/nacl/nacl_browsertest_util.h b/chrome/test/nacl/nacl_browsertest_util.h index 8a92224..703bada 100644 --- a/chrome/test/nacl/nacl_browsertest_util.h +++ b/chrome/test/nacl/nacl_browsertest_util.h @@ -219,11 +219,10 @@ class NaClBrowserTestGLibcExtension : public NaClBrowserTestGLibc { # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case #endif -// Similar to MAYBE_TRANSITIONAL_NONSFI, this is available only on x86-32 or -// ARM. -// TODO(hidehiko,mazda): Merge this to the MAYBE_PNACL_NONSFI when it is -// supported on x86-64. -#if defined(OS_LINUX) && (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) +// Similar to MAYBE_TRANSITIONAL_NONSFI, this is available only on x86-32, +// x86-64 or ARM linux. +#if defined(OS_LINUX) && \ + (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)) # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) test_case #else # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case diff --git a/ppapi/ppapi_nacl.gyp b/ppapi/ppapi_nacl.gyp index bbad955..9fdabc3 100644 --- a/ppapi/ppapi_nacl.gyp +++ b/ppapi/ppapi_nacl.gyp @@ -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 # .nexe files by translating from .pexe binary, for non-SFI mode PPAPI # testing. @@ -244,7 +244,7 @@ 'nmf_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_nonsfi.nmf', }, 'conditions': [ - ['target_arch=="ia32"', { + ['target_arch=="ia32" or target_arch=="x64"', { 'variables': { 'enable_x86_32_nonsfi': 1, }, @@ -270,17 +270,35 @@ '--output=>(nmf_nonsfi)', ], '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': [ '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', '--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', { + 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], 'action': [ '--program=>(out_pnacl_newlib_arm_nonsfi_nexe)', '--arch=arm', - ], + ] }], ], }, diff --git a/ppapi/ppapi_nacl_test_common.gypi b/ppapi/ppapi_nacl_test_common.gypi index ea61327..c91b439 100644 --- a/ppapi/ppapi_nacl_test_common.gypi +++ b/ppapi/ppapi_nacl_test_common.gypi @@ -221,13 +221,29 @@ '--output=>(nmf_pnacl_newlib_nonsfi)', ], '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': [ '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', '--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', { 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], 'action': [ diff --git a/ppapi/tests/create_nonsfi_test_nmf.py b/ppapi/tests/create_nonsfi_test_nmf.py index 3ac4e50..a2a8f9f 100755 --- a/ppapi/tests/create_nonsfi_test_nmf.py +++ b/ppapi/tests/create_nonsfi_test_nmf.py @@ -31,7 +31,7 @@ def ParseArgs(): parser.add_argument( '--program', metavar='FILE', help='Main program nexe') 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') # To keep compatibility with create_nmf.py, we use -x and --extra-files # as flags. diff --git a/ppapi/tests/extensions/extensions.gyp b/ppapi/tests/extensions/extensions.gyp index ec3eac8..ff5ba97a 100644 --- a/ppapi/tests/extensions/extensions.gyp +++ b/ppapi/tests/extensions/extensions.gyp @@ -82,7 +82,7 @@ ], }, '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. # See chrome/test/data/nacl/nacl_test_data.gyp for more info. 'variables': { |