diff --git a/generate_test.py b/generate_test.py index 3961536c4..4d9044fd6 100644 --- a/generate_test.py +++ b/generate_test.py @@ -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)) @@ -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) diff --git a/push.py b/push.py index f990c5c0b..d3b183930 100644 --- a/push.py +++ b/push.py @@ -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. @@ -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 @@ -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: @@ -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) diff --git a/templates/readme_template/README.md b/templates/readme_template/README.md index ec4475373..ea292ca28 100644 --- a/templates/readme_template/README.md +++ b/templates/readme_template/README.md @@ -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 %} @@ -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.