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

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

Issue 7031023: Run NaClEnvCleanser in standalone sel_ldr (in addition to sel_main_chrome). Add a couple of ld.so... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 7 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 import platform 6 import platform
7 7
8 Import('env') 8 Import('env')
9 9
10 # TODO(robertm): consider adding this to the top level scons files 10 # TODO(robertm): consider adding this to the top level scons files
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 # TODO(ncbray) why do we need to link against Cocoa? 259 # TODO(ncbray) why do we need to link against Cocoa?
260 # run_fake_browser_ppapi_test fails on mac, otherwise. 260 # run_fake_browser_ppapi_test fails on mac, otherwise.
261 # http://code.google.com/p/nativeclient/issues/detail?id=1242 261 # http://code.google.com/p/nativeclient/issues/detail?id=1242
262 sel_ldr_env = env.Clone() 262 sel_ldr_env = env.Clone()
263 if env.Bit('mac'): 263 if env.Bit('mac'):
264 sel_ldr_env.Append(FRAMEWORKS=['Cocoa']) 264 sel_ldr_env.Append(FRAMEWORKS=['Cocoa'])
265 265
266 SEL_LDR_NODE = sel_ldr_env.ComponentProgram('sel_ldr', 266 SEL_LDR_NODE = sel_ldr_env.ComponentProgram('sel_ldr',
267 'sel_main.c', 267 'sel_main.c',
268 EXTRA_LIBS=['sel', 268 EXTRA_LIBS=['sel',
269 'env_cleanser',
269 'nacl_error_code', 270 'nacl_error_code',
270 'simple_service', 271 'simple_service',
271 'thread_interface', 272 'thread_interface',
272 'gio_wrapped_desc', 273 'gio_wrapped_desc',
273 'nonnacl_srpc', 274 'nonnacl_srpc',
274 'nrd_xfer', 275 'nrd_xfer',
275 'nacl_perf_counter', 276 'nacl_perf_counter',
276 'nacl_base', 277 'nacl_base',
277 'imc', 278 'imc',
278 'container', 279 'container',
279 'platform', 280 'platform',
280 'platform_qual_lib', 281 'platform_qual_lib',
281 'gio', 282 'gio',
282 ] + VALIDATOR_LIBS 283 ] + VALIDATOR_LIBS
283 + DEBUG_LIBS) 284 + DEBUG_LIBS)
284 285
285 # we need this to build the plugin, so register it here 286 # we need this to build the plugin, so register it here
286 env.AddPluginPrerequisite(SEL_LDR_NODE) 287 env.AddPluginPrerequisite(SEL_LDR_NODE)
287 288
288 # NOTE: we do not have segments on ARM 289 # NOTE: we do not have segments on ARM
289 if env.Bit('build_x86'): 290 if env.Bit('build_x86'):
290 env.ComponentProgram('nacl_ldt_unittest', 291 env.ComponentProgram('nacl_ldt_unittest',
291 'nacl_ldt_unittest.c', 292 'nacl_ldt_unittest.c',
292 EXTRA_LIBS=['sel', 293 EXTRA_LIBS=['sel',
294 'env_cleanser',
293 'nacl_perf_counter', 295 'nacl_perf_counter',
294 'gio_wrapped_desc', 296 'gio_wrapped_desc',
295 'platform', 297 'platform',
296 'gio', 298 'gio',
297 ]) 299 ])
298 env.Requires(SEL_LDR_NODE, crt) 300 env.Requires(SEL_LDR_NODE, crt)
299 301
300 env.EnsureRequiredBuildWarnings() 302 env.EnsureRequiredBuildWarnings()
301 303
302 # ---------------------------------------------------------- 304 # ----------------------------------------------------------
(...skipping 25 matching lines...) Expand all
328 'sel_mem_test.cc', 330 'sel_mem_test.cc',
329 'sel_ldr_test.cc', 331 'sel_ldr_test.cc',
330 ] 332 ]
331 333
332 if (not env.CrossToolsBuild() and 334 if (not env.CrossToolsBuild() and
333 (not env.Bit('coverage_enabled') or not env.Bit('windows'))): 335 (not env.Bit('coverage_enabled') or not env.Bit('windows'))):
334 unit_tests_exe = gtest_env.ComponentProgram('service_runtime_tests', 336 unit_tests_exe = gtest_env.ComponentProgram('service_runtime_tests',
335 unittest_inputs, 337 unittest_inputs,
336 EXTRA_LIBS=['gtest', 338 EXTRA_LIBS=['gtest',
337 'sel', 339 'sel',
340 'env_cleanser',
338 'simple_service', 341 'simple_service',
339 'thread_interface', 342 'thread_interface',
340 'gio_wrapped_desc', 343 'gio_wrapped_desc',
341 'nonnacl_srpc', 344 'nonnacl_srpc',
342 'nrd_xfer', 345 'nrd_xfer',
343 'nacl_perf_counter', 346 'nacl_perf_counter',
344 'nacl_base', 347 'nacl_base',
345 'imc', 348 'imc',
346 'platform', 349 'platform',
347 'gio', 350 'gio',
348 ] + VALIDATOR_LIBS 351 ] + VALIDATOR_LIBS
349 + DEBUG_LIBS) 352 + DEBUG_LIBS)
350 gtest_env.Requires(unit_tests_exe, crt) 353 gtest_env.Requires(unit_tests_exe, crt)
351 354
352 node = gtest_env.CommandTest( 355 node = gtest_env.CommandTest(
353 'gtest_output.xml.out', 356 'gtest_output.xml.out',
354 command=[unit_tests_exe, '--gtest_output=xml:${TARGET}']) 357 command=[unit_tests_exe, '--gtest_output=xml:${TARGET}'])
355 gtest_env.AddNodeToTestSuite(node, ['small_tests'], 358 gtest_env.AddNodeToTestSuite(node, ['small_tests'],
356 'run_service_runtime_tests') 359 'run_service_runtime_tests')
357 360
358 361
359 if not env.Bit('coverage_enabled') or not env.Bit('windows'): 362 if not env.Bit('coverage_enabled') or not env.Bit('windows'):
360 format_string_test_exe = env.ComponentProgram( 363 format_string_test_exe = env.ComponentProgram(
361 'format_string_test', 364 'format_string_test',
362 ['format_string_test.c'], 365 ['format_string_test.c'],
363 EXTRA_LIBS=['sel', 366 EXTRA_LIBS=['sel',
367 'env_cleanser',
364 'nacl_perf_counter']) 368 'nacl_perf_counter'])
365 env.Requires(format_string_test_exe, crt) 369 env.Requires(format_string_test_exe, crt)
366 370
367 node = env.CommandTest( 371 node = env.CommandTest(
368 'format_string_test.out', 372 'format_string_test.out',
369 command=[format_string_test_exe]) 373 command=[format_string_test_exe])
370 env.AddNodeToTestSuite(node, ['small_tests'], 'run_format_string_test') 374 env.AddNodeToTestSuite(node, ['small_tests'], 'run_format_string_test')
371 375
372 376
373 if env.Bit('target_x86_32'): 377 if env.Bit('target_x86_32'):
374 arch_testdata_dir = 'testdata/x86_32' 378 arch_testdata_dir = 'testdata/x86_32'
375 elif env.Bit('target_x86_64'): 379 elif env.Bit('target_x86_64'):
376 arch_testdata_dir = 'testdata/x86_64' 380 arch_testdata_dir = 'testdata/x86_64'
377 else: 381 else:
378 arch_testdata_dir = 'testdata/' + env['TARGET_ARCHITECTURE'] 382 arch_testdata_dir = 'testdata/' + env['TARGET_ARCHITECTURE']
379 383
380 384
381 # Doesn't work on windows under coverage. 385 # Doesn't work on windows under coverage.
382 # TODO(bradnelson): fix this to work on windows under coverage. 386 # TODO(bradnelson): fix this to work on windows under coverage.
383 if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and 387 if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and
384 not env.CrossToolsBuild()): 388 not env.CrossToolsBuild()):
385 # NOTE: uses validator 389 # NOTE: uses validator
386 mmap_test_exe = env.ComponentProgram('mmap_test', 390 mmap_test_exe = env.ComponentProgram('mmap_test',
387 ['mmap_test.c'], 391 ['mmap_test.c'],
388 EXTRA_LIBS=['sel', 392 EXTRA_LIBS=['sel',
393 'env_cleanser',
389 'simple_service', 394 'simple_service',
390 'thread_interface', 395 'thread_interface',
391 'gio_wrapped_desc', 396 'gio_wrapped_desc',
392 'nonnacl_srpc', 397 'nonnacl_srpc',
393 'nrd_xfer', 398 'nrd_xfer',
394 'nacl_perf_counter', 399 'nacl_perf_counter',
395 'nacl_base', 400 'nacl_base',
396 'imc', 401 'imc',
397 'platform', 402 'platform',
398 'gio', 403 'gio',
(...skipping 15 matching lines...) Expand all
414 is_broken=env.Bit('build_arm') and env.UsingEmulator()) 419 is_broken=env.Bit('build_arm') and env.UsingEmulator())
415 420
416 421
417 # also seems to have issues with windows coverage or VMs 422 # also seems to have issues with windows coverage or VMs
418 # NOTE: uses validator 423 # NOTE: uses validator
419 is_broken = env.Bit('coverage_enabled') or env.Bit('running_on_vm') 424 is_broken = env.Bit('coverage_enabled') or env.Bit('running_on_vm')
420 nacl_sync_cond_test_exe = env.ComponentProgram( 425 nacl_sync_cond_test_exe = env.ComponentProgram(
421 'nacl_sync_cond_test', 426 'nacl_sync_cond_test',
422 ['nacl_sync_cond_test.c'], 427 ['nacl_sync_cond_test.c'],
423 EXTRA_LIBS=['sel', 428 EXTRA_LIBS=['sel',
429 'env_cleanser',
424 'simple_service', 430 'simple_service',
425 'thread_interface', 431 'thread_interface',
426 'gio_wrapped_desc', 432 'gio_wrapped_desc',
427 'nonnacl_srpc', 433 'nonnacl_srpc',
428 'nrd_xfer', 434 'nrd_xfer',
429 'nacl_perf_counter', 435 'nacl_perf_counter',
430 'nacl_base', 436 'nacl_base',
431 'imc', 437 'imc',
432 'platform', 438 'platform',
433 'gio', 439 'gio',
(...skipping 20 matching lines...) Expand all
454 env.Requires(env_cleanser_test_exe, crt) 460 env.Requires(env_cleanser_test_exe, crt)
455 env.AddNodeToTestSuite(node, ['small_tests']) 461 env.AddNodeToTestSuite(node, ['small_tests'])
456 462
457 # Test nacl_signal 463 # Test nacl_signal
458 if (not env.Bit('coverage_enabled') and 464 if (not env.Bit('coverage_enabled') and
459 not env.Bit('target_arm') and 465 not env.Bit('target_arm') and
460 not env.IsRunningUnderValgrind()): 466 not env.IsRunningUnderValgrind()):
461 nacl_signal_exe = env.ComponentProgram('nacl_signal_unittest', 467 nacl_signal_exe = env.ComponentProgram('nacl_signal_unittest',
462 'nacl_signal_unittest.c', 468 'nacl_signal_unittest.c',
463 EXTRA_LIBS=['sel', 469 EXTRA_LIBS=['sel',
470 'env_cleanser',
464 'nacl_perf_counter', 471 'nacl_perf_counter',
465 'gio_wrapped_desc', 472 'gio_wrapped_desc',
466 'platform', 473 'platform',
467 'gio', 474 'gio',
468 ]) 475 ])
469 node = env.CommandTest('nacl_signal_unittest.out', 476 node = env.CommandTest('nacl_signal_unittest.out',
470 command=[nacl_signal_exe], 477 command=[nacl_signal_exe],
471 exit_status='trusted_sigsegv_or_equivalent') 478 exit_status='trusted_sigsegv_or_equivalent')
472 479
473 env.Requires(nacl_signal_exe, crt) 480 env.Requires(nacl_signal_exe, crt)
474 env.AddNodeToTestSuite(node, ['small_tests'], 'run_nacl_signal_test') 481 env.AddNodeToTestSuite(node, ['small_tests'], 'run_nacl_signal_test')
475 482
476 if env.Bit('posix'): 483 if env.Bit('posix'):
477 test_prog = env.ComponentProgram('nacl_signal_frame_test', 484 test_prog = env.ComponentProgram('nacl_signal_frame_test',
478 'nacl_signal_frame_test.c', 485 'nacl_signal_frame_test.c',
479 EXTRA_LIBS=['sel', 486 EXTRA_LIBS=['sel',
487 'env_cleanser',
480 'nacl_perf_counter', 488 'nacl_perf_counter',
481 'gio_wrapped_desc', 489 'gio_wrapped_desc',
482 'platform', 490 'platform',
483 'gio', 491 'gio',
484 ]) 492 ])
485 node = env.CommandTest('nacl_signal_frame_test.out', 493 node = env.CommandTest('nacl_signal_frame_test.out',
486 command=[test_prog], 494 command=[test_prog],
487 exit_status='trusted_segfault') 495 exit_status='trusted_segfault')
488 env.AddNodeToTestSuite(node, ['small_tests'], 'run_signal_frame_test') 496 env.AddNodeToTestSuite(node, ['small_tests'], 'run_signal_frame_test')
489 497
490 498
491 check_test_exe = env.ComponentProgram('nacl_check_test', 499 check_test_exe = env.ComponentProgram('nacl_check_test',
492 ['nacl_check_test.c'], 500 ['nacl_check_test.c'],
493 EXTRA_LIBS=['sel', 501 EXTRA_LIBS=['sel',
502 'env_cleanser',
494 'nacl_perf_counter', 503 'nacl_perf_counter',
495 'gio_wrapped_desc', 504 'gio_wrapped_desc',
496 'platform', 505 'platform',
497 'gio', 506 'gio',
498 ]) 507 ])
499 node = env.CommandTest( 508 node = env.CommandTest(
500 'check_test.out', 509 'check_test.out',
501 command=[check_test_exe, '-C']) 510 command=[check_test_exe, '-C'])
502 env.Requires(check_test_exe, crt) 511 env.Requires(check_test_exe, crt)
503 env.AddNodeToTestSuite(node, ['small_tests']) 512 env.AddNodeToTestSuite(node, ['small_tests'])
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 604
596 # Doesn't work on windows under coverage. 605 # Doesn't work on windows under coverage.
597 # TODO(bradnelson): fix this to work on windows under coverage. 606 # TODO(bradnelson): fix this to work on windows under coverage.
598 # NOTE: uses validator 607 # NOTE: uses validator
599 if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and 608 if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and
600 not env.CrossToolsBuild()): 609 not env.CrossToolsBuild()):
601 obj_proxy_test_inputs = [ 'fs/obj_proxy_test.c', ] 610 obj_proxy_test_inputs = [ 'fs/obj_proxy_test.c', ]
602 obj_proxy_test = env.ComponentProgram('obj_proxy_test', 611 obj_proxy_test = env.ComponentProgram('obj_proxy_test',
603 obj_proxy_test_inputs, 612 obj_proxy_test_inputs,
604 EXTRA_LIBS=['sel', 613 EXTRA_LIBS=['sel',
614 'env_cleanser',
605 'simple_service', 615 'simple_service',
606 'thread_interface', 616 'thread_interface',
607 'gio_wrapped_desc', 617 'gio_wrapped_desc',
608 'nonnacl_srpc', 618 'nonnacl_srpc',
609 'nrd_xfer', 619 'nrd_xfer',
610 'nacl_perf_counter', 620 'nacl_perf_counter',
611 'nacl_base', 621 'nacl_base',
612 'imc', 622 'imc',
613 'platform', 623 'platform',
614 'gio', 624 'gio',
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 # ---------------------------------------------------------- 748 # ----------------------------------------------------------
739 # More Death Tests 749 # More Death Tests
740 # ---------------------------------------------------------- 750 # ----------------------------------------------------------
741 if (not env.CrossToolsBuild() and 751 if (not env.CrossToolsBuild() and
742 (not env.Bit('coverage_enabled') or not env.Bit('windows'))): 752 (not env.Bit('coverage_enabled') or not env.Bit('windows'))):
743 # NOTE: uses validator 753 # NOTE: uses validator
744 sel_ldr_thread_death_test_exe = env.ComponentProgram( 754 sel_ldr_thread_death_test_exe = env.ComponentProgram(
745 'sel_ldr_thread_death_test', 755 'sel_ldr_thread_death_test',
746 ['sel_ldr_thread_death_test.c'], 756 ['sel_ldr_thread_death_test.c'],
747 EXTRA_LIBS=['sel', 757 EXTRA_LIBS=['sel',
758 'env_cleanser',
748 'simple_service', 759 'simple_service',
749 'thread_interface', 760 'thread_interface',
750 'gio_wrapped_desc', 761 'gio_wrapped_desc',
751 'nonnacl_srpc', 762 'nonnacl_srpc',
752 'nrd_xfer', 763 'nrd_xfer',
753 'nacl_perf_counter', 764 'nacl_perf_counter',
754 'nacl_base', 765 'nacl_base',
755 'imc', 766 'imc',
756 'platform', 767 'platform',
757 'gio', 768 'gio',
758 ] + VALIDATOR_LIBS 769 ] + VALIDATOR_LIBS
759 + DEBUG_LIBS) 770 + DEBUG_LIBS)
760 771
761 node = env.CommandTest( 772 node = env.CommandTest(
762 'sel_ldr_thread_death_test.out', 773 'sel_ldr_thread_death_test.out',
763 command=[sel_ldr_thread_death_test_exe], 774 command=[sel_ldr_thread_death_test_exe],
764 exit_status='sigabrt') 775 exit_status='sigabrt')
765 776
766 # TODO(tuduce): Make it work on windows. 777 # TODO(tuduce): Make it work on windows.
767 env.AddNodeToTestSuite(node, ['medium_tests'], 778 env.AddNodeToTestSuite(node, ['medium_tests'],
768 'run_sel_ldr_thread_death_test', 779 'run_sel_ldr_thread_death_test',
769 is_broken=env.Bit('windows')) 780 is_broken=env.Bit('windows'))
OLDNEW
« no previous file with comments | « src/trusted/nonnacl_util/sel_ldr_launcher.cc ('k') | src/trusted/service_runtime/env_cleanser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698