3 HOW TO USE THE DOC TEST FRAMEWORK
4 ---------------------------------
6 The test framework is driven by a Perl script. Run_Test.pm contains some
7 useful, miscellaneous functions. The main classes that control test runs
8 are TestTarget and Process, and the platform-specific derivations of these.
10 The test framework runs scripted tests, examines the output, and writes
11 results to an output file that's parsed for scoreboard generation. It's very
12 important to get the output; from ACE, it's test log files, for TAO, it's
13 stderr output from the test procedures. Either way, it has to get back to
14 somewhere the locally running script can process it.
16 By default, all test procedures run on the local host. It is possible to
17 redirect the execution to other machines. This is necessary for testing
18 environments such as VxWorks and LabVIEW RT, which do not support the
19 local execution of these build and testing scripts. Thus, the build is done
20 on a host system and executed on the target. For multi-component tests, such
21 as TAO server and client, the components can (and most often do) run on
22 different machines. For example, a test may run the server component on the
23 embedded target and the client component on the local build host.
25 To redirect execution of a test's component, you must do three things:
27 1. Assign a number to the component in the test script. By convention,
28 1 is the component that runs on a target. In TAO, this is generally
29 the server; in the case of ACE tests, it is the only part. Number 2
30 is, by convention, the TAO client, or the piece to run on the build
32 2. Set an environment variable, DOC_TEST_<component-number>. For example,
33 DOC_TEST_1, DOC_TEST_2. The value of the environment variable is a
35 3. Set environment variables for the configuration name. These environment
36 variables hold the information used to run the test component on the
37 configuration. The environment variables are named
38 <configuration-name>_<configuration-item>. Different types of
39 configurations may require different configuration items, depending on
40 their capabilities and needs. However, the following must be set:
41 <configuration-name>_OS: The OS type, e.g., vxworks or labview_rt.
42 If this is "local", the component runs on
43 the local host but with an alternate set
44 of settings, such as ACE_ROOT, TAO_ROOT.
45 <configuration-name>_IPNAME: The machine's IP hostname or address
46 <configuration-name>_ACE_ROOT: ACE_ROOT for the configuration's files
47 <configuration-name>_TAO_ROOT: TAO_ROOT for the configuration's files
48 <configuration-name>_TEST_ROOT: Root directory for target path
49 translation, when $TEST_ROOT is set,
50 indicating both are reachable from host.
51 <configuration-name>_TEST_FSROOT: Root directory for target node path,
52 translation, when $TEST_ROOT is set. Used
53 to translate to a different filesystem, when
54 not reachable from host.
55 <configuration-name>_EXE_SUBDIR: Subdirectory for the executable
56 <configuration-name>_PROCESS_START_WAIT_INTERVAL: Time waited for the
57 process to start. Default 15 seconds.
58 <configuration-name>_PROCESS_STOP_WAIT_INTERVAL: Time waited for the
59 process to stop. Default 10 seconds.
60 <configuration-name>_HOSTNAME: Hostname that has to be used
61 <configuration-name>_IBOOT: iBoot for this target
62 <configuration-name>_REBOOT_TIME: How long does it take to reboot
64 <configuration-name>_REBOOT: Do we need to reboot this target
65 <configuration-name>_STARTUP_COMMAND: Command to be executed after
66 target has been booted
67 <configuration-name>_TELNET_HOST: Host name where we have to connect
69 <configuration-name>_TELNET_PORT: Port number where we have to connect
72 If there is no DOC_TEST_<component-number> environment variable when the
73 component runs, that component is executed on the local machine. This is
74 the case for most builds.