Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test duration measurement #1848

Merged
merged 3 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/ci-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ $run_python ../scripts/python/check_finalize_exceptions.py ../src
echo ............................

echo Running test suite now:
$run_python ./run.py -E || { echo Test suite failures, unstable build!; exit 1; }
$run_python ./run.py --show-time-info -E || { echo Test suite failures, unstable build!; exit 1; }
cd ..
echo ............................
5 changes: 5 additions & 0 deletions testsuite/drivers/driver/python_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import shutil
import sys
import time

from drivers.alr import prepare_env, prepare_indexes, run_alr
from drivers.driver.base_driver import BaseDriver
Expand Down Expand Up @@ -151,6 +152,8 @@ def run(self):
if mode == "both":
self.save_working_dir()

start_time = time.time()

# First run with shared builds disabled

if mode in ["sandboxed", "both"]:
Expand All @@ -173,3 +176,5 @@ def run(self):
"dependencies.shared", "true")
p = self.run_script(copy.deepcopy(pristine_env))
self.check_result(p)

self.result.time = time.time() - start_time
2 changes: 1 addition & 1 deletion testsuite/run-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ if [ -z "$GH_USERNAME" ]; then
echo
fi

./run.py -M1 "$@"
./run.py --show-time-info -M1 "$@"
10 changes: 6 additions & 4 deletions testsuite/run-solver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ set -o errexit

# Run subset of tests most likely to find a change in the solver's behavior

opts=--show-time-info -M1

clear
python3 run.py -M1 solver/"$@"
python3 run.py -M1 with/"$@"
python3 run.py -M1 pin/"$@"
python3 run.py -M1 get/"$@"
python3 run.py $opts solver/"$@"
python3 run.py $opts with/"$@"
python3 run.py $opts pin/"$@"
python3 run.py $opts get/"$@"
2 changes: 1 addition & 1 deletion testsuite/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

clear
python3 run.py -M1 "$@"
python3 run.py --show-time-info -M1 "$@"
Loading