Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions generate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def generate_test_structure(test_name = None, base_image = None,
for tmp_file in tmp_files:
with open(os.path.join('templates','test_template', tmp_file)) as f:
tmp = Template(f.read())
renders[tmp_file.replace('.jinja', '')] = tmp.render(locals())
renders[tmp_file.replace('.jinja', '')] = tmp.render(
tutorial_path=tutorial_path,
input_volumes=input_volumes,
zipped_input=zipped_input)

otp_dir = os.path.join('tests', "TestCompose_{test}.{base}".format(test =
test_name, base = base_image))
Expand Down Expand Up @@ -82,7 +85,7 @@ def ask_user_input():
test_name_validator),
'base_image': InputHandler("Enter new base image for a test. Syntax: BaseImage.feature1.feature2 (e.g 'Ubuntu1604.home')\n",\
base_image_validator),
'participants': InputHandler("Enter participants for a test. Syntax: participant1, particticipant2 (e.g 'su2-adapter, calculix-adapter')\n",\
'participants': InputHandler("Enter participants for a test. Syntax: participant1, participant2 (e.g 'su2-adapter, calculix-adapter')\n",\
participants_validator),
'tutorial_path': InputHandler("Enter tutorials directory which is represented by this test. Syntax: (e.g 'FSI/flap_perp/OpenFOAM-deal.II/')\n",\
tutorial_dir_validator)
Expand Down
18 changes: 14 additions & 4 deletions push.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
### WIP ###
Script for pushing travis internal files to a github repository.

This script pushes to: https://github.com/precice/precice_st_output.
Expand Down Expand Up @@ -56,7 +55,7 @@ def get_travis_job_log(job_id, tail = 0):

def add_readme(
job_path,
output=False,
output_enabled=False,
output_missing=False,
logs_missing=False,
message=None
Expand All @@ -79,7 +78,18 @@ def add_readme(

with open(os.path.join('templates','readme_template', 'README.md')) as f:
tmp = Template(f.read())
readme_rendered = tmp.render(locals())
readme_rendered = tmp.render(
job_name=job_name,
job_success=job_success,
branch=branch,
pr_branch=pr_branch,
is_pr=is_pr,
job_link=job_link,
output_enabled=output_enabled,
output_missing=output_missing,
additional_info=additional_info,
logs_missing=logs_missing,
message=message)

with chdir(job_path):
with open("README.md", "w") as f:
Expand Down Expand Up @@ -171,7 +181,7 @@ def add_readme(
# create README
add_readme(
job_path,
output=args.output,
output_enabled=args.output,
output_missing=output_missing,
logs_missing=logs_missing)

Expand Down
4 changes: 2 additions & 2 deletions templates/readme_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This build was triggered by a push to `{{branch}}`.

This job folder contains
- A `Logs` directory containing log files from TravisCI and the participant containers
{% if output %}
{% if output_enabled %}
- An `Output` directory containing result files generated during the running of the test
{% endif %}

Expand All @@ -27,7 +27,7 @@ This job folder contains
{% if additional_info %}
**Additional job information:**

{% if output %}
{% if output_enabled %}
- Output was enabled for this job.
{% if not output_missing %}
- Result files have been stored in the `Output` folder.
Expand Down