[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. For ISIS Developers

11.1 Required Tools  
11.2 Debug Mode  
11.3 Testing of libraries  
11.4 Macros in acinclude.m4  
11.5 Writing Test Scripts  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.1 Required Tools

For system development of ISIS, the following tools are required other than installation tools.

autoconf-2.57
automake-1.7.6
Checks the environment for execution of make, and generates `Makefile'.

libtool-1.5
Supports generating shared libraries.

texinfo-4.5
ptex-2.1.8
Generates manuals.

tar-1.12
Generates the package.

gzip-1.2.4a
Creates and unpacks the data files for tests.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.2 Debug Mode

When ./configure is executed, debug mode ISIS can be generated using `--enable-debug' option. The difference between debug mode and normal mode is as follows:

Building local library
When ISIS is compiled, local library corresponding to the category is generated.

Usually, object files in the library is stored only in the finally generated ISIS library file. The library file must be generated for generating execution code for usual mode. If source code of the library is modified, the library file must be updated.

On the contrary, in the debug mode, a local library is generated with the common library. Linking the local library, the final ISIS library is generated. Or execution file can be generated before updating. This is advantageous for frequent update of source code in the library.

Modification of compile option
In the debugging mode, compile options `-Wall', `-ansi', `-pedantic-errors', `+w' and `-fullwarn' are added as possible.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.3 Testing of libraries

By executing make check, libraries can be checked. make check is supported with automake, and scripts marked TESTS in `Makefile.am' are sequentially applied, and reported whether it is normally finished.

For further detail report, make VERBOSE=yes check is useful. Identified test is only applied using make TESTS=foo.test check.

Test script is Bourne shell script. It is a program for executes the generated binary and checks its operation. The operation is checked by comparing the execution results for the standard output and standard error output with normal values read from a file. See section 11.5 Writing Test Scripts.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.4 Macros in acinclude.m4

The `acinclude.m4' defines the macro in `configure.ac'. The current macros are as follows:

CF_CHECK_VERSION(VERSION-FILE-NAME [, LT-VERSION-FILE-NAME])
The environment variables are read from files specified parameters. The package name is stored by the PACKAGE, version number is stored in VERSION, and revision number is stored in REVISION.

The format of version file is as follows. Lines other than the first line is ignored.

<package> version <version> [(<revision>)]

<version> is further divided into MAJOR-VERSION, MINOR-VERSION and MICRO-VERSION, and stored corresponding variables.

If the second parameter is specified, the version information of shared libraries is read from the file in the second parameter. The format of the shared version file is as follows. Lines other than the first line is ignored.

<interface-number>.<binary-number>

The shared library version LT_RELEASE, LT_CURRENT and LT_REVISION are calculated with version information, <interface-number>, and <binary-number>, and stored into each variable.

CF_CHECK_OPTION(PROGRAM-VARIABLE, FLAG-VARIABLE, OPTION)
This command judges whether it accepts the options. The first parameter specifies the command, the second for the result variables, and the third for option strings.

CF_CHECK_FPSETMASK
Checks whether fpsetmask function is available or not.

CF_CHECK_HTONS
Checks whether htons function or macro is available or not.

CF_CHECK_MATH_FUNC(NAME [, ARGS [, IF-FOUND [, UNLESS-FOUND]]])
Checks whether specified math library function is existing or not. The function name is specified in the first parameter, the parameters for its function is specified in the second parameter. If the third and forth parameters are specified, shell command is executed with the checking result.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.5 Writing Test Scripts

A test script is a shell script for executing generated binary and checks its operation. The operation result is checked by comparing the execution status, standard output and error output with normal values.

The simple example as follows:

 
#! /bin/sh

. $test_defs || exit 1

program=hello
answer='Hello, world.'

. $test_exec || exit 1

This script tests `hello'. The Hello, world. is shown in the standard output. No error output is obtained, and final status becomes 0, the test is assumed to be successful. In program, executing program name is specified, and the output result is specified in standard output answer.

program
Specifies the program name to be executed. If not specified, test script file name to the end except .test should be a program name.

args
Specifies the arguments of the program.

echo
Specifies the strings to be input to standard input.

stdin
Specified file is input to standard input. Specify either echo or stdin. If file name is auto, the tail .test of the test script file name is changed into .cin is used. If the specified file name + .gz or .uu or both files are existing, the file is extended and referred. For file name ignore, the check is not applied. The situation is similar in the following stdout and stderr.

answer
Specifies the strings to be output from standard output.

stdout
Specifies the file to be output from standard output. Specify either answer or stdout.

error
Specifies the strings to be output from standard error.

stderr
Specifies the file to be output from standard error. Specify either error or stderr.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Masaki WAKABAYASHI on September, 3 2003 using texi2html