Tobin Ehlis | d22e3ff | 2015-03-27 11:47:10 -0600 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Run all the regression tests with validation layers enabled |
| 4 | |
| 5 | # enable layers |
| 6 | export LIBXGL_LAYER_NAMES=DrawState:MemTracker:ParamChecker:ObjectTracker |
| 7 | # Save any existing settings file |
| 8 | RESTORE_SETTINGS="false" |
| 9 | SETTINGS_NAME="xgl_layer_settings.txt" |
| 10 | TMP_SETTINGS_NAME="xls.txt" |
| 11 | OUTPUT_LEVEL="XGL_DBG_LAYER_LEVEL_ERROR" |
| 12 | if [ -f $SETTINGS_NAME ]; then |
| 13 | echo Saving $SETTINGS_NAME to $TMP_SETTINGS_NAME |
| 14 | RESTORE_SETTINGS="true" |
| 15 | mv $SETTINGS_NAME $TMP_SETTINGS_NAME |
| 16 | else |
| 17 | echo not copying layer settings |
| 18 | fi |
| 19 | # Write out settings file to run tests with |
| 20 | echo "MemTrackerReportLevel = $OUTPUT_LEVEL" > $SETTINGS_NAME |
| 21 | echo "DrawStateReportLevel = $OUTPUT_LEVEL" >> $SETTINGS_NAME |
| 22 | echo "ObjectTrackerReportLevel = $OUTPUT_LEVEL" >> $SETTINGS_NAME |
| 23 | echo "ParamCheckerReportLevel = $OUTPUT_LEVEL" >> $SETTINGS_NAME |
| 24 | |
| 25 | # xglbase tests that basic XGL calls are working (don't return an error). |
| 26 | ./xglbase |
| 27 | |
| 28 | # xgl_blit_tests test Fill/Copy Memory, Clears, CopyMemoryToImage |
| 29 | ./xgl_blit_tests |
| 30 | |
| 31 | # xgl_image_tests check that image can be allocated and bound. |
| 32 | ./xgl_image_tests |
| 33 | |
| 34 | #xgl_render_tests tests a variety of features using rendered images |
| 35 | # --compare-images will cause the test to check the resulting image against |
| 36 | # a saved "golden" image and will report an error if there is any difference |
| 37 | ./xgl_render_tests --compare-images |
| 38 | |
| 39 | if [ "$RESTORE_SETTINGS" = "true" ]; then |
| 40 | echo Restore $SETTINGS_NAME from $TMP_SETTINGS_NAME |
| 41 | mv $TMP_SETTINGS_NAME $SETTINGS_NAME |
| 42 | fi |
| 43 | |