Skip to content

Commit

Permalink
Added jobs flag to make during nightly regression
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnemo committed Oct 30, 2024
1 parent b9d215d commit c105c09
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/nightly_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ def execute_makefile(self, makefile_path=None, target=None):
output_file = self.log_dir.joinpath(f"make-{target}-output.log")
else: output_file = self.log_dir.joinpath(f"make-output.log")

command = ["make", "-j6"]

# Add target to the command if specified
if target:
command.append(target)
# Execute make with target and cores/2
if target:
command = ["make", target, "--jobs=$(($(nproc)/2))"]
else:
command = ["make", "--jobs=$(($(nproc)/2))"]

self.logger.info(f"Command used in directory {makefile_location}: {' '.join(command)}")

Expand All @@ -305,7 +305,7 @@ def execute_makefile(self, makefile_path=None, target=None):
formatted_datetime = self.current_datetime.strftime("%Y-%m-%d %H:%M:%S")
f.write(formatted_datetime)
f.write("\n\n")
result = subprocess.run(command, stdout=f, stderr=subprocess.STDOUT, text=True)
result = subprocess.run(command, stdout=f, stderr=subprocess.STDOUT, text=True, shell=True)

# Execute the command using a subprocess and not save the output
#result = subprocess.run(command, text=True)
Expand Down

0 comments on commit c105c09

Please sign in to comment.