Added -j6 to nightly_build to make tests quicker. Untested, git rebase -i once it is confirmed this does not affect coverage using a nightly run

This commit is contained in:
slmnemo 2024-10-26 02:02:14 -07:00
parent 703d6c1081
commit 43f5ec283c

View File

@ -288,16 +288,17 @@ class TestRunner:
makefile_location = self.cvw.joinpath(makefile_path)
os.chdir(makefile_location)
output_file = self.log_dir.joinpath(f"make-{target}-output.log")
if target:
output_file = self.log_dir.joinpath(f"make-{target}-output.log")
else: output_file = self.log_dir.joinpath(f"make-output.log")
command = ["make"]
command = ["make", "-j6"]
# Add target to the command if specified
if target:
command.append(target)
self.logger.info(f"Command used in directory {makefile_location}: {command[0]} {command[1]}")
else:
self.logger.info(f"Command used in directory {makefile_location}: {command[0]}")
self.logger.info(f"Command used in directory {makefile_location}: {' '.join(command)}")
# Execute the command using subprocess and save the output into a file
with open(output_file, "w") as f:
@ -311,10 +312,10 @@ class TestRunner:
# Check the result
if result.returncode == 0:
self.logger.info(f"Tests have been made with target: {target}")
self.logger.info(f"Tests have been made with target: {' '.join(command)}")
return True
else:
self.logger.error(f"Error making the tests. Target: {target}")
self.logger.error(f"Error making the tests. Command: {' '.join(command)}")
return False
def run_tests(self, test_type=None, test_name=None, test_extensions=None):
@ -422,7 +423,7 @@ class TestRunner:
elif "Failures detected in output" in line: # Text explicitly fails
try:
config_name = line.split(':')[0].strip()
log_file = os.path.abspath(os.path.join("logs", config_name, ".log"))
log_file = os.path.abspath(os.path.join("logs", config_name))
failed_configs.append((config_name, log_file))
except:
failed_configs.append((config_name, "Log file not found"))
@ -672,7 +673,7 @@ def main():
parser.add_argument('--path',default = "nightly", help='specify the path for where the nightly repositories will be cloned ex: "nightly-runs')
parser.add_argument('--repository',default = "https://github.com/openhwgroup/cvw", help='specify which github repository you want to clone')
parser.add_argument('--target', default = "--jobs", help='types of tests you can make are: all, wally-riscv-arch-test, no')
parser.add_argument('--target', default = "", help='types of tests you can make are: all, wally-riscv-arch-test, no')
parser.add_argument('--tests', default = "nightly", help='types of tests you can run are: nightly, test, test_lint')
parser.add_argument('--send_email',default = "", nargs="+", help='What emails to send test results to. Example: "[email1],[email2],..."')