Information
|
13.
Problems when running the perl demo
Question
I am running Distributed TETware on a UNIX system.
When I run the perl demo, no test case output appears in the journal
file.
For example:
70||"starting scenario"
110|0 /ts/tc1 10:59:49|Build Start, scenario ref 2-0
130|0 0 10:59:50|Build End, scenario ref 2-0
10|1 /ts/tc1 10:59:50|TC Start, scenario ref 2-0
80|1 255 10:59:54|TC End, scenario ref 2-0
300|2 /ts/tc1 10:59:54|Clean Start, scenario ref 2-0
320|2 0 10:59:56|Clean End, scenario ref 2-0
110|3 /ts/tc2 10:59:56|Build Start, scenario ref 3-0
130|3 0 10:59:57|Build End, scenario ref 3-0
10|4 /ts/tc2 10:59:57|TC Start, scenario ref 3-0
80|4 255 11:00:00|TC End, scenario ref 3-0
300|5 /ts/tc2 11:00:01|Clean Start, scenario ref 3-0
320|5 0 11:00:02|Clean End, scenario ref 3-0
70||"next is the last test case"
110|6 /ts/tc3 11:00:02|Build Start, scenario ref 5-0
130|6 0 11:00:03|Build End, scenario ref 5-0
10|7 /ts/tc3 11:00:03|TC Start, scenario ref 5-0
80|7 255 11:00:07|TC End, scenario ref 5-0
300|8 /ts/tc3 11:00:07|Clean Start, scenario ref 5-0
320|8 0 11:00:08|Clean End, scenario ref 5-0
70||"done"
900|11:00:08|TCC End
The following errors appear in the
/tmp/tccdlog
file:
tccd (25135) 29 Sep 10:59:51 (tcfexec.c, 205): \
can't exec /export/home0/tet/perldemo/tet_tmp_dir/25131a/tc1: \
No such file or directory
tccd (25143) 29 Sep 10:59:57 (tcfexec.c, 205): \
can't exec /export/home0/tet/perldemo/tet_tmp_dir/25131a/tc2: \
No such file or directory
tccd (25154) 29 Sep 11:00:04 (tcfexec.c, 205): \
can't exec /export/home0/tet/perldemo/tet_tmp_dir/25131a/tc3: \
No such file or directory
There is nothing in
tet_tmp_dir .
Is there something that I need to add in the setup?
Answer
The perl demo does not have a setting for
TET_EXEC_IN_PLACE
in the execute mode configuration file
tetexec.cfg .
When
TET_EXEC_IN_PLACE
is undefined, its default value is
False .
When
TET_EXEC_IN_PLACE
is false,
tcc
copies the contents of the test
case directory to a temporary directory below
tet_tmp_dir
and executes the test case from there.
The temporary directory is removed when execution finishes.
This is why you won't see anything below
tet_tmp_dir
after
tcc
exits.
You will notice that, in the journal, the exit status in each Test Case
End line is 255.
This shows that the test case could not be executed and corresponds to
the ``can't exec'' messages in the
/tmp/tccdlog
file.
Here are some possible reasons why the test cases could not be
executed:
-
Problem
The test cases are missing from the test case source
directory, so don't get copied to the temporary directory before
execution.
Thus the exec fails.
Solution
Check that the test cases
tc1 ,
tc2
and
tc3
exist in
$TET_ROOT/contrib/demo/ts .
If they are missing, install them from the
contrib
distribution.
-
Problem
Each test case in the perl demo must be interpreted by
perl .
In the demo this is achieved by the line
#!/usr/bin/perl
at the top of each test case file.
If
perl
is not installed in
/usr/bin
on your system, the symptoms will be the same as if the test cases are
missing.
Solution
Check that the file
/usr/bin/perl
exists on your system (and is
executable).
If it doesn't, you can do
one
of the following (the most
recommended is first).
Either:
-
Install a symlink named
/usr/bin/perl
which points to
the location of the perl executable on your system; or:
-
Set
TET_EXEC_TOOL
in
tetexec.cfg
to the location of
perl
on your system.
For example, if
perl
lives in
/usr/local/bin
on your system, you would say:
TET_EXEC_TOOL=/usr/local/bin/perl
or:
-
Change the
#!
line in every test case to refer to the location of
perl
on your system.
Needless to say, you must have
perl
installed somewhere on your
system in order to have any chance of running the perl demo!
Win32 systems
A Win32 system does not interpret
#!
in a script file.
Instead, the o/s uses the file name suffix indicate how a file should be
executed.
On a Win32 system the TETware execution subsystem understands that a
file with a
.pl
suffix should be interpreted by
perl .
In order for this to work it is necessary for
the directory containing
perl.exe
to be included in the value of the
PATH
environment variable.
See also
-
"Execute mode processing''
and "Configuration variables which modify TETware's operation''
in the TETware Programmers Guide.
-
Users of Win32 systems should check out the section entitled ``Executable
files'' in Appendix H of the TETware User Guide.
|