Index: src/trusted/validator_ragel/build.scons |
=================================================================== |
--- src/trusted/validator_ragel/build.scons (revision 12664) |
+++ src/trusted/validator_ragel/build.scons (working copy) |
@@ -150,7 +150,7 @@ |
# dfagen : Regenerate any autogenerated source files. |
ragel_targets = set([ |
- 'dfagen', 'dfacheckdecoder', 'dfacheckvalidator']) |
+ 'dfagen', 'dfacheckdecoder', 'dfacheckvalidator', 'dfafullcheckvalidator']) |
ragel_involved = ragel_targets.intersection(COMMAND_LINE_TARGETS) |
gas = env.MakeUntrustedNativeEnv()['AS'] |
@@ -283,6 +283,10 @@ |
if python_can_load_dll: |
+ # Fullcheck includes both [relatively] slow "regular instructions test" |
+ # and [relatively] fast "regressions test". Check only includes |
+ # [relatively] fast "regressions test". |
+ dfafullcheckvalidator_tests = [] |
dfacheckvalidator_tests = [] |
for bitness, xml in [('32', validator32_xml), ('64', validator64_xml)]: |
@@ -304,8 +308,10 @@ |
superinstruction]) |
env.AlwaysBuild(superinstruction_verified) |
+ dfafullcheckvalidator_tests.append(superinstruction_verified) |
dfacheckvalidator_tests.append(superinstruction_verified) |
+ # Compare list of allowed instructions to python model |
regular_instructions_test = env.AutoDepsCommand( |
'regular_instructions_test_x86_%s.out' % bitness, |
['${PYTHON}', |
@@ -317,9 +323,23 @@ |
# Never run exhaustive tests in parallel because they can take all CPU. |
env.AlwaysBuild(regular_instructions_test) |
- SideEffect('check_validator', regular_instructions_test) |
- dfacheckvalidator_tests.append(regular_instructions_test) |
+ SideEffect('check_validator_full', regular_instructions_test) |
+ dfafullcheckvalidator_tests.append(regular_instructions_test) |
+ # Compress list of instructions and compare it to golden file |
+ compress_regular_instructions_test = env.CommandTest( |
+ '%sbit_regular.out' % bitness, |
+ ['${PYTHON}', |
+ env.File('compress_regular_instructions.py'), |
+ xml, |
+ '--bitness', bitness, |
+ '--validator_dll', validator_dll, |
+ '--decoder_dll', decoder_dll], |
+ size = 'huge', scale_timeout = 16, capture_stderr = False, |
+ stdout_golden = env.File('testdata/%sbit_regular.golden' % bitness)) |
+ SideEffect('check_validator', compress_regular_instructions_test) |
+ dfacheckvalidator_tests.append(compress_regular_instructions_test) |
+ |
env32 = env.Clone(BUILD_TARGET_NAME='x86-32') |
env64 = env.Clone(BUILD_TARGET_NAME='x86-64') |
old_ncval32 = env32.File('$STAGING_DIR/ncval$PROGSUFFIX') |
@@ -340,8 +360,8 @@ |
# Never run exhaustive tests in parallel because they can take all CPU. |
env.AlwaysBuild(regular_instructions_old_test) |
- SideEffect('check_validator', regular_instructions_old_test) |
- dfacheckvalidator_tests.append(regular_instructions_old_test) |
+ SideEffect('check_validator_full', regular_instructions_old_test) |
+ dfafullcheckvalidator_tests.append(regular_instructions_old_test) |
# There are three categories of protected files: validator files, generated |
# files (those of validator files that lie withing 'gen' directory) and |
@@ -403,9 +423,13 @@ |
source=protected_files, |
action=CalculateHashSums) |
env.Depends(calculate_hash_sums, dfacheckvalidator_tests) |
+ dfafullcheckvalidator_tests.append(calculate_hash_sums) |
+ dfacheckvalidator_tests.append(calculate_hash_sums) |
- env.Alias('dfacheckvalidator', calculate_hash_sums) |
+ env.Alias('dfafullcheckvalidator', dfafullcheckvalidator_tests) |
+ env.Alias('dfacheckvalidator', dfacheckvalidator_tests) |
+ |
# Targeted tests: RDFA validator test, dis section checker and spec_val test. |
for bits in ['32', '64']: |