diff --git a/integtest/disabled_output_test.py b/integtest/disabled_output_test.py index 41a3324..5553b75 100644 --- a/integtest/disabled_output_test.py +++ b/integtest/disabled_output_test.py @@ -167,14 +167,16 @@ def test_nanorc_success(run_nanorc): + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_nanorc0\].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/hdf5_compression_test.py b/integtest/hdf5_compression_test.py index 0ba5857..884ea9c 100644 --- a/integtest/hdf5_compression_test.py +++ b/integtest/hdf5_compression_test.py @@ -1,7 +1,6 @@ import pytest import os import re -import copy import urllib.request import integrationtest.data_file_checks as data_file_checks @@ -254,14 +253,16 @@ def test_nanorc_success(run_nanorc): resval_summary_string = resval.get_insufficient_resources_summary() pytest.skip(f"{resval_summary_string}") + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_nanorc0\].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/insufficient_disk_space_test.py b/integtest/insufficient_disk_space_test.py index a444881..3498bf4 100644 --- a/integtest/insufficient_disk_space_test.py +++ b/integtest/insufficient_disk_space_test.py @@ -170,14 +170,16 @@ def test_nanorc_success(run_nanorc): resval_summary_string = resval.get_insufficient_resources_summary() pytest.skip(f"{resval_summary_string}") + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_nanorc0\].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/large_trigger_record_test.py b/integtest/large_trigger_record_test.py index e6324c2..fb35ed1 100644 --- a/integtest/large_trigger_record_test.py +++ b/integtest/large_trigger_record_test.py @@ -186,14 +186,16 @@ def test_nanorc_success(run_nanorc): resval_summary_string = resval.get_insufficient_resources_summary() pytest.skip(f"{resval_summary_string}") + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)\-run_nanorc0].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/max_file_size_test.py b/integtest/max_file_size_test.py index 2f20ce3..a08167f 100644 --- a/integtest/max_file_size_test.py +++ b/integtest/max_file_size_test.py @@ -1,7 +1,6 @@ import pytest import os import re -import copy import urllib.request import integrationtest.data_file_checks as data_file_checks @@ -230,14 +229,16 @@ def test_nanorc_success(run_nanorc): resval_summary_string = resval.get_insufficient_resources_summary() pytest.skip(f"{resval_summary_string}") + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_nanorc0\].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/multiple_data_writers_test.py b/integtest/multiple_data_writers_test.py index 3719e42..02af970 100644 --- a/integtest/multiple_data_writers_test.py +++ b/integtest/multiple_data_writers_test.py @@ -1,7 +1,6 @@ import pytest import os import re -import copy import urllib.request import integrationtest.data_file_checks as data_file_checks @@ -151,14 +150,16 @@ def test_nanorc_success(run_nanorc): resval_summary_string = resval.get_insufficient_resources_summary() pytest.skip(f"{resval_summary_string}") + # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_nanorc0\].*", current_test) + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) if match_obj: current_test = match_obj.group(1) banner_line = re.sub(".", "=", current_test) print(banner_line) print(current_test) print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/offline_prod_run_test.py b/integtest/offline_prod_run_test.py index 40a92d7..5b02a7c 100644 --- a/integtest/offline_prod_run_test.py +++ b/integtest/offline_prod_run_test.py @@ -1,4 +1,6 @@ import pytest +import os +import re import urllib.request import integrationtest.data_file_checks as data_file_checks @@ -97,6 +99,16 @@ def test_nanorc_success(run_nanorc): + # print the name of the current test + current_test = os.environ.get("PYTEST_CURRENT_TEST") + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) + if match_obj: + current_test = match_obj.group(1) + banner_line = re.sub(".", "=", current_test) + print(banner_line) + print(current_test) + print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0 diff --git a/integtest/trmonrequestor_test.py b/integtest/trmonrequestor_test.py index f8929cc..102f591 100755 --- a/integtest/trmonrequestor_test.py +++ b/integtest/trmonrequestor_test.py @@ -2,7 +2,6 @@ import pytest import os import re -import copy import integrationtest.data_file_checks as data_file_checks import integrationtest.log_file_checks as log_file_checks @@ -103,6 +102,16 @@ def make_run_command_list(runnum): # The tests themselves def test_nanorc_success(run_nanorc): + # print the name of the current test + current_test = os.environ.get("PYTEST_CURRENT_TEST") + match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) + if match_obj: + current_test = match_obj.group(1) + banner_line = re.sub(".", "=", current_test) + print(banner_line) + print(current_test) + print(banner_line) + # Check that nanorc completed correctly assert run_nanorc.completed_process.returncode == 0