XGL Test Suite User's Guide
只搜尋這本書
以 PDF 格式下載這本書

Verifying Your Implementation

2

Verifying your XGL implementation using Denizen involves performing these steps:
  1. Setting the appropriate environment variables.

  2. Invoking run_denizen.sh, which executes Denizen and creates a verification log.

  3. Comparing your results to the current XGL release test results.

This chapter shows you how to create verification logs similar to the logs stored in the logs/ directory, and describes a method for comparing them. In addition, different options for running Denizen are discussed. Finally, several examples show you how to design your own test runs.
OpenWindows must be running before you can invoke run_denizen.sh.
  1. Set the environment variable DENIZENHOME.

    You must use the absolute or full path name of the local directory. In this case, assume your home directory is /home/xgl.


  hostname% setenv DENIZENHOME /opt/sunwddk/xgl/src/test_suite/denizen  

  1. Change directories to the location of the Denizen files.

    The Denizen files must either reside on your workstation, or be mounted on your system. In this case, assume that the Denizen files were installed from CD into /opt/sunwddk/xgl/src/test_suite/denizen.


  hostname% cd /opt/sunwddk/xgl/src/test_suite/denizen  

  1. Verify the installation.

    Change the directory to $DENIZENHOME, and list the contents. You should see the following information.


 hostname% cd $DENIZENHOME  
 hostname% ls *  
 Makefile            common_flags.mk         setup_cg3  
 INSTRUCTIONS        run_denizen.sh          setup_cg6  
 README              setup.common            setup_cg8  
  
 doc:  
 libdenizen/      test_desc/  
  
 images:  
 refimages-cg3/  
 refimages-cg8/  
 refimages-cg6/  
 curimages-cg3/  
 curimages-cg8/  
 curimages-cg6/  
  
 include:  
  
 lib:  
 libdenizen.so  
  
 logs:  
 XGL log for 8- and 24-bit reference frame buffers  

Text Box(272x72)


 testcases:  


Setting Environment Variables

The Denizen Test Suite uses several environment variables. Table 2-1 lists the required environment variables and their meanings. Absolute paths must be used for the directories.
Table 2-1
Environment VariableMeaning
DENIZENHOMEThe local directory where Denizen has been installed, and where testing will be performed. Note that this $DENIZENHOME/lib should be listed in $LD_LIBRARY_PATH.
LD_LIBRARY_PATHA colon-separated list of directories in which to search for the XGL and OpenWindows libraries. Denizen will use the version of XGL encountered first in this list of directories.
XGLHOMEThe directory that contains the include and lib directories of the version of XGL to be tested. Note that this $XGLHOME/lib should be listed in $LD_LIBRARY_PATH.
OPENWINHOMEThe location of OpenWindows libraries and include files. Most OpenWindows start-up scripts set this environment variable or require that this variable be set. Note that this $OPENWINHOME/lib should be listed in $LD_LIBRARY_PATH.
FB_NAMEThe device being tested, for example cg3. It must also be set manually when running individual tests. An error message results if not set. Supported devices are cg3, cg8, and cg6.
Table 2-1
Environment VariableMeaning
REFIMAGEThe location of the approved comparison images.
CURIMAGEThe location of the nonmatching images.
DENIZEN_DESTDIRThe location for the log file if this variable is set. Otherwise, the default is your home directory.
The following information details the settings for these environment variables in our example.

  hostname% setenv DENIZENHOME /opt/sunwddk/xgl/src/test_suite/denizen  
  hostname% setenv XGLHOME /opt/SUNWits/graphics-sw/xgl  
  hostname% setenv OPENWINHOME /usr/openwin  
  hostname% setenv LD_DIBRARY_PATH $XGLHOME/lib:$OPENWINHOME/lib:$DENIZENHOME/lib  
  hostname% setenv FB_NAME cg3  
  hostname% setenv REFIMAGE $DENIZENHOME/images/refimages-cg3  
  hostname% setenv CURIMAGE $DENIZENHOME/images/curimages-cg3  

Creating Verification Logs

To verify your XGL implementation, you need to create verification logs comparable to those supplied in the logs/ directory.

  hostname% cd $DENIZENHOME  
  hostname% run_denizen.sh  

You can run Denizen from DENIZENHOME, or from a directory other than DENIZENHOME. If you choose a directory other than DENIZENHOME, use the whole path name of the script.

  hostname% $DENIZENHOME/run_denizen.sh  

The test programs are run in sequence. The status of each test is displayed in the window from which you started Denizen, and is also stored in the verification log. Because many of the tests read pixels from the test window to verify results, it is important that the window is not obscured. You may want to run Denizen at night, or on test machines not used for other work.
The verification log file is stored in either $DENIZEN_DESTDIR, or if that is not set, in your home directory. The file name is encoded with the hostname and the date the test suite was run (run_denizen.log <hostname><date>). This log shows the configuration that was tested, the test programs Denizen ran, and the results of each test. If you run Denizen again on the same date, the current log will be moved to a <filename>.old file.

Comparing Your Results

By comparing verification logs with the logs supplied in the logs/ directory, you can see how your XGL implementation compares to the current XGL release. You may want to move your verification log to the logs/ directory, and rename it appropriately.

  hostname% mv run_denizen.log.hostnameSep16  
  logs/mylog.<fb_type>.Sep16  

Your XGL implementation will comply with the current XGL release if the logs are similar. Discrepancies between the logs indicate differences in your implementation.
Each of the tests is described in the following chapters. More information on using Denizen is provided in Chapter 3, "Options for Running Denizen." These chapters can help you analyze any discrepancies.
If you run the comparison methodology image tests, and the images produced by your device pipeline differ from the reference images, the images with discrepancies will be put in the directory you have set for CURIMAGE. You then need to use the inspector tool (discussed in the following section) to verify your images manually. The inspector tool makes it easy to view the differences between images.

Using the Inspector Tool to Analyze Images

If you choose to run the comparison methodology tests, this tool helps you manually compare a failing (nonmatching/uncertified) image to a reference image.
The environment variables REFIMAGE and CURIMAGE must be set when using the inspector tool. The inspector tool is fairly simple to use because it provides a graphical user interface.
Inspector tool lists the image files it finds in the $CURIMAGE directory. To view the new image with a reference image, choose the image name and press the Load button.
The reference image is shown in the left window, and the image under scrutiny is shown in the right window. If the discrepancies are not readily apparent, a diff button allows you to see the differences more easily. If the new nonmatching image is verified as acceptable, you can save this image as the new reference image for the device being tested. So for example, you might create a new REFIMAGE area, $DENIZENHOME/images/refimage-<new fbname>, move your verified images into it, and set the REFIMAGE environment variable to that new directory.