From 9ccc93ff0e0c0e973beb875ea7c27a4af26ced57 Mon Sep 17 00:00:00 2001 From: Thomas Kidd Date: Mon, 4 Mar 2024 18:21:03 -0600 Subject: [PATCH] over rides TIMEOUT on -nightly tag for regression since buildroot is not working --- bin/nightly_build.py | 45 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/bin/nightly_build.py b/bin/nightly_build.py index 7848198d2..166b8b9f9 100755 --- a/bin/nightly_build.py +++ b/bin/nightly_build.py @@ -228,7 +228,29 @@ class TestRunner: # print(f"The new WALLY vairable is: {os.environ.get('WALLY')}") # print(f"The Base Directory is now : {self.base_dir}") # print(f"The Base Parent Directory is now : {self.base_parent_dir}") - + + def change_time_dur(self, time_duriation=1): + + # Prepare the command to execute the Makefile + make_file_path = os.path.join(self.base_dir, "sim") + os.chdir(make_file_path) + file_path = "regression-wally" + line_number = 450 # TIMEOUT_DUR = 1 day at this line in regression-wally + new_line = f" TIMEOUT_DUR = {60*time_duriation}" + + with open(file_path, 'r') as file: + lines = file.readlines() + + if line_number < 1 or line_number > len(lines): + print("Error: Line number out of range.") + return False + + lines[line_number - 1] = new_line + '\n' + + with open(file_path, 'w') as file: + file.writelines(lines) + return True + def execute_makefile(self, target=None): """ Execute a Makefile with optional target. @@ -610,13 +632,24 @@ test_runner = TestRunner() # creates the object test_runner.set_env_var("nightly_runs/repos/") # ensures that the new WALLY environmental variable is set correctly +############################################# +# TMP SETUP # +############################################# + +""" +The goal of this section is to replace the TIMEOUT_DUR for regression tests. + +""" +if test_runner.change_time_dur(): + print("The regression-wally file was successfully changed") + ############################################# # MAKE TESTS # ############################################# -target = "wally-riscv-arch-test" -# target = "all" +# target = "wally-riscv-arch-test" +target = "all" if test_runner.execute_makefile(target = target): print(f"The {target} tests were made successfully") @@ -691,6 +724,6 @@ test_runner.convert_to_html() sender_email = 'james.stine@okstate.edu' # sender_email = 'thomas.kidd@okstate.edu' -# receiver_emails = ['thomas.kidd@okstate.edu', 'james.stine@okstate.edu', 'harris@g.hmc.edu', 'rose.thompson10@okstate.edu'] -receiver_emails = ['thomas.kidd@okstate.edu'] -test_runner.send_email(sender_email=sender_email, receiver_emails=receiver_emails) \ No newline at end of file +receiver_emails = ['thomas.kidd@okstate.edu', 'james.stine@okstate.edu', 'harris@g.hmc.edu', 'rose.thompson10@okstate.edu', "sarah.harris@unlv.edu"] +# receiver_emails = ['thomas.kidd@okstate.edu'] +test_runner.send_email(sender_email=sender_email, receiver_emails=receiver_emails)