| Index: src/trusted/validator_mips/build.scons
|
| ===================================================================
|
| --- src/trusted/validator_mips/build.scons (revision 0)
|
| +++ src/trusted/validator_mips/build.scons (revision 0)
|
| @@ -0,0 +1,100 @@
|
| +# -*- python -*-
|
| +# Copyright (c) 2012 The Native Client Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import os
|
| +Import('env')
|
| +
|
| +if env.Bit('linux'):
|
| +
|
| + env.Append(
|
| + CXXFLAGS='-Weffc++ -Woverloaded-virtual -fno-rtti -fomit-frame-pointer',
|
| + )
|
| +
|
| + # NOTE: we cannot use TARGET_ROOT here because we want to share this file
|
| + # between different scons invocations
|
| + gen_dec=('${DESTINATION_ROOT}/gen/native_client/src/trusted/validator_mips/'
|
| + 'decode.cc')
|
| +
|
| + env.Command(target=gen_dec,
|
| + source=['mips-opt.table',
|
| + 'generate_decoder.py',
|
| + 'dgen_core.py',
|
| + 'dgen_input.py',
|
| + 'dgen_opt.py',
|
| + 'dgen_output.py'],
|
| + action=['${SOURCES[1].abspath} ${SOURCES[0].abspath} '
|
| + '${TARGET.abspath}'])
|
| +
|
| + env.ComponentLibrary('mips_validator_core',
|
| + ['address_set.cc',
|
| + 'validator.cc',
|
| + gen_dec])
|
| +
|
| + env.ComponentLibrary('ncvalidate_mips',
|
| + ['ncvalidate.cc'],
|
| + LIBS=['mips_validator_core',
|
| + '${OPTIONAL_COVERAGE_LIBS}'])
|
| +
|
| + ncval = env.ComponentProgram(
|
| + 'mips-ncval-core',
|
| + ['ncval.cc'],
|
| + LIBS=['mips_validator_core',
|
| + env.NaClTargetArchSuffix('ncfileutils'),
|
| + '${OPTIONAL_COVERAGE_LIBS}'])
|
| +
|
| +
|
| + env.SDKInstallBin('ncval', ncval, target='mips')
|
| +
|
| + env.ComponentProgram('mips_address_set_test_binary',
|
| + ['address_set_test.cc'],
|
| + LIBS=['mips_validator_core',
|
| + '${OPTIONAL_COVERAGE_LIBS}'])
|
| +
|
| + address_set_test = env.Command(target='mips_address_set_test.out',
|
| + source=['address_set_test_binary'],
|
| + action=['${SOURCES[0].abspath}'])
|
| +
|
| + # TODO(cbiffle): get this wrapped in QEMU.
|
| + #env.AddNodeToTestSuite(address_set_test, ['small_tests'], 'address_set_test')
|
| +
|
| + validator_tests = {
|
| + 'test_forbidden_instructions': 1,
|
| + 'test_sp_updates': 1,
|
| + 'test_stores': 1,
|
| + 'test_loads': 1,
|
| + 'test_jmp_reg': 1,
|
| + 'test_jmp_imm': 1,
|
| + 'test_read_only_regs': 1,
|
| + 'test_invalid_dest': 1,
|
| + }
|
| +
|
| + for test, exit_status in validator_tests.iteritems():
|
| + node = env.CommandTest(
|
| + test + '_actual_mips.out',
|
| + [ncval, env.File('testdata/' + test + '.nexe')],
|
| + exit_status = str(exit_status),
|
| + filter_regex = "'^ncval'",
|
| + # NOTE: all stdout_golden are currently empty
|
| + stdout_golden = env.File('testdata/' + test + '.out'),
|
| + stderr_golden = env.File('testdata/' + test + '.err'))
|
| +
|
| + env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'],
|
| + "run_mips_" + test)
|
| +
|
| + gtest_env = env.MakeGTestEnv()
|
| +
|
| + # Do NOT name this program 'validator_tests' because this is the same name as
|
| + # a test suite, and scons will run that test suite if it ever builds
|
| + # a program of the same name.
|
| + validator_tests_exe = gtest_env.ComponentProgram('mips_validator_tests',
|
| + ['validator_tests.cc'],
|
| + EXTRA_LIBS=['mips_validator_core'])
|
| +
|
| + test_node = gtest_env.CommandTest(
|
| + 'mips_validator_tests.out',
|
| + command=[validator_tests_exe])
|
| + gtest_env.AddNodeToTestSuite(test_node, ['small_tests'],
|
| + 'run_validator_tests')
|
| +
|
|
|
| Property changes on: src/trusted/validator_mips/build.scons
|
| ___________________________________________________________________
|
| Added: svn:executable
|
| + *
|
|
|
|
|