2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
8 # test source is copied from tests/nameservice/ -- we don't actually
9 # care to run the test here, just to cause it to fall over. we do,
10 # however, run it without any fault injection to ensure that we don't
11 # have any false injection, to ensure the test hasn't bitrotted.
13 # postmessage version of srpc_nameservice_test
15 pm_ns_obj = env.ComponentObject('fault_pm_nameservice_test.o',
16 'fault_pm_nameservice_test.cc')
17 pm_ns_nexe_name = env.ProgramNameForNmf('fault_pm_nameservice_test')
18 pm_ns_nexe = env.ComponentProgram(pm_ns_nexe_name,
20 EXTRA_LIBS=['nacl_ppapi_util',
29 env.Publish(pm_ns_nexe_name, 'run',
30 ['no_fault_pm_nameservice_test.html',
31 'fault_pm_nameservice_test.html',
34 # chrome_browser_tests
36 # NB: there is a "plain" version of post-message based name service
37 # test, and a "fault-injected" version -- essentially this test is
38 # simple and in the same repository as the core NaCl where the fault
39 # injection code (see native_client/src/trusted/fault_injection/)
40 # lives, which is a primary requirement for being able to commit
41 # changes to the tests and to the code-under-test in atomic units.
43 for extra_os_env, test_args, out_name, run_name, html_file in [
46 'no_fault_pm_nameservice_browser_test.out',
47 'run_no_fault_pm_nameservice_chrome_browser_test',
48 'no_fault_pm_nameservice_test.html',
50 [['NACL_FAULT_INJECTION=load_module=GF20'],
52 [('expected_error','"NaCl module load failed: Insufficient memory to load file"')],
53 'fault_pm_nameservice_browser_test.out',
54 'run_fault_pm_nameservice_chrome_browser_test',
55 'fault_pm_nameservice_test.html',
57 [['NACL_FAULT_INJECTION=pq=GF2'],
58 # LOAD_UNSUPPORTED_OS_PLATFORM
59 [('expected_error', '"NaCl module load failed: Operating system platform is not supported"')],
60 'fault_pq_os_pm_nameservice_browser_test.out',
61 'run_fault_pq_os_pm_nameservice_chrome_browser_test',
62 'fault_pm_nameservice_test.html',
64 [['NACL_FAULT_INJECTION=pq=GF3'],
65 # LOAD_DEP_UNSUPPORTED
66 [('expected_error', '"NaCl module load failed: Data Execution Prevention is required but is not supported"')],
67 'fault_pq_dep_pm_nameservice_browser_test.out',
68 'run_fault_pq_dep_pm_nameservice_chrome_browser_test',
69 'fault_pm_nameservice_test.html',
73 node = env.PPAPIBrowserTester(
76 nmf_names=['fault_pm_nameservice_test'],
77 files=env.ExtractPublishedFiles(pm_ns_nexe_name),
79 osenv=['NACLVERBOSITY=0:pp_weak_ref=0:weak_ref=0'] + extra_os_env
82 env.AddNodeToTestSuite(node,
83 ['chrome_browser_tests'],
85 is_broken=(env.PPAPIBrowserTesterIsBroken() or
86 env.Bit('nacl_glibc')))