Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
e5064a94
Commit
e5064a94
authored
3 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[Ptests] updates the documentation
parent
7e8a9da6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/developer/advance.tex
+13
-1
13 additions, 1 deletion
doc/developer/advance.tex
ptests/ptests.ml
+6
-5
6 additions, 5 deletions
ptests/ptests.ml
with
19 additions
and
6 deletions
doc/developer/advance.tex
+
13
−
1
View file @
e5064a94
...
@@ -988,7 +988,7 @@ file, run it only once.
...
@@ -988,7 +988,7 @@ file, run it only once.
&
\textit
{
None
}
&
\textit
{
None
}
\\
\\
&
\texttt
{
FILTER
}
\nscodeidxdef
{
Test!Directive
}{
FILTER
}
&
\texttt
{
FILTER
}
\nscodeidxdef
{
Test!Directive
}{
FILTER
}
&
Command
used to filter results
&
Command
reading the standard input used to filter results. In such a command, the variable
\texttt
{
@PTEST
\_
ORACLE@
}
is set to the basename of the oracle.
&
\textit
{
None
}
&
\textit
{
None
}
\\
\\
&
\texttt
{
MODULE
}
\nscodeidxdef
{
Test!Directive
}{
MODULE
}
&
\texttt
{
MODULE
}
\nscodeidxdef
{
Test!Directive
}{
MODULE
}
...
@@ -1168,6 +1168,18 @@ or
...
@@ -1168,6 +1168,18 @@ or
the suite. This directive is only
the suite. This directive is only
usable in a
\texttt
{
test
\_
config
}
\codeidx
{
test
\_
config
}
usable in a
\texttt
{
test
\_
config
}
\codeidx
{
test
\_
config
}
configuration file.
configuration file.
\item
The
\texttt
{
FILTER
}
\nscodeidx
{
Test!Directive
}{
FILTER
}
command performs
a transformation on the test result files before the comparison from the
oracles.
The filter command read the result from the standard input and the oracle
will be compared from the standard output of that command.
In such a command, the
\texttt
{
@PTEST
\_
ORACLE@
}
variable is set to the
basename of the oracle.
That allows to perform a
\texttt
{
diff
}
command with the oracle of another
test configuration:
\begin{code}
FILTER: diff --new-file @PTEST
_
DIR@/oracle
_
configuration/@PTEST
_
ORACLE@
\end{code}
\end{itemize}
\end{itemize}
\begin{important}
\begin{important}
...
...
This diff is collapsed.
Click to expand it.
ptests/ptests.ml
+
6
−
5
View file @
e5064a94
...
@@ -325,22 +325,23 @@ let example_msg =
...
@@ -325,22 +325,23 @@ let example_msg =
STDOPT: #<extra> @[<v 0># Defines a sub-test and prepend the extra to the current option.@]@ \
STDOPT: #<extra> @[<v 0># Defines a sub-test and prepend the extra to the current option.@]@ \
EXIT: <number> @[<v 0># Defines the exit code required for the next sub-test commands.@]@ \
EXIT: <number> @[<v 0># Defines the exit code required for the next sub-test commands.@]@ \
FILTER: <cmd> @[<v 0># Performs a transformation on the test result files before the comparison from the oracles.@ \
FILTER: <cmd> @[<v 0># Performs a transformation on the test result files before the comparison from the oracles.@ \
# The oracle will be compared from the standard output of the command:
<cmd>
<test-output-file>.@ \
# The oracle will be compared from the standard output of the command:
cat
<test-output-file>
| <cmd>
.@ \
# Note: in such a command, the @@PTEST_ORACLE@@ variable is set to the basename of the oracle.@ \
# Note: in such a command, the @@PTEST_ORACLE@@ variable is set to the basename of the oracle.@ \
# That allows to perform a 'diff' command with the oracle of another test configuration:@ \
# That allows to perform a 'diff' command with the oracle of another test configuration:@ \
# FILTER: diff
.
/oracle_configuration/@@PTEST_ORACLE@@ @]@ \
# FILTER: diff
--new-file @@PTEST_DIR@@
/oracle_configuration/@@PTEST_ORACLE@@ @]@ \
TIMEOUT: <delay> @[<v 0># Set a timeout for all sub-test.@]@ \
TIMEOUT: <delay> @[<v 0># Set a timeout for all sub-test.@]@ \
NOFRAMAC: @[<v 0># Drops previous sub-test definitions and considers that there is no defined default sub-test.@]@ \
NOFRAMAC: @[<v 0># Drops previous sub-test definitions and considers that there is no defined default sub-test.@]@ \
GCC: @[<v 0># Deprecated.@]@ \
GCC: @[<v 0># Deprecated.@]@ \
MACRO: <name> <def> @[<v 0># set a definition to the variable @@<name>@@.@]@ \
MACRO: <name> <def> @[<v 0># set a definition to the variable @@<name>@@.@]@ \
@]@ \
@]@ \
@[<v 1>\
@[<v 1>\
Some variables can be used in test command:@ \
Some variables can be used in test command:@ \
@@PTEST_CONFIG@@ # Test configuration suffix.@ \
@@PTEST_FILE@@ # Substituted by the test filename.@ \
@@PTEST_DIR@@ # Dirname of the test file.@ \
@@PTEST_DIR@@ # Dirname of the test file.@ \
@@PTEST_FILE@@ # Substituted by the test filename.@ \
@@PTEST_NAME@@ # Basename of the test file.@ \
@@PTEST_NAME@@ # Basename of the test file.@ \
@@PTEST_NUMBER@@ # Test command number.@ \
@@PTEST_NUMBER@@ # Test command number.@ \
@@PTEST_CONFIG@@ # Test configuration suffix.@ \
@@PTEST_RESULT@@ # Shorthand alias to @@PTEST_DIR@@/result@@PTEST_CONFIG@@ (the result directory dedicated to the tested configuration).@ \
@@PTEST_ORACLE@@ # Basename of the current oracle file (variable only usable in FILTER directives).@ \
@@PTEST_ORACLE@@ # Basename of the current oracle file (variable only usable in FILTER directives).@ \
@[<v 1>\
@[<v 1>\
Examples:@ \
Examples:@ \
...
...
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