| Index: SConstruct
|
| diff --git a/SConstruct b/SConstruct
|
| index a4865f9948b8b0bd84311d5e75b0ff07733ede72..f4819a1ed5186b6145818c5839a1ec60f3219318 100755
|
| --- a/SConstruct
|
| +++ b/SConstruct
|
| @@ -1450,7 +1450,8 @@ pre_base_env.AddMethod(GetPnaclExtensionNode)
|
| # If they are different, prints the difference and returns 1.
|
| # Otherwise, returns 0.
|
| def CheckGoldenFile(golden_file, output_file,
|
| - filter_regex, filter_inverse, filter_group_only):
|
| + filter_regex=None,
|
| + filter_inverse=None, filter_group_only=None):
|
| golden = open(golden_file).read()
|
| actual = open(output_file).read()
|
| if filter_regex is not None:
|
| @@ -1476,6 +1477,26 @@ def GoldenFileCheckAction(env, output_file, golden_file,
|
|
|
| return env.Action(ActionFunc)
|
|
|
| +pre_base_env.AddMethod(GoldenFileCheckAction)
|
| +
|
| +
|
| +def UntrustedCrashDumpFilter(env, target, source, nexe=None, nmf=None):
|
| + cmd = [
|
| + '${PYTHON}',
|
| + env.File('$MAIN_DIR/tests/untrusted_crash_dump/decode_dump.py').abspath,
|
| + env.subst(source),
|
| + env.subst(target),
|
| + '--addr2line', '${ADDR2LINE}',
|
| + '--toolchain-libs', '${NACL_SDK_LIB}',
|
| + ]
|
| + if nexe:
|
| + cmd += ['--main-nexe', nexe]
|
| + if nmf:
|
| + cmd += ['--nmf', nmf]
|
| + return env.Action(' '.join(cmd))
|
| +
|
| +pre_base_env.AddMethod(UntrustedCrashDumpFilter)
|
| +
|
|
|
| def PPAPIBrowserTester(env,
|
| target,
|
| @@ -1553,9 +1574,11 @@ def PPAPIBrowserTester(env,
|
| command.extend(['--mime_type', file_ext, mime_type])
|
| command.extend(['--serving_dir', '${NACL_SDK_LIB}'])
|
| command.extend(['--serving_dir', '${LIB_DIR}'])
|
| + generated_manifests = []
|
| if not nmfs is None:
|
| for nmf_file in nmfs:
|
| generated_manifest = GeneratedManifestNode(env, nmf_file)
|
| + generated_manifests.append(generated_manifest)
|
| # We need to add generated manifests to the list of default targets.
|
| # The manifests should be generated even if the tests are not run -
|
| # the manifests may be needed for manual testing.
|
| @@ -1598,9 +1621,20 @@ def PPAPIBrowserTester(env,
|
| filter_regex = params.get('filter_regex', None)
|
| filter_inverse = params.get('filter_inverse', False)
|
| filter_group_only = params.get('filter_group_only', False)
|
| + decode_crash_dump = params.get('decode_crash_dump', False)
|
| + if decode_crash_dump:
|
| + if generated_manifests:
|
| + nmf_path = generated_manifests[0].abspath
|
| + else:
|
| + nmf_path = None
|
| + decoded = stream_file + '.decoded'
|
| + post_actions.append(
|
| + env.UntrustedCrashDumpFilter(
|
| + decoded, stream_file, nexe=files[0].abspath, nmf=nmf_path))
|
| + stream_file = decoded
|
| post_actions.append(
|
| - GoldenFileCheckAction(
|
| - env, stream_file, golden_file,
|
| + env.GoldenFileCheckAction(
|
| + stream_file, golden_file,
|
| filter_regex, filter_inverse, filter_group_only))
|
|
|
| if ShouldUseVerboseOptions(extra):
|
| @@ -3206,6 +3240,7 @@ irt_variant_tests = [
|
| 'tests/toolchain/nacl.scons',
|
| 'tests/unittests/shared/platform/nacl.scons',
|
| 'tests/untrusted_check/nacl.scons',
|
| + 'tests/untrusted_crash_dump/nacl.scons',
|
| #### ALPHABETICALLY SORTED ####
|
| ]
|
|
|
| @@ -3221,6 +3256,7 @@ nonvariant_tests = [
|
| 'tests/imc_shm_mmap/nacl.scons',
|
| 'tests/imc_sockets/nacl.scons',
|
| 'tests/inbrowser_crash_test/nacl.scons',
|
| + 'tests/inbrowser_untrusted_crash_dump_test/nacl.scons',
|
| 'tests/inbrowser_test_runner/nacl.scons',
|
| 'tests/mach_crash_filter/nacl.scons',
|
| 'tests/minnacl/nacl.scons',
|
|
|