OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 Import('env') | 7 Import('env') |
8 | 8 |
9 if env.Bit('linux'): | 9 if env.Bit('linux'): |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 validator_tests = { | 90 validator_tests = { |
91 'test_forbidden_instructions': 1, | 91 'test_forbidden_instructions': 1, |
92 'test_sp_updates': 1, | 92 'test_sp_updates': 1, |
93 'test_stores': 1, | 93 'test_stores': 1, |
94 'test_loads': 1, | 94 'test_loads': 1, |
95 'test_jmp_reg': 1, | 95 'test_jmp_reg': 1, |
96 'test_jmp_imm': 1, | 96 'test_jmp_imm': 1, |
97 'test_read_only_regs': 1, | 97 'test_read_only_regs': 1, |
98 'test_invalid_dest': 1, | 98 'test_invalid_dest': 1, |
| 99 'test_unpredicted': 1, |
99 } | 100 } |
100 | 101 |
101 for test, exit_status in validator_tests.iteritems(): | 102 for test, exit_status in validator_tests.iteritems(): |
102 node = env.CommandTest( | 103 node = env.CommandTest( |
103 test + '_actual_mips.out', | 104 test + '_actual_mips.out', |
104 [ncval, env.File('testdata/' + test + '.nexe')], | 105 [ncval, env.File('testdata/' + test + '.nexe')], |
105 exit_status = str(exit_status), | 106 exit_status = str(exit_status), |
106 filter_regex = "'^ncval'", | 107 filter_regex = "'^ncval'", |
107 stderr_golden = env.File('testdata/' + test + '.err')) | 108 stderr_golden = env.File('testdata/' + test + '.err')) |
108 | 109 |
109 # TODO(petarj): validator_tests need to be disabled until tools for MIPS | 110 # TODO(petarj): validator_tests need to be disabled until tools for MIPS |
110 # architecture are available in the repository. | 111 # architecture are available in the repository. |
111 # env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], | 112 # env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], |
112 # "run_mips_" + test) | 113 # "run_mips_" + test) |
113 | 114 |
114 # Do NOT name this program 'validator_tests' because this is the same name as | 115 # Do NOT name this program 'validator_tests' because this is the same name as |
115 # a test suite, and scons will run that test suite if it ever builds | 116 # a test suite, and scons will run that test suite if it ever builds |
116 # a program of the same name. | 117 # a program of the same name. |
117 validator_tests_exe = gtest_env.ComponentProgram('mips_validator_tests', | 118 validator_tests_exe = gtest_env.ComponentProgram('mips_validator_tests', |
118 ['validator_tests.cc'], | 119 ['validator_tests.cc'], |
119 EXTRA_LIBS=['mips_validator_core']) | 120 EXTRA_LIBS=['mips_validator_core']) |
120 | 121 |
121 test_node = gtest_env.CommandTest( | 122 test_node = gtest_env.CommandTest( |
122 'mips_validator_tests.out', | 123 'mips_validator_tests.out', |
123 command=[validator_tests_exe]) | 124 command=[validator_tests_exe]) |
124 gtest_env.AddNodeToTestSuite(test_node, ['small_tests'], | 125 gtest_env.AddNodeToTestSuite(test_node, ['small_tests'], |
125 'run_mips_validator_tests') | 126 'run_mips_validator_tests') |
OLD | NEW |