diff --git a/src/sections/items.tex b/src/sections/items.tex index b5a13e9..579a54b 100644 --- a/src/sections/items.tex +++ b/src/sections/items.tex @@ -33,6 +33,7 @@ \incode{jsonrpc} & JSON-RPC test item \\ \incode{let} & Defining variables \\ \incode{loop} & Container for repeating things \\ + \incode{parallel} & Container for running branches concurrently \\ \incode{plot} & Runtime plot utility \\ \incode{report} & Extract a report file \\ \incode{run} & Runs a new instance of \tum{testium} \\ @@ -326,6 +327,51 @@ end \end{columns} \end{frame} +\begin{frame}[fragile]{\incode{parallel} test item} +\begin{columns} + \column{0.55\textwidth} + \begin{itemize} + \item \incode{branches}: list of concurrent branches; each branch has its own \incode{steps} + \item \incode{sync} + \begin{itemize} + \item \incode{all} (default): wait for every branch + \item \incode{any}: stop the others as soon as one finishes + \end{itemize} + \item \incode{wait\_for} (per branch): poll a condition before running the branch's steps + \item Each branch runs in its own thread: + \begin{itemize} + \item Live output prefixed \incode{[]} + \item One report row per branch (clean, no interleaving) + \end{itemize} + \end{itemize} + \column{0.45\textwidth} + \begin{listing}[H] + \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml} +- parallel: + name: Read sensors + sync: all + branches: + - name: Temperature + steps: + - py_func: + name: read temp + file: sensors.py + func_name: read_temp + - name: Pressure + wait_for: + condition: <| "$(temp_ready)" == "1" |> + timeout: 5 + steps: + - py_func: + name: read pressure + file: sensors.py + func_name: read_pressure + \end{minted} + \caption{\incode{parallel} usage example} + \end{listing} + \end{columns} +\end{frame} + \begin{frame}{\incode{dialog\_x} test items} \begin{itemize} \item Dialogs pop-up a message box with a question, information or more diff --git a/testium_training.pdf b/testium_training.pdf index 5c43894..5d898b4 100644 Binary files a/testium_training.pdf and b/testium_training.pdf differ