Skip to content

Commit

Permalink
make autopep happy and trigger wf once :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Seitz committed Nov 28, 2023
1 parent c0207d1 commit bcece43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/generate_reference_results_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
- 'WARNING'
- 'ERROR'
- 'CRITICAL'
push:
branches:
- 'add-wf-reference-results'



jobs:
generate_reference_results_manual:
Expand Down
18 changes: 8 additions & 10 deletions tools/tests/generate_reference_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import time



def create_tar_gz(source_folder: Path, output_filename: Path):
with tarfile.open(output_filename, "w:gz") as tar:
tar.add(source_folder, arcname=output_filename.name.replace(".tar.gz", ""))
Expand All @@ -31,20 +30,20 @@ def command_is_avail(command: str):
except FileNotFoundError:
return False

return rc==0
uname_info="uname not available on the machine the systemtests were executed."
lscpu_info="lscpu not available on the machine the systemtests were executed."
if(command_is_avail("uname")):
return rc == 0
uname_info = "uname not available on the machine the systemtests were executed."
lscpu_info = "lscpu not available on the machine the systemtests were executed."
if (command_is_avail("uname")):
result = subprocess.run(["uname", "-a"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if result.returncode==0:
if result.returncode == 0:
uname_info = result.stdout

if(command_is_avail("lscpu")):
if (command_is_avail("lscpu")):
result = subprocess.run(["lscpu"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if result.returncode==0:
if result.returncode == 0:
lscpu_info = result.stdout

return (uname_info,lscpu_info)
return (uname_info, lscpu_info)


def render_reference_results_info(
Expand All @@ -70,7 +69,6 @@ def sha256sum(filename):
'lscpu': lscpu,
}


jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR))
template = jinja_env.get_template("reference_results.metadata.template")
return template.render(render_dict)
Expand Down

0 comments on commit bcece43

Please sign in to comment.