Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
33110858
Commit
33110858
authored
1 year ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
test: add cram tests
parent
1e3c90cb
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/lv6/dune
+4
-1
4 additions, 1 deletion
bin/lv6/dune
bin/lv6/lv6.t
+130
-0
130 additions, 0 deletions
bin/lv6/lv6.t
dune-project
+2
-2
2 additions, 2 deletions
dune-project
test/Makefile
+16
-18
16 additions, 18 deletions
test/Makefile
with
152 additions
and
21 deletions
bin/lv6/dune
+
4
−
1
View file @
33110858
...
...
@@ -8,4 +8,7 @@
(section bin)
(package lustre-v6)
(files (main.exe as lv6))
)
)
(cram
(deps %{bin:lv6}))
This diff is collapsed.
Click to expand it.
bin/lv6/lv6.t
0 → 100644
+
130
−
0
View file @
33110858
Test
the
-
help
option
$
lv6
-
h
usage:
lv6
[
options
]
<
file
>
|
lv6
-
help
-
n
,
-
node
<
string
>
Set
the
main
node
(
all
items
are
compiled
if
unset
)
-
o
,
--
output
-
file
<
string
>
Set
the
output
file
name
-
dir
,
--
directory
<
string
>
Set
the
directory
into
which
output
files
are
generated
-
exec
Interpret
the
program
using
RIF
conventions
for
I
/
O
(
force
-
eei
)
-
2
c
,
--
to
-
c
Generate
C
code
-
cc
,
--
compile
-
generated
-
c
Try
to
compile
the
generated
C
files
(
force
-
2
c
)
-
2
c
-
exec
,
--
to
-
c
-
execute
Try
to
execute
the
generated
C
files
(
force
-
cc
)
.
-
rif
Behave
as
a
rif
input
file
(
meaningless
without
-
exec
)
-
et
,
--
expand
-
io
-
type
Expand
structured
types
of
the
main
node
(
impact
the
rif
output
only
)
.
Necessary
to
use
lurette
and
rdbg
in
presence
of
lutin
(
that
only
knows
about
basic
the
types
int
/bool/
real
)
-
ec
,
--
expanded
-
code
Generate
ec
programs
(
force
'
--expand-nodes --no-when-not --expand-enums --lustre-v4 --no-prefix
')
-
version
,
--
version
Print
the
current
version
and
exit
-
v
,
--
verbose
Set
the
verbose
level
to
1
-
vl
<
int
>
Set
the
verbose
level
-
h
,
-
help
,
--
help
Display
this
message
-
m, -more,
--
more
,
--
advanced
-
options
Show
more
options
-
dev
,
--
dev
-
options
Show
experimental
/
internal
options
$
lv6
-
more
usage:
lv6
[
options
]
<
file
>
|
lv6
-
help
-
ocaml
Generate
ocaml
glue
code
that
makes
it
possible
to
call
the
lv6
interpreter
from
ocaml
with
the
current
set
of
arguments
(
with
Lv6Run
.
make
)
--
when
-
on
-
ident
Invent
ident
names
so
that
when
only
operates
on
idents
(
to
be
able
to
translate
enums
into
ec
/
v4
)
--
no
-
when
-
not
Remove
'
when not
'
statements
(
for
ec
)
-
ei
,
--
expand
-
iterators
Expand
array
iterators
(
i
.
e
.
,
generate
iterator
-
free
code
)
-
ee
,
--
expand
-
enums
Translate
enums
using
extern
types
and
consts
-
eei
,
--
expand
-
enums
-
as
-
int
Translate
enums
into
integers
(
to
be
kind
with
data
plotters
)
-
esa
,
--
expand
-
structs
-
and
-
arrays
Expand
structures
and
arrays
(
force
'
-ei
'
and
'
-en
')
-
en
,
--
expand
-
nodes
Expand
all
node
calls
in
the
main
node
-
enc
,
--
expand
-
node
-
call
<
string
>
Expand
the
call
of
the
specified
node
(
can
be
used
for
several
nodes
)
-
oite
,
--
optimize
-
ite
Transform
if
/then/
else
into
merge
when
possible
-
lv4
,
--
lustre
-
v4
deprecated:
generate
Lustre
V4
code
(
force
'
-ei -ee -esa
')
-
rte
,
--
runtime
-
error
Generate
kind2
contracts
to
check
for
runtime
errors
(
force
'
-lv4
')
-
np
,
--
no
-
prefix
Do
not
prefix
variable
names
by
their
module
(
beware:
variable
names
may
clash
with
this
option
)
-
2
cdil
,
--
to
-
c
-
dont
-
inline
-
predef
Do
not
inline
predef
calls
when
generating
C
code
-
2
c
-
ext
,
--
2
c
-
include
-
ext
-
types
Always
include
<
module
>
_
<
node
>
_ext
.
h
in
<
module
>
_
<
node
>.
h
-
2
cil
,
--
2
c
-
inline
-
loop
Inline
loops
(
that
come
from
array
iterators
)
-
2
csf
,
--
2
c
-
several
-
files
Generate
one
.
c
and
one
.
h
file
per
node
-
2
cgc
,
--
2
c
-
global
-
ctx
Node
context
allocated
as
global
variable
(
no
"
new_ctx
"
method
)
-
dro
,
--
2
c
-
dro
Generate
a
.
dro
file
(
for
luciole
)
-
lic
,
--
gen
-
lic
Generate
lic
-
2
cns
,
--
2
c
-
no
-
switch
Use
if
-
then
-
else
instead
of
switches
when
generating
C
codes
--
precision
Number
of
digits
after
ther
dot
used
to
print
floats
in
-
exec
mode
-
dbg
,
--
debug
<
dbg_flag
>
Possible
dbg_flag
are:
eval
-
const
,
clock
-
check
,
woi
,
split
,
poly
,
noalias
,
oite
,
nwn
,
en
,
ei
,
enumasbool
,
esa
,
check
-
mem
,
kcg
,
C
,
ast
,
exec
,
deps
,
clock
-
check2
,
typing
,
lazyc
,
paranoid
,
profile
$
lv6
-
dev
usage:
lv6
[
options
]
<
file
>
|
lv6
-
help
-
2
smv
,
--
to
-
smv
Generate
smv
code
(
work
in
progress
)
-
knc
,
--
keep
-
nested
-
calls
Keep
nested
calls
(
use
with
care:
it
breaks
some
programs
with
some
options
combination
)
-
knpc
,
--
keep
-
nested
-
predef
-
calls
Keep
nested
calls
for
predefined
operators
(
use
with
care:
it
breaks
some
programs
with
some
options
combination
)
-
rnc
,
--
remove
-
nested
-
calls
Remove
nested
calls
-
eeb
,
--
expand
-
enums
-
as
-
bool
Translate
enums
into
boolean
arrays
(
to
be
kind
with
model
-
checkers
)
-
kcg
,
--
generate
-
scade
-
lustre
Generate
Lustre
code
that
is
compatible
with
the
lustre
of
scade
-
tlex
,
--
test
-
lexer
Test
the
lexical
analysis
-
2
cw7
,
--
2
c
-
wcet
Generate
a
main
file
for
computing
the
wcet
(
force
-
2
c
-
2
cgc
)
-
2
cmc
,
--
2
c
-
multi
-
core
Generate
a
yaml
file
required
for
multi
-
core
code
generation
-
2
cs
,
--
2
c
-
stack
Transmit
Soc
I
/
O
as
params
of
the
step
functions
(
force
-
2
c
)
-
2
ch
,
--
2
c
-
heap
Transmit
Soc
I
/
O
via
a
ctx
structure
in
the
heap
(
force
-
2
c
)
-
2
chs
,
--
2
c
-
heap
-
and
-
stack
Transmit
soc
memoryless
I
/
O
via
the
stack
,
and
the
heap
otherwise
(
force
-
2
c
)
--
schedule
-
simple
No
re
-
ordering
after
topological
sort
--
schedule
-
sort
Sort
wrt
guard
before
after
topological
sort
--
schedule
-
reorder
Re
-
order
Soc
.
gao
after
scheduling
to
increase
the
clock
factorisation
-
interface
Print
the
node
interface
--
keep
-
aliases
Do
not
perform
aliases
elimination
-
unit
Run
embedded
unit
tests
--
nonreg
-
test
Avoid
printing
full
path
error
msgs
to
ease
non
-
reg
test
decision
--
gen
-
autotest
Generate
a
Lutin
Stimulator
and
a
Lustre
oracle
to
compare
the
result
of
2
Lustre
compilers
This diff is collapsed.
Click to expand it.
dune-project
+
2
−
2
View file @
33110858
(lang dune 2.
0
)
(lang dune 2.
7
)
(cram enable)
;; to ease the ocamldebug-ing. Any drawbacks?
(wrapped_executables false)
This diff is collapsed.
Click to expand it.
test/Makefile
+
16
−
18
View file @
33110858
...
...
@@ -2,8 +2,8 @@
# dejagnu tcl tcllib valgrind
all
:
clean rest valgrind.res
test
:
clean qtest
rest
:
reftest lus2lic.time
test
:
clean
dunetest
qtest
rest
:
reftest lus2lic.time
jenkins
:
clean qtest rest
...
...
@@ -12,14 +12,15 @@ TEST_MACHINE=eval
# This fixes sporadic memory errors I get when running tests
OCAMLRUNPARAM
=
s
=
1M,i
=
32M,o
=
150
dunetest
:
dune runtest
copy_extern
:
cp
-f
extern_files/
*
.
testdir
=
$(
shell
pwd
)
remote-runtest
:
remote-runtest
:
# runtest --all --tool lus2lic --target_board=$(testdir)/board_$(TEST_MACHINE).exp || true
$(TEST_MACHINE)
"cd $(testdir) ; export OCAMLRUNPARAM=o=200 ; runtest --all --tool lus2lic"
||
true
cd
$(testdir)
...
...
@@ -30,8 +31,8 @@ SUM=lus2lic0.sum lus2lic1.sum lus2lic2.sum lus2lic3.sum lus2lic4.sum
lus2lic.sum
:
head
-n
-5
$(
SUM
)
|
sed
-e
's/[0-9][0-9][0-9][0-9][0-9]//'
|
sed
-e
's/[0-9][0-9][0-9][0-9]//'
>
lus2lic.sum
tail
-n
5
$(
SUM
)
>>
lus2lic.sum
echo
-n
"===============================
\n
# Total number of failures: "
>>
lus2lic.sum
cat
lus2lic
*
.log |
grep
"FAIL:"
|
grep
-v
"XFAIL"
|
wc
-l
>>
lus2lic.sum
echo
-n
"===============================
\n
# Total number of failures: "
>>
lus2lic.sum
cat
lus2lic
*
.log |
grep
"FAIL:"
|
grep
-v
"XFAIL"
|
wc
-l
>>
lus2lic.sum
.PHONY
:
lus2lic.diff lus2lic.time lus2lic.sum
lus2lic.diff
:
...
...
@@ -47,7 +48,7 @@ time:lus2lic.time
lus2lic.time
:
lus2lic.sum
grep
"testcase
\.
/lus2lic"
lus2lic
*
.log
>
lus2lic.time
echo
"* Ref time: "
>>
lus2lic.time
cat
lus2lic.ref_time
>>
lus2lic.time
||
true
cat
lus2lic.ref_time
>>
lus2lic.time
||
true
echo
"* Quick time (-j 4):"
>>
lus2lic.time
cat
lus2lic.quick_time
>>
lus2lic.time
||
true
cat
lus2lic.time
>>
lus2lic.sum
...
...
@@ -63,13 +64,13 @@ valgrind.res:
grep
-n
ERROR tmp1/
*
.log |
grep
-v
' 0 errors'
>
$@
;
[
!
-s
$@
]
# reftest isslower than qtest, but less sensible to the load of the machine (which is better wrt time measurements)
reftest
:
reftest
:
rm
-f
$(
LOG
)
$(
TEST_MACHINE
)
"cd
$(
testdir
)
; make tmpdirs"
time
-o
lus2lic.ref_time make
$(
LOG
)
make lus2lic.time
qtest
:
qtest
:
rm
-f
$(
LOG
)
$(
TEST_MACHINE
)
"cd
$(
testdir
)
; make tmpdirs"
time
-o
lus2lic.quick_time make
-j
4
$(
LOG
)
...
...
@@ -93,23 +94,23 @@ tmpdirs: ltmpdirs
cp
-f
--preserve
=
links
$(
testdir
)
/
*
tmp2/
||
true
test0
:
rmlus2lic0.log lus2lic0.log
rmlus2lic0.log
:
rmlus2lic0.log
:
rm
-f
lus2lic0.log
test1
:
rmlus2lic1.log lus2lic1.log
rmlus2lic1.log
:
rmlus2lic1.log
:
rm
-f
lus2lic1.log
test2
:
rmlus2lic2.log lus2lic2.log
rmlus2lic2.log
:
rmlus2lic2.log
:
rm
-f
lus2lic2.log
test3
:
rmlus2lic3.log lus2lic3.log
rmlus2lic3.log
:
rmlus2lic3.log
:
rm
-f
lus2lic3.log
test4
:
rmlus2lic4.log lus2lic4.log
rmlus2lic4.log
:
rmlus2lic4.log
:
rm
-f
lus2lic4.log
unexp
:
...
...
@@ -144,9 +145,6 @@ progression:
local_clean
:
lclean tmpdirs
clean
:
cd
$(
testdir
);
make local_clean
;
rm
-f
valgrind.res
lclean
:
lclean
:
rm
-f
*
.ec
*
.lus
*
.lut
*
.cov
*
.gp
*
.rif
*
.out
*
.cov
*
.c
*
.h
*
.log
*
.sum
*
time
rm
-rf
Data
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment