Test Scripts for RKF Component Library

This page describes various test scripts available for the RKF component library
  1. test-comp.sh This the nightly cron job that checks the correctness of the components and updates the taxonomy tree . It does this by calling the following scripts.

  2. tester.lisp This script has several function that checks the syntax of all components, and it goes through all the test cases of the components. The results are recorded in test-result.txt.

  3. update-comp.sh This script calls kmtags and tohtml.pl to convert km files into html files, and then calls tax-2-js.lisp to update the taxonomy tree .

  4. kmtags: kmtags is a utility that extracts frame names from a directory.

  5. tohtml.pl: This script converts km files into html files with links to frame/slot names, etc. This script requires the TAG file output from kmtags.

  6. extractdefs.pl: This script extracts the definition portion of the spec files, and outputs the results in the form of a lisp list. This list is later used by the tax-2-js.lisp file to create definitioins for each components.

  7. tax-2-js.v2.lisp This script generates the javascript describing the taxonomy tree in our component library.

  8. sweep This script applies a given command to a list of files. It differs from other UNIX execute commands in that the file name can be referred to, for example: sweep ./*.c "mv %FILE% %FILE%pp" renames all the *.c files into *.cpp files in the current directory. Here's another example: sweep *.km "perl -pe 's/Tangible-Thing/Tangible-Entity/g' %FILE% > /tmp/temp-sed-file; cp /tmp/temp-sed-file %FILE%", this command replaces all occurrences of Tangible-Thing with Tangible-Entity in all *.km files in the current directory.

  9. cron.script: The script that specifies the cron job running nightly at 12:01 am on ebola.cs.utexas.edu

Here's how to use the script:

  1. Verifying the correctness of the components

    In order to verify the correctness, you need to obtain a copy of the latest version of all the scripts.

    %> cvs checkout autotest

    To test all the components, you can do the following:

    %> acl

    acl> (load "tester.lisp")

    acl> (tester "km.lisp" "../components/" nil)

    km.lisp is the location of the km file.

    ../components/ is the directory where all the components are stored.

    To test a particular component, you can do the following:

    %> acl

    acl> (load "tester.lisp")

    acl> (load-comp-lib t "km.lisp" "../components/" nil nil)

    acl> (test-component "component-name" t)

    If the return value is nil then the component has passed the test

  2. Updating the taxonomy tree

    After the modified components have passed the test, and you have commited the changes back into CVS, you can update the taxonomy by doing the following:

    %> /projects/rkf/util/test-comp.sh

  3. Releasing a component

    After a component has been developed and tested, you can tag it as "RELEASED". Released components show up in the taxonomy tree in green. For example:

    %> cvs tag "RELEASED" Move.km

    To take away the RELEASED tag of a component so that it can be put back into development, do the following:

    %> cvs tag -d "RELEASED" Move.km