All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface TET.libapi

public interface libapi

Variable Index

 o TET_FAIL
 o TET_NORESULT
 o TET_NOTINUSE
 o TET_PASS
 o TET_SV_NO
 o TET_SV_YES
 o TET_UNINITIATED
 o TET_UNRESOLVED
 o TET_UNSUPPORTED
 o TET_UNTESTED

Method Index

 o docleanup(ICManager)
Execute the cleanup method of a test case.
 o dostartup(ICManager)
Execute the startup method of a test case.
 o initialize(String, String[])
Initialize this TestSession with runtime specific parameters.
 o tcmstart(int)
Notify this TestSession of the number of invocable components.
 o tet_delete(int, String)
Cancel a test purpose.
 o tet_getblock()
Return the value of the block counter.
 o tet_getsysbyid(int)
Return the SystemEntry for a system.
 o tet_getvar(String)
Return the value of a configuration variable.
 o tet_infoline(String)
Print a line to the execution results file.
 o tet_kill(long, int)
Send a signal to a spawned process.
 o tet_minfoline(String[])
Print multiple lines to the execution results file.
 o tet_pname()
Return the name of test case being run.
 o tet_reason(int)
Return the reason for cancelling a test purpose.
 o tet_remgetlist()
Return a list of all other systems participating in the test.
 o tet_remgetsys()
Return the system id of the current system.
 o tet_remsync(long, int[], int, int, SyncMessage)
Synchronize with a remote system.
 o tet_remtime(int)
Return the time on a system.
 o tet_result(int)
Post a result for the current running test purpose.
 o tet_setblock()
Increment the block counter and reset the sequence counter.
 o tet_setcontext()
Initialize the current context and reset the block and sequence counters.
 o tet_spawn(String, String[], String[])
Spawn a process on the local host.
 o tet_thistest()
Return the test purpose id of the current running test.
 o tet_wait(long)
Wait for a process to terminate.
 o threadgroup()
Return the ThreadGroup for the current running test purpose.

Variables

 o TET_PASS
 public static final int TET_PASS
 o TET_FAIL
 public static final int TET_FAIL
 o TET_UNRESOLVED
 public static final int TET_UNRESOLVED
 o TET_NOTINUSE
 public static final int TET_NOTINUSE
 o TET_UNSUPPORTED
 public static final int TET_UNSUPPORTED
 o TET_UNTESTED
 public static final int TET_UNTESTED
 o TET_UNINITIATED
 public static final int TET_UNINITIATED
 o TET_NORESULT
 public static final int TET_NORESULT
 o TET_SV_NO
 public static final int TET_SV_NO
 o TET_SV_YES
 public static final int TET_SV_YES

Methods

 o initialize
 public abstract void initialize(String pname,
                                 String args[])
Initialize this TestSession with runtime specific parameters.

Parameters:
pname - the name of the test case
args - the command line arguments
 o tcmstart
 public abstract void tcmstart(int ic_count)
Notify this TestSession of the number of invocable components.

Parameters:
ic_count - the number of invocable components in the test case
 o dostartup
 public abstract void dostartup(ICManager tc)
Execute the startup method of a test case.

Parameters:
tc - the test case
 o docleanup
 public abstract void docleanup(ICManager tc)
Execute the cleanup method of a test case.

Parameters:
tc - the test case
 o tet_infoline
 public abstract void tet_infoline(String line)
Print a line to the execution results file.

Parameters:
line - the line to print
 o tet_minfoline
 public abstract void tet_minfoline(String lines[]) throws TetException
Print multiple lines to the execution results file.

Parameters:
lines - the lines to print
Throws: TetException
Raised when the underlying TET implementation was built using TET_INET.
 o tet_thistest
 public abstract int tet_thistest()
Return the test purpose id of the current running test. During execution of the startup and cleanup function, the test purpose id is set to zero.

 o tet_getvar
 public abstract String tet_getvar(String name)
Return the value of a configuration variable.

Parameters:
name - the name of the configuration variable.
 o tet_setcontext
 public abstract void tet_setcontext()
Initialize the current context and reset the block and sequence counters.

 o tet_setblock
 public abstract void tet_setblock()
Increment the block counter and reset the sequence counter.

 o tet_getblock
 public abstract int tet_getblock()
Return the value of the block counter.

 o tet_result
 public abstract void tet_result(int result)
Post a result for the current running test purpose.

 o tet_delete
 public abstract void tet_delete(int tp,
                                 String reason)
Cancel a test purpose.

Parameters:
tp - the id of the test purpose to cancel
reason - reason for cancelling the test purpose
 o tet_reason
 public abstract String tet_reason(int tp)
Return the reason for cancelling a test purpose.

Parameters:
tp - the id of the test purpose
Returns:
The reason for cancellation or null if the test purpose has not been cancelled.
 o tet_pname
 public abstract String tet_pname()
Return the name of test case being run.

Returns:
the name of the test case.
 o tet_remgetsys
 public abstract int tet_remgetsys() throws TetException
Return the system id of the current system.

Returns:
the system id
Throws: TetException
Raised when the underlying TET implementation was built using TET_INET.
 o tet_remgetlist
 public abstract int[] tet_remgetlist() throws TetException
Return a list of all other systems participating in the test.

Returns:
an array of the other system ids
Throws: TetException
Raised if the underlying TET was built in TET_LITE mode.
 o tet_getsysbyid
 public abstract SystemEntry tet_getsysbyid(int sysid) throws TetException
Return the SystemEntry for a system.

Parameters:
sysid - the id of the system
Returns:
the SystemEntry for the sys or null if the system id is not valid
Throws: TetException
Raised if the underlying TET was built in TET_LITE mode.
 o tet_remtime
 public abstract Date tet_remtime(int sysid) throws TetException
Return the time on a system.

Parameters:
sysid - the id of the system
Returns:
the time on the system
Throws: TetException
Raised if the underlying TET was built in TET_LITE mode.
 o tet_remsync
 public abstract void tet_remsync(long syncptno,
                                  int sysnames[],
                                  int waittime,
                                  int vote,
                                  SyncMessage msg) throws TetException
Synchronize with a remote system.

Parameters:
syncptno - the synchronization point
sysnames - ids of systems with which to synchronize
waittime - timeout in seconds
vote - synchronization vote (either TET_SV_YES or TET_SV_NO)
msg - message to pass or object into which to receive a synchronization message
Throws: TetException
thrown if the C-API function returns an error.
 o tet_spawn
 public abstract long tet_spawn(String file,
                                String argv[],
                                String envp[]) throws TetException
Spawn a process on the local host.

Parameters:
file - name of the program to spawn
argv - argument list to pass to new process
envp - environment definitions for new process
Returns:
the pid of the new process
Throws: TetException
throw if the C-API function returns an error.
 o tet_wait
 public abstract int tet_wait(long pid) throws TetException
Wait for a process to terminate.

Parameters:
pid - pid of process to wait for (from tet_spawn).
Returns:
Exit status of process.
Throws: TetException
throw if the C-API function returns an error.
 o tet_kill
 public abstract int tet_kill(long pid,
                              int sig) throws TetException
Send a signal to a spawned process.

Parameters:
pid - pid of process to signal (from tet_spawn).
sig - numeric signal to send.
Returns:
value returned from internal kill() call.
Throws: TetException
throw if the C-API function returns an error.
 o threadgroup
 public abstract ThreadGroup threadgroup()
Return the ThreadGroup for the current running test purpose.

Returns:
the ThreadGroup in which the current test is running.

All Packages  Class Hierarchy  This Package  Previous  Next  Index