Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/trusted/validator_x86/build.scons

Issue 10116004: Eliminate bundle_size parameter from validator interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Merge Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 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 6
7 import os 7 import os
8 import sys 8 import sys
9 Import('env') 9 Import('env')
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 command, 341 command,
342 stdin = __BaseTestFile(base, 'hex'), 342 stdin = __BaseTestFile(base, 'hex'),
343 stdout_golden = __BaseTestFile(base, ext)) 343 stdout_golden = __BaseTestFile(base, ext))
344 __AddTest(test, test_env, base, ext, node_val, ['ncval_testing']) 344 __AddTest(test, test_env, base, ext, node_val, ['ncval_testing'])
345 345
346 if test_env.Bit('ncval_testing') and test_env.Bit('target_x86_64'): 346 if test_env.Bit('ncval_testing') and test_env.Bit('target_x86_64'):
347 for report_errors in [False, True]: 347 for report_errors in [False, True]:
348 __AddNcvalTestingTests(report_errors) 348 __AddNcvalTestingTests(report_errors)
349 349
350 # Run segment sandboxing tests using ncval on test files. 350 # Run segment sandboxing tests using ncval on test files.
351 def __AddNcvalSegmentTests(test_cpuid_all, test_stats, detailed, align_16): 351 def __AddNcvalSegmentTests(test_cpuid_all, test_stats, detailed):
352 if env.Bit('target_x86_32'): 352 if env.Bit('target_x86_32'):
353 options = ['--hex_text=-', 353 options = ['--hex_text=-',
354 '--max_errors=-1'] 354 '--max_errors=-1']
355 ext = 'nval' 355 ext = 'nval'
356 if (detailed): 356 if (detailed):
357 ext += 'd' 357 ext += 'd'
358 options.append('--detailed') 358 options.append('--detailed')
359 else: 359 else:
360 options.append('--detailed=false') 360 options.append('--detailed=false')
361 if (test_stats): 361 if (test_stats):
362 ext += 's' 362 ext += 's'
363 options.append('--stats') 363 options.append('--stats')
364 if (align_16):
365 ext += '16'
366 options.append('--alignment=16')
367 else:
368 options.append('--alignment=32')
369 if test_cpuid_all: 364 if test_cpuid_all:
370 options.append('--cpuid-all') 365 options.append('--cpuid-all')
371 else: 366 else:
372 ext += '0' 367 ext += '0'
373 options.append('--cpuid-none') 368 options.append('--cpuid-none')
374 test = 'ncval32_hex' 369 test = 'ncval32_hex'
375 for base in __GoldenBases(ext): 370 for base in __GoldenBases(ext):
376 command = [ncval] + options 371 command = [ncval] + options
377 node_val = test_env.CommandTest( 372 node_val = test_env.CommandTest(
378 __OutTestFile(test, base, ext), 373 __OutTestFile(test, base, ext),
379 command, 374 command,
380 stdin = __BaseTestFile(base, 'hex'), 375 stdin = __BaseTestFile(base, 'hex'),
381 stdout_golden = __BaseTestFile(base, ext)) 376 stdout_golden = __BaseTestFile(base, ext))
382 __AddTest(test, test_env, base, ext, node_val, 377 __AddTest(test, test_env, base, ext, node_val,
383 STANDARD_TESTS) 378 STANDARD_TESTS)
384 379
385 for cpu_features_all in [False, True]: 380 for cpu_features_all in [False, True]:
386 for test_stats in [False, True]: 381 for test_stats in [False, True]:
387 for detailed in [False, True]: 382 for detailed in [False, True]:
388 for align_16 in [False, True]: 383 __AddNcvalSegmentTests(cpu_features_all, test_stats, detailed)
389 __AddNcvalSegmentTests(cpu_features_all, test_stats,
390 detailed, align_16)
391 384
392 # Run tests for stubout on test files. The input file uses extension hex. 385 # Run tests for stubout on test files. The input file uses extension hex.
393 def __AddNcValStuboutTests(): 386 def __AddNcValStuboutTests():
394 test = 'ncval_stubout' 387 test = 'ncval_stubout'
395 options = ['--hex_text=-', '--stubout'] 388 options = ['--hex_text=-', '--stubout']
396 ext = 'sval' 389 ext = 'sval'
397 for base in __GoldenBases(ext): 390 for base in __GoldenBases(ext):
398 command = [ncval] + options 391 command = [ncval] + options
399 node_stubout = test_env.CommandTest( 392 node_stubout = test_env.CommandTest(
400 __OutTestFile(test, base, ext), 393 __OutTestFile(test, base, ext),
(...skipping 22 matching lines...) Expand all
423 __AddNegMaxErrors() 416 __AddNegMaxErrors()
424 417
425 if test_env.Bit('target_x86_64'): 418 if test_env.Bit('target_x86_64'):
426 node = test_env.CommandTest('ncval_hello_x32.out', 419 node = test_env.CommandTest('ncval_hello_x32.out',
427 [ncval, 420 [ncval,
428 env.File(os.path.join('${MAIN_DIR}/src/trusted', 421 env.File(os.path.join('${MAIN_DIR}/src/trusted',
429 'service_runtime', 422 'service_runtime',
430 'testdata/x86_64', 423 'testdata/x86_64',
431 'hello_x32.nexe'))]) 424 'hello_x32.nexe'))])
432 env.AddNodeToTestSuite(node, STANDARD_TESTS, 'run_ncval_hello_x32_test') 425 env.AddNodeToTestSuite(node, STANDARD_TESTS, 'run_ncval_hello_x32_test')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698