From 5cf552a62742c6ddc974ba5491188576d512254e Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 24 May 2010 17:38:19 +0200 Subject: Add run_test program for Common Test Common Test may now be started with the program run_test instead of the legacy shell script with the same name. Minor updates have also been made to the Webtool application. --- lib/common_test/doc/src/install_chapter.xml | 135 ++++++++++++++-------------- 1 file changed, 65 insertions(+), 70 deletions(-) (limited to 'lib/common_test/doc/src/install_chapter.xml') diff --git a/lib/common_test/doc/src/install_chapter.xml b/lib/common_test/doc/src/install_chapter.xml index e1ff5abf6a..d5a12cd9f3 100644 --- a/lib/common_test/doc/src/install_chapter.xml +++ b/lib/common_test/doc/src/install_chapter.xml @@ -4,7 +4,7 @@
- 20072009 + 20072010 Ericsson AB. All Rights Reserved. @@ -33,82 +33,77 @@ General information -

The two main interfaces for running tests with Common Test - are an executable Bourne shell script named run_test and an - erlang module named ct. The shell script will work on Unix/Linux - (and Linux-like environments such as Cygwin on Windows) and the - ct interface functions can be called from the Erlang shell - (or from any Erlang function) on any supported platform.

- -

The Common Test application is installed with the Erlang/OTP - system and no explicit installation is required to start using - Common Test by means of the interface functions in the ct - module. If you wish to use run_test, however, this script - needs to be generated first, according to the instructions below.

- - -
- Unix/Linux - -

Go to the ]]> directory, located - among the other OTP applications (under the OTP lib directory). Here you - execute the install.sh script with argument local:

+

The two main interfaces for running tests with Common Test + are an executable program named run_test and an + erlang module named ct. The run_test program + is compiled for the underlying operating system (e.g. Unix/Linux + or Windows) during the build of the Erlang/OTP system, and is + installed automatically with other executable programs in + the top level bin directory of Erlang/OTP. + The ct interface functions can be called from the Erlang shell, + or from any Erlang function, on any supported platform.

+ +

A legacy Bourne shell script - also named run_test - exists, + which may be manually generated and installed. This script may be used + instead of the run_test program mentioned above, e.g. if the user + wishes to modify or customize the Common Test start flags in a simpler + way than making changes to the run_test C program.

-

- $ ./install.sh local -

+

The Common Test application is installed with the Erlang/OTP + system and no additional installation step is required to start using + Common Test by means of the run_test executable program, and/or the interface + functions in the ct module. If you wish to use the legacy Bourne + shell script version of run_test, however, this script needs to be + generated first, according to the instructions below.

+ +

Before reading on, please note that since Common Test version + 1.5, the run_test shell script is no longer required for starting + tests with Common Test from the OS command line. The run_test + program (descibed above) is the new recommended command line interface + for Common Test. The shell script exists mainly for legacy reasons and + may not be updated in future releases of Common Test. It may even be removed. +

+ +

Optional step to generate a shell script for starting Common Test:

+

To generate the run_test shell script, navigate to the + ]]> directory, located among the other + OTP applications (under the OTP lib directory). Here execute the + install.sh script with argument local:

+ +

+ $ ./install.sh local +

-

This generates the executable run_test script in the - /priv/bin]]> directory. The script - will include absolute paths to the Common Test and Test Server - application directories, so it's possible to copy or move the script to - a different location on the file system, if desired, without having to - update it. It's of course possible to leave the script under the - priv/bin directory and update the PATH variable accordingly (or - create a link or alias to it).

- -

If you, for any reason, have copied Common Test and Test Server - to a different location than the default OTP lib directory, you can - generate a run_test script with a different top level directory, - simply by specifying the directory, instead of local, when running - install.sh. Example:

- -

- $ install.sh /usr/local/test_tools +

This generates the executable run_test script in the + /priv/bin]]> directory. The script + will include absolute paths to the Common Test and Test Server + application directories, so it's possible to copy or move the script to + a different location on the file system, if desired, without having to + update it. It's of course possible to leave the script under the + priv/bin directory and update the PATH variable accordingly (or + create a link or alias to it).

+ +

If you, for any reason, have copied Common Test and Test Server + to a different location than the default OTP lib directory, you can + generate a run_test script with a different top level directory, + simply by specifying the directory, instead of local, when running + install.sh. Example:

+ +

+ $ install.sh /usr/local/test_tools

Note that the ]]> and - ]]> directories must be located under the - same top directory. Note also that the install script does not copy files - or update environment variables. It only generates the run_test - script.

+ ]]> directories must be located under the + same top directory. Note also that the install script does not copy files + or update environment variables. It only generates the run_test + script.

-

Whenever you install a new version of Erlang/OTP, the run_test - script needs to be regenerated, or updated manually with new directory names - (new version numbers), for it to "see" the latest Common Test and Test Server - versions.

+

Whenever you install a new version of Erlang/OTP, the run_test + script needs to be regenerated, or updated manually with new directory names + (new version numbers), for it to "see" the latest Common Test and Test Server + versions.

-

For more information on the run_test script and the ct - module, please see the reference manual.

-
- -
- Windows - -

On Windows it is very convenient to use Cygwin (www.cygwin.com) - for running Common Test and Erlang, since it enables you to use the - run_test script for starting Common Test. If you are a Cygwin - user, simply follow the instructions above for generating the run_test - script.

- -

If you do not use Cygwin, you have to rely on the API functions - in the ct module (instead of run_test) for running - Common Test as described initially in this chapter.

- -

If you, for any reason, have chosen to store Common Test and Test Server - in a different location than the default OTP lib directory, make - sure the ebin directories of these applications are included - in the Erlang code server path (so the application modules can be loaded).

-- cgit v1.2.3