Nice TWiki > Dev > WritingAutomatedTests ( vs. r1.1) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic WritingAutomatedTests (r1.1 - 22 Jun 2003 - DanielBonniot)

%META:TOPICINFO{author="DanielBonniot" date="1056276418" format="1.0" version="1.1"}% %META:TOPICPARENT{name="AutomatedTests"}%


A test is a procedure that checks some functionality of the Nice compiler.


Each test consists of an executable file. It must be placed in the toplevel directory of the framework. The file name must be of the form: .test Most likely, it will consist of a shell script, that drives the compilation of some code, and returns an exit code to report how it went.


The script can use the following environment variables:

  • NICE_JAR: The location of the 'nice.jar' files, which contains the fresh compiler to be tested.

  • CVS_SOURCEFORGE: The sourceforge CVS host to use.

  • JDK_VERSION: Version of the JDK that is going to be used, e.g. "1.4.1". This variable might not be set, in which case a recent version of the JDK can be expected. This is useful to skip some a test who require a certain version of the JDK.

Exit codes

  • 0: PASS
    The expected result happened.

  • 1: FAIL
    There was a problem. It might be a bug in the compiler, or in the test.

  • 2: SKIP
    This test is not applicable to the current configuration. For instance, you can use this not to run a test that requires a certain version of the JDK, which is not present in the current configuration.

    The test could not be executed for some reason. Ignore it. For instance, this should be used if the test needs to download some data or source code, and could not do it because the network is not working.


The test script should output on standard out detailed information about the execution of the test. This output will be stored, and can be used to diagnose why a test failed.

-- DanielBonniot - 22 Jun 2003

Topic WritingAutomatedTests . { View | Diffs | r1.1 | More }
Revision -
Revision r1.1 - 22 Jun 2003 - 10:06 GMT - DanielBonniot
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.