Skip to content

Commit

Permalink
CI: bring back subprocess to fix regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-krishna committed Feb 23, 2024
1 parent b3e9b8f commit 3eb889a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions utils/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,19 @@ def run_benchmark(
args.append(xl_folder)
start = time.time()

# Call the conversion function directly
summary = run(parse_args(args))

# pack the results into a namedtuple pretending to be a return value from a subprocess call (as above).
res = namedtuple("stdout", ["stdout", "stderr", "returncode"])(summary, "", 0)
res = None
if not debug:
res = subprocess.run(
["xl2times"] + args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
)
else:
# If debug option is set, run as a function call to allow stepping with a debugger.
summary = run(parse_args(args))
# pack the results into a namedtuple pretending to be a return value from a subprocess call (as above).
res = namedtuple("stdout", ["stdout", "stderr", "returncode"])(summary, "", 0)

runtime = time.time() - start

Expand Down

0 comments on commit 3eb889a

Please sign in to comment.