--- layout: fc_discuss_archives title: Message 7 from Frama-C-discuss on October 2011 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] using ptests



On 05/10/2011 15:45, DUPRAT Stephane wrote:
>
> 1?) using "EXECNOW LOG file cmd", full access path should be generated by command; right.
> But is there any env var to point to the result dir of the test ?

> And in the upper/upper dir, the cmd is incorrect due to path of generated log.txt
> $ ptests.byte tests/test1/hello.c
>
> in fact I'd like to lauch the test at the different levels
>

No, there is no such variable. ptests is meant to be executed from the 
toplevel directory of Frama-C or of a plugin, with a subdirectory named 
tests containing other subdirectories. Thus, EXECNOW should be LOG 
res.txt echo toto > tests/test1/result/res.txt

To be frank, ptests has never been thought as a general-purpose testing 
framework. It is only there to perform the non-regression tests of 
Frama-C (and some of its plug-ins). Thus, it must be launched in an 
environment similar to Frama-C sources.
By the way, if you want to launch ptests only on one suite or even on 
one test case, this is perfectly possible from the toplevel directory:
ptests.byte test1
ptests.byte tests/test1/hello.c

> 2?) using postprocessing tool
>
> Is it possible to postprocess outputs of the frama-c run with an extra program ?
> I've seen EXECNOW, but it is a preprocess.
> Perhaps FILER option ?
>

Yes, FILTER will be applied to the main command stdout and stderr. The 
command should read from stdin and output its result on stdout.

Hope this helps,
-- 
E tutto per oggi, a la prossima volta
Virgile