Skip to content
Snippets Groups Projects
Commit e5064a94 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[Ptests] updates the documentation

parent 7e8a9da6
No related branches found
No related tags found
No related merge requests found
...@@ -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}
......
...@@ -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:@ \
......
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