Skip to content

Commit

Permalink
Add test for jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Jun 17, 2024
1 parent ce77ddb commit 5c26763
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
1 change: 1 addition & 0 deletions integration/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ compare timeout $python
compare timeout-overwrite $python
compare event $python
compare math $python
compare jinja $python
try integration/cdf.npf $python "--config n_runs=20"
try integration/heatmap.npf $python
try tests/tcp/01-iperf.npf $python "--variables TIME=1"
Expand Down
62 changes: 62 additions & 0 deletions integration/jinja.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Starting tests
Executing test jinja.npf
Executing init scripts...
[0] RESULT 1
PARALLEL = 4 [run 1/3 for test 1/1]
[0] RESULT-R 0
[0] RESULT-R 1
[0] RESULT-R 2
[0] RESULT-R 3
[0]
[0] echo "RESULT-F 0"
[0]
[0] echo "RESULT-F 2"
[0]
[0] echo "RESULT-F 4"
[0]
[0] echo "RESULT-F 6"
[0]
local RESULT {{1}}
Result for R is 0 !
Result for F is 0 !
PARALLEL = 4 [run 2/3 for test 1/1]
[0] RESULT-R 0
[0] RESULT-R 1
[0] RESULT-R 2
[0] RESULT-R 3
[0]
[0] echo "RESULT-F 0"
[0]
[0] echo "RESULT-F 2"
[0]
[0] echo "RESULT-F 4"
[0]
[0] echo "RESULT-F 6"
[0]
local RESULT {{1}}
Result for R is 0 !
Result for F is 0 !
PARALLEL = 4 [run 3/3 for test 1/1]
[0] RESULT-R 0
[0] RESULT-R 1
[0] RESULT-R 2
[0] RESULT-R 3
[0]
[0] echo "RESULT-F 0"
[0]
[0] echo "RESULT-F 2"
[0]
[0] echo "RESULT-F 4"
[0]
[0] echo "RESULT-F 6"
[0]
local RESULT {{1}}
Result for R is 0 !
Result for F is 0 !
F: [6.0, 6.0, 6.0], R: [3.0, 3.0, 3.0]
INFO: The label for a serie is 'Local' which is a default name when no serie is passed. Use a command like npf-run.py 'local:My Label' --test ... to set the label.
INFO: Legend not shown as there is only one serie with a default name (local, version). Set --config graph_legend=1 to force printing a legend. See the documentation at https://npf.readthedocs.io/en/latest/graph.html to see how to change the legend.
Graph of test written to results/local/local/jinja-F.pdf
INFO: The label for a serie is 'Local' which is a default name when no serie is passed. Use a command like npf-run.py 'local:My Label' --test ... to set the label.
INFO: Legend not shown as there is only one serie with a default name (local, version). Set --config graph_legend=1 to force printing a legend. See the documentation at https://npf.readthedocs.io/en/latest/graph.html to see how to change the legend.
Graph of test written to results/local/local/jinja-R.pdf
1 change: 0 additions & 1 deletion npf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,6 @@ def execute(self, build, run, v, n_runs=1, n_retry=0, allowed_types=SectionScrip
"default_role_map"))

if script.jinja:
print("temp")
from jinja2 import Environment, BaseLoader
env = Environment(loader=BaseLoader)
template = env.from_string(param.commands)
Expand Down

0 comments on commit 5c26763

Please sign in to comment.