Logs for Automated tests

Mathieu Alorent malorent at echo.fr
Mon Oct 10 16:37:17 CEST 2011


On 06/10/2011 17:25, Mathieu Alorent wrote:
> Hi,
Hi all

> I've just implemented some Automated tests.
>
> the doc(1) say: "Test scripts are called via fai-do-scripts(1) and
> should append it's messages to $LOGDIR/test.log".
>
> But I've found that the logs are appended to $LOGDIR/shell.log

There seems to be inconsistency in the scripts...
If I quote the source code:

file: /usr/lib/fai/subroutines
[...]
task_tests() {

     if [ -d $FAI/tests ]; then
         fai-do-scripts $FAI/tests  # always returns 0 atm
         # check if any test failed
         if [ -f $LOGDIR/test.log ]; then
[...]

Fai use fai-do-scripts command and expect logs to be outputted in 
$LOGDIR/test.log (see the if statement)

In script fai-do-scripts I can see thinks like:
[...]

          *"POSIX shell script"*|*"executable shell script"*|*"/bash 
script"*|*"Bourne shell script"*|*"Bourne-Again shell script"*)
             echo "Executing   $shelldebug shell: $file"
             echo "=====   shell: $file   =====" >> $LOGDIR/shell.log 2>&1
             $shelldebug ./$file >> $LOGDIR/shell.log 2>&1
[...]

The output file is hard-coded depending on filetype. I don't see any 
reference to test.log

@FAI experts: what would be the best way to handle this?

* patch fai-do-scripts: add a new option to force output to a single logfile

* use the -L option of fai-do-scripts and output tests logs to an subdir 
(called for exemple 'test(s)')

> Does someone have the same problem as me?
>
> Bests
> Mât
>
> 1.
> http://fai-project.org/fai-guide/ar01s05.html#_anchor_id_itests_xreflabel_itests_automated_tests

Bests
Mât

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4187 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20111010/66497f44/attachment.bin>


More information about the linux-fai-devel mailing list