| OLD | NEW |
| 1 # Copyright 2009, Google Inc. | 1 # Copyright 2009, Google Inc. |
| 2 # All rights reserved. | 2 # All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 gl_requirements += [ | 145 gl_requirements += [ |
| 146 '$ARTIFACTS_DIR/cg.dll', | 146 '$ARTIFACTS_DIR/cg.dll', |
| 147 '$ARTIFACTS_DIR/cgGL.dll', | 147 '$ARTIFACTS_DIR/cgGL.dll', |
| 148 '$ARTIFACTS_DIR/glew32.dll', | 148 '$ARTIFACTS_DIR/glew32.dll', |
| 149 ] | 149 ] |
| 150 | 150 |
| 151 # TODO: shouldn't need this. | 151 # TODO: shouldn't need this. |
| 152 # Adding extra line for cleaner formatting. | 152 # Adding extra line for cleaner formatting. |
| 153 env.Help('\n') | 153 env.Help('\n') |
| 154 | 154 |
| 155 swiftshader_install = [] |
| 156 if env.Bit('windows'): |
| 157 # Copy SwiftShader to plugin dir. |
| 158 swiftshader_path = env.subst('$SWIFTSHADER_DIR/swiftshader_d3d9.dll') |
| 159 if os.path.exists(swiftshader_path): |
| 160 swiftshader_install = env.Replicate('$ARTIFACTS_DIR/O3DExtras', |
| 161 swiftshader_path) |
| 162 |
| 155 # ------------------------------------------------------------------------- | 163 # ------------------------------------------------------------------------- |
| 156 # Unit tests | 164 # Unit tests |
| 157 | 165 |
| 158 # The basic unit tests | 166 # The basic unit tests |
| 159 tests = [ | 167 tests = [ |
| 160 'base/cross/bits_test.cc', | 168 'base/cross/bits_test.cc', |
| 161 'compiler/technique/technique_parser_test.cc', | 169 'compiler/technique/technique_parser_test.cc', |
| 162 'core/cross/bitmap_test.cc', | 170 'core/cross/bitmap_test.cc', |
| 163 'core/cross/bounding_box_test.cc', | 171 'core/cross/bounding_box_test.cc', |
| 164 'core/cross/buffer_test.cc', | 172 'core/cross/buffer_test.cc', |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 unit_tests_req += env.Replicate( | 319 unit_tests_req += env.Replicate( |
| 312 '$ARTIFACTS_DIR/bitmap_test', | 320 '$ARTIFACTS_DIR/bitmap_test', |
| 313 '$SCONSTRUCT_DIR/tests/bitmap_test/*') | 321 '$SCONSTRUCT_DIR/tests/bitmap_test/*') |
| 314 | 322 |
| 315 unit_tests_req += env.Replicate( | 323 unit_tests_req += env.Replicate( |
| 316 '$ARTIFACTS_DIR/archive_files', | 324 '$ARTIFACTS_DIR/archive_files', |
| 317 '$SCONSTRUCT_DIR/tests/archive_files/*') | 325 '$SCONSTRUCT_DIR/tests/archive_files/*') |
| 318 | 326 |
| 319 # Also require gl related libraries based on variant. | 327 # Also require gl related libraries based on variant. |
| 320 unit_tests_req += gl_requirements | 328 unit_tests_req += gl_requirements |
| 329 unit_tests_req += swiftshader_install |
| 321 | 330 |
| 322 # Add requirements for unit tests. | 331 # Add requirements for unit tests. |
| 323 env.Requires(unit_tests_install, unit_tests_req) | 332 env.Requires(unit_tests_install, unit_tests_req) |
| 324 | 333 |
| 325 # TODO: temporarily continue to use aliases to run tests. | 334 # TODO: temporarily continue to use aliases to run tests. |
| 326 # This need to eventually switch to use ComponentTestProgram once | 335 # This need to eventually switch to use ComponentTestProgram once |
| 327 # other sections have been adjusted. | 336 # other sections have been adjusted. |
| 328 env['PROGRAM_NAME'] = unit_tests_install[0].path | 337 env['PROGRAM_NAME'] = unit_tests_install[0].path |
| 329 env['PROGRAM_BASENAME'] = os.path.join('$ARTIFACTS_DIR', 'unit_tests') | 338 env['PROGRAM_BASENAME'] = os.path.join('$ARTIFACTS_DIR', 'unit_tests') |
| 330 env.AlwaysBuild(run_env.Alias('unit_tests', unit_tests_install, | 339 env.AlwaysBuild(run_env.Alias('unit_tests', unit_tests_install, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 'testing_framework_hardware.PIXExp', | 451 'testing_framework_hardware.PIXExp', |
| 443 'package_tests.bat', | 452 'package_tests.bat', |
| 444 ]) | 453 ]) |
| 445 system_tests_req += pix_requirements | 454 system_tests_req += pix_requirements |
| 446 | 455 |
| 447 if installed_pdiff: | 456 if installed_pdiff: |
| 448 system_tests_req += installed_pdiff | 457 system_tests_req += installed_pdiff |
| 449 | 458 |
| 450 # Also require gl related libraries based on variant. | 459 # Also require gl related libraries based on variant. |
| 451 system_tests_req += gl_requirements | 460 system_tests_req += gl_requirements |
| 452 | 461 |
| 462 # Require SwiftShader (only if it is available). |
| 463 system_tests_req += swiftshader_install |
| 464 |
| 453 # Add requirements for system_tests. | 465 # Add requirements for system_tests. |
| 454 env.Requires(system_tests_install, system_tests_req) | 466 env.Requires(system_tests_install, system_tests_req) |
| 455 | 467 |
| 456 # Get command line flags for tests driver. | 468 # Get command line flags for tests driver. |
| 457 if int(ARGUMENTS.get('hardware', 1)): | 469 if int(ARGUMENTS.get('hardware', 1)): |
| 458 env.Replace(TEST_DRIVER_FLAGS = '-hardware') | 470 env.Replace(TEST_DRIVER_FLAGS = '-hardware') |
| 459 | 471 |
| 460 # Create an alias for the execution of the system tests. | 472 # Create an alias for the execution of the system tests. |
| 461 env.Alias('system_tests') | 473 env.Alias('system_tests') |
| 462 # Only add actual step if d3d mode (for now). | 474 # Only add actual step if d3d mode (for now). |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 plugin_install_steps + | 597 plugin_install_steps + |
| 586 [run_env.Python([ | 598 [run_env.Python([ |
| 587 'tests/selenium/main.py', | 599 'tests/selenium/main.py', |
| 588 '$SELENIUM_FLAGS', | 600 '$SELENIUM_FLAGS', |
| 589 '--browser=*firefox', | 601 '--browser=*firefox', |
| 590 '--browserpath="' + browser_path + '"', | 602 '--browserpath="' + browser_path + '"', |
| 591 '--referencedir=$TEST_REFERENCE_IMAGES', | 603 '--referencedir=$TEST_REFERENCE_IMAGES', |
| 592 '--screenshotsdir=$ARTIFACTS_DIR/selenium/screenshots_firefox'])] + | 604 '--screenshotsdir=$ARTIFACTS_DIR/selenium/screenshots_firefox'])] + |
| 593 cleanup_steps, | 605 cleanup_steps, |
| 594 ) | 606 ) |
| 607 |
| 608 # Require SwiftShader (only if it is available). |
| 609 run_env.Requires(run_selenium_firefox, swiftshader_install) |
| 595 | 610 |
| 596 if run_env.Bit('windows'): | 611 if run_env.Bit('windows'): |
| 597 run_selenium_ie = run_env.Alias( | 612 run_selenium_ie = run_env.Alias( |
| 598 'selenium_ie', | 613 'selenium_ie', |
| 599 ['$ARTIFACTS_DIR/${LIBPREFIX}npo3dautoplugin$SHLIBSUFFIX', | 614 ['$ARTIFACTS_DIR/${LIBPREFIX}npo3dautoplugin$SHLIBSUFFIX', |
| 600 env.GetPublished('samples', 'asset_files')], | 615 env.GetPublished('samples', 'asset_files')], |
| 601 # TODO: have a cleaner way to do this. | 616 # TODO: have a cleaner way to do this. |
| 602 [Delete('$ARTIFACTS_DIR/selenium/screenshots_ie'), | 617 [Delete('$ARTIFACTS_DIR/selenium/screenshots_ie'), |
| 603 Mkdir('$ARTIFACTS_DIR/selenium/screenshots_ie'), | 618 Mkdir('$ARTIFACTS_DIR/selenium/screenshots_ie'), |
| 604 run_env.Python([ | 619 run_env.Python([ |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 # Adding extra line for cleaner formatting. | 747 # Adding extra line for cleaner formatting. |
| 733 env.Help('\n') | 748 env.Help('\n') |
| 734 | 749 |
| 735 | 750 |
| 736 #-------------------------------------------------------------------------- | 751 #-------------------------------------------------------------------------- |
| 737 # Other odds and ends | 752 # Other odds and ends |
| 738 | 753 |
| 739 # Install presubmit_tests batch file. | 754 # Install presubmit_tests batch file. |
| 740 # TODO: is this really needed anymore? | 755 # TODO: is this really needed anymore? |
| 741 env.Replicate('$ARTIFACTS_DIR', 'presubmit_tests.bat') | 756 env.Replicate('$ARTIFACTS_DIR', 'presubmit_tests.bat') |
| OLD | NEW |