Skip to content
Snippets Groups Projects
Commit 40ae6ba6 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

nonreg tests: remove some more spurious test failures (42-> 26)

parent e49023dd
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 87 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 101 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 76 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 116 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 44 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 73 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 56 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 81 seconds
* Ref time:
0.11user 0.07system 3:54.03elapsed 0%CPU (0avgtext+0avgdata 2460maxresident)k
0inputs+0outputs (0major+12495minor)pagefaults 0swaps
0.10user 0.09system 4:17.16elapsed 0%CPU (0avgtext+0avgdata 2472maxresident)k
0inputs+0outputs (0major+12546minor)pagefaults 0swaps
* Quick time (-j 4):
0.08user 0.04system 1:57.17elapsed 0%CPU (0avgtext+0avgdata 2460maxresident)k
0inputs+0outputs (0major+12505minor)pagefaults 0swaps
......@@ -7,18 +7,18 @@ returns
p,u : int;
q,r: int);
var
c': bool when b;
d': bool when c';
p',u' : int when b;
q',r': int when c' ;
c1: bool when b;
d1: bool when c1;
p1,u1 : int when b;
q1,r1: int when c1 ;
let
m,c',d',p',u',q',r'= X6_clk(n,b);
c = current(c');
d = current(current(d'));
p = current(p');
u = current(u');
q = current(current(q'));
r = current(current(r'));
m,c1,d1,p1,u1,q1,r1= X6_clk(n,true->b);
c = current(c1);
d = current(current(d1));
p = current(p1);
u = current(u1);
q = current(current(q1));
r = current(current(r1));
tel
......@@ -30,10 +30,10 @@ returns
p,u : int when b;
q,r: int when c);
let
c = (p>=(0 when b)) ;
c = true->(p>=(0 when b)) ;
p = n when b;
q = p when c;
d = q <=((10 when b) when c);
d = true-> q <=((10 when b) when c);
r = current(q when d);
u = current(r);
m = current(u);
......
-- nonreg: --expand-nodes
node up(in: int) returns (out: int);
let
out = pre(in) + 1 ;
......
-- nonreg: --expand-nodes
node up(in: int) returns (out: int);
let
out = pre(in) + 1 ;
......
-- nonreg: --expand-nodes
type pendule;
const T=0.1; L=2.0; G=10.0;
......
type
complexe = {x: real; y: real};
cdouble = {x: complexe; y: complexe};
......
-- nonreg: --expand-nodes
node speedcontrol(c:bool;) returns (counter:int);
let
counter=(0)->f(counter);
......
# Time-stamp: <modified the 26/08/2014 (at 10:00) by Erwan Jahier>
# Time-stamp: <modified the 27/08/2014 (at 10:45) by Erwan Jahier>
#
# (nonreg-)test harness main file
......@@ -157,7 +157,7 @@ proc do_ecexe_vs_exec {f} {
return 0
}
proc do_2c_vs_exec {f} {
proc do_2c {f} {
if {
[does_not_contain_string "$f" "extern"] &&
[does_not_contain_string "$f" "package"]
......@@ -191,6 +191,16 @@ proc get_next_free_port {port} {
return $port
}
# get the option (to pass to lus2lic) at the first line of the lustre file
proc read_opt {f} {
set oc [open $f]
set line [gets $oc]
set res ""
if { [string range $line 0 9] == "-- nonreg:" } {
set res [string range $line 10 end]
}
return $res
}
proc nonreg_exec_and_2c {files tmp} {
global lus2lic
......@@ -205,16 +215,17 @@ proc nonreg_exec_and_2c {files tmp} {
set f_no_ext [file rootname $f]
set bf [file tail $f_no_ext]
set f [file tail $f]
set opt [read_opt $f]
set node [file tail $f_no_ext]
eval spawn "$lus2lic -o $bf.lic $f"
wait -i $spawn_id
if { [nonemptyfile "$bf.lic"] } {
set id1 [should_work "Generate c code " "$lus2lic" "-2c $f -n $node"]
set id1 [should_work "Generate c code " "$lus2lic $opt" "-2c $f -n $node"]
wait -i $id1
if { [nonemptyfile "${node}_${node}.c"] } {
if { [nonemptyfile "${node}_${node}.c"] && [do_2c "$f"] } {
if { [nonemptyfile "${node}_${node}_ext.c"] } {
set id2 [should_work "Check that the generated C code compiles " \
"gcc -o ${node}.exec ${node}_${node}.c ${node}_${node}_ext.c ${node}_${node}_loop.c"]
......@@ -226,9 +237,9 @@ proc nonreg_exec_and_2c {files tmp} {
catch { exp_close -i $id2 }
catch { exp_wait -i $id2 } output
if { [nonemptyfile "${node}.exec"] && [do_2c_vs_exec "$f"] } {
if { [nonemptyfile "${node}.exec"] && [do_2c "$f"] } {
set id3 [should_work "Try to compare lus2lic -exec and -2c" \
"$compare_exec_and_2c" "$f" "$port"]
"$compare_exec_and_2c" "$f" "$port" "$opt"]
catch { exp_close -i $id3 }
catch { exp_wait -i $id3 } output
}
......@@ -240,6 +251,7 @@ proc nonreg_exec_and_2c {files tmp} {
return 0
}
proc nonreg_exec_and_ecexe {files tmp} {
global lus2lic
global ec2c
......@@ -254,6 +266,7 @@ proc nonreg_exec_and_ecexe {files tmp} {
set f_no_ext [file rootname $f]
set bf [file tail $f_no_ext]
set f [file tail $f]
set opt [read_opt $f]
set node [file tail $f_no_ext]
set id1 [should_work "without any option" "$lus2lic" "-o $bf.lic $f"]
......@@ -271,7 +284,7 @@ proc nonreg_exec_and_ecexe {files tmp} {
if { [nonemptyfile "$bf.c"] && [do_ecexe_vs_exec "$f"] } {
set id4 [should_work "Try to compare lus2lic -exec and ecexe" \
"$test_lus2lic_no_node" "$f" "$port"]
"$test_lus2lic_no_node" "$f" "$opt"]
catch { exp_close -i $id4 }
catch { exp_wait -i $id4 } output
}
......
#+TODO: TODO(!) STARTED(!) WAITING(!) | DONE(d!) CANCELED(c)
#+CATEGORY: lv6
* Failures spotted by non reg tests (42)
* Failures spotted by non reg tests (26)
** TODO Front-end error (4)
** TODO Front-end error (2)
- State "TODO" from "" [2014-08-26 Tue 10:20]
cat lus2lic*.log | grep "FAIL: without any option:" | sed s/'FAIL: without any option:'/-/
......@@ -15,34 +15,34 @@
clock error.
** TODO soc2c (12+5)
** TODO soc2c (7)
- State "TODO" from "" [2014-08-26 Tue 10:20]
cat lus2lic*.log | grep "FAIL: Generate c code :" | sed s/'FAIL: Generate c code :'/-/
1) ./lus2lic {-2c activation2.lus -n activation2}
2) ./lus2lic {-2c activation1.lus -n activation1}
3) ./lus2lic {-2c asservi.lus -n asservi}
4) ./lus2lic {-2c cond01.lus -n cond01}
5) ./lus2lic {-2c filter.lus -n filter}
6) ./lus2lic {-2c left.lus -n left}
7) ./lus2lic {-2c morel3.lus -n morel3}
8) ./lus2lic {-2c morel4.lus -n morel4}
9) ./lus2lic {-2c morel.lus -n morel}
10) ./lus2lic {-2c morel2.lus -n morel2}
11) ./lus2lic {-2c modes3x2-simu.lus -n modes3x2-simu}
12) ./lus2lic {-2c speedcontrol.lus -n speedcontrol}
cat lus2lic*.log | grep "FAIL: Check that the generated C code compiles" | sed s/'FAIL: Check that the generated C code compiles :'/-/
1. gcc -o arbitre.exec arbitre_arbitre.c arbitre_arbitre_ext.c arbitre_arbitre_loop.c
2. gcc -o decl.exec decl_decl.c decl_decl_ext.c decl_decl_loop.c
3. gcc -o import1.exec import1_import1.c import1_import1_ext.c import1_import1_loop.c
4. gcc -o simple.exec simple_simple.c simple_simple_loop.c
5. gcc -o when_tuple.exec when_tuple_when_tuple.c when_tuple_when_tuple_ext.c when_tuple_when_tuple_l
** TODO ec2c (5)
1) ./lus2lic -2c should_work/cond01.lus -n cond01
the type of + in condact<<+,0>> is not inferred
2) ./lus2lic -2c should_work/filter.lus -n filter
a false cycle is detected
3) ./lus2lic -2c should_work/left.lus -n left
slices in left part
4) ./lus2lic -2c should_work/morel3.lus -n morel3
slices in left part
5) ./lus2lic -2c should_work/morel4.lus -n morel4
slices in left part
6) ./lus2lic -2c should_work/morel.lus -n morel
slices in left part
7) ./lus2lic -2c should_work/morel2.lus -n morel2
slices in left part
** TODO ec2c (4)
- State "TODO" from "" [2014-08-26 Tue 10:29]
cat lus2lic*.log | grep "FAIL: Try ec2c on the result:" | sed s/'FAIL: Try ec2c on the result:'/-/
......@@ -50,29 +50,25 @@ cat lus2lic*.log | grep "FAIL: Generate c code :" | sed s/'FAIL: Generate c cod
1. ./myec2c {-o array_concat.c array_concat.ec}
2. ./myec2c {-o modes3x2_v4.c modes3x2_v4.ec}
3. ./myec2c {-o modes3x2_v3.c modes3x2_v3.ec}
4. ./myec2c {-o modes3x2-simu.c modes3x2-simu.ec}
5. ./myec2c {-o test_merge.c test_merge.ec}
4. ./myec2c {-o test_merge.c test_merge.ec}
** TODO Divergences -exec et ecexe (13)
** TODO Divergences -exec et ecexe (10)
- State "TODO" from "" [2014-07-11 Fri 16:54]
grep "FAIL:" lus2lic*.log | grep "exec" | grep "ecexe" | sed s/'FAIL: Try to compare lus2lic -exec and ecexe:'/-/
1. ../utils/test_lus2lic_no_node should_work/Gyroscope2.lus
1) ../utils/test_lus2lic_no_node should_work/Gyroscope2.lus
-> ecexe : "#ERROR: Output takes on nil"
2. ../utils/test_lus2lic_no_node should_work/test_node_expand2.lus
3. ../utils/test_lus2lic_no_node should_work/test_node_expand.lus
4. ../utils/test_lus2lic_no_node should_work/modes3x2_v2.lus
5. ../utils/test_lus2lic_no_node should_work/filter.lus
6. ../utils/test_lus2lic_no_node should_work/multipar.lus
7. ../utils/test_lus2lic_no_node should_work/activation2.lus
8. ../utils/test_lus2lic_no_node should_work/bob.lus
9. ../utils/test_lus2lic_no_node should_work/test_condact.lus
10. ../utils/test_lus2lic_no_node should_work/activation1.lus
11. ../utils/test_lus2lic_no_node should_work/Gyroscope.lus
12. ../utils/test_lus2lic_no_node should_work/cond01.lus
13. ../utils/test_lus2lic_no_node should_work/speedcontrol.lus
2) ../utils/test_lus2lic_no_node should_work/test_node_expand2.lus
3) ../utils/test_lus2lic_no_node should_work/test_node_expand.lus
4) ../utils/test_lus2lic_no_node should_work/modes3x2_v2.lus
5) ../utils/test_lus2lic_no_node should_work/filter.lus
6) ../utils/test_lus2lic_no_node should_work/multipar.lus
7) ../utils/test_lus2lic_no_node should_work/bob.lus
8) ../utils/test_lus2lic_no_node should_work/test_condact.lus
9) ../utils/test_lus2lic_no_node should_work/Gyroscope.lus
10) ../utils/test_lus2lic_no_node should_work/cond01.lus
** TODO divergence -exec et -2c (3)
- State "TODO" from "" [2014-07-11 Fri 12:02]
......@@ -97,6 +93,12 @@ chez Cedric Pasteur qui a une implementation pour optimiser la maj
des tableaux
http://www.di.ens.fr/~pouzet/bib/lctes12.pdf
** TODO lic2c : Ca plante si un identificateur lustre comporte un "'"
bin oui, ca n'est pas legal en C. Du coup je fais quoi ?
Je rejete ?
** TODO lic2c : Ca plante si un identificateur lustre se nomme double...
- State "TODO" from "" [2014-06-13 Fri 16:59]
** TODO lic2c : types externes utilisés en I/O du main pas supportés
......
......@@ -6,6 +6,7 @@
lustre_file=$1
PORT=$2
OPT=$3
node=`basename $lustre_file .lus`
_oracle=_"$node"_oracle.lus
......@@ -19,7 +20,7 @@ env=_"$node"_env.lut
set -x verbose #echo on
if
./lus2lic $lustre_file -n $node --gen-autotest -np;
./lus2lic $OPT $lustre_file -n $node --gen-autotest -np;
then
echo "lus2lic --gen-autotest done"
else
......@@ -32,7 +33,7 @@ cat $lustre_file >> $_oracle;
if
./lus2lic $lustre_file -n $node -2c -cc -o $node.exec;
./lus2lic $OPT $lustre_file -n $node -2c -cc -o $node.exec;
then
echo "lus2lic -2c done"
......@@ -49,7 +50,7 @@ if
./lurettetop -p 6 -seed 42 \
-rp "sut:socket:127.0.0.1:$PORT" \
-rp "env:lutin:$env" \
-rp "oracle:v6:$_oracle:$oracle" \
-rp "oracle:v6:$_oracle:$oracle:$OPT" \
-go -l 10 -ns2c --stop-on-oracle-error;
then
echo "Comparison of lus2lic -2c and lus2lic -exec with lurette on $lustre_file: ok"
......
......@@ -5,6 +5,7 @@
# lus2lic -exec
lustre_file=$1
OPT=$2
node=`basename $lustre_file .lus`
_oracle=_"$node"_oracle.lus
oracle="$node"_oracle
......@@ -17,7 +18,7 @@ env=_"$node"_env.lut
set -x verbose #echo on
if
./lus2lic $lustre_file -n $node --gen-autotest -np;
./lus2lic $OPT $lustre_file -n $node --gen-autotest -np;
then
echo "lus2lic --gen-autotest done"
else
......@@ -61,7 +62,7 @@ if
./lurettetop -p 6 -seed 42 \
-rp "sut:ec:$ec:$lv4_node" \
-rp "env:lutin:$env" \
-rp "oracle:v6:$_oracle:$oracle" \
-rp "oracle:v6:$_oracle:$oracle:$OPT" \
-go -l 10 -ns2c --stop-on-oracle-error;
then
echo "lurettetop ok"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment