You've already forked open-source-firmware-validation
mirror of
https://github.com/Dasharo/open-source-firmware-validation.git
synced 2026-03-06 14:51:55 -08:00
64a1f97770
Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
57 lines
1.4 KiB
Python
Executable File
57 lines
1.4 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# SPDX-FileCopyrightText: 2026 3mdeb <contact@3mdeb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
import os
|
|
import pathlib
|
|
import shutil
|
|
import subprocess
|
|
import sys
|
|
import time
|
|
|
|
import develop_pr_auto_regression
|
|
import tqdm
|
|
|
|
N_REPEATS = 2
|
|
RUN_DATE = time.strftime("%Y_%m_%d_%H_%M_%S")
|
|
COMMIT = (
|
|
subprocess.run(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
|
|
.stdout.decode()
|
|
.strip()
|
|
)
|
|
BRANCH = (
|
|
subprocess.run(["git", "branch", "--show-current"], stdout=subprocess.PIPE)
|
|
.stdout.decode()
|
|
.strip()
|
|
)
|
|
env = os.environ
|
|
if "MANUAL_TESTS_LIST" not in env:
|
|
env["MANUAL_TESTS_LIST"] = (
|
|
"scripts/ci/regression-scope/configs/release_tests_suite_list_minimal.txt"
|
|
)
|
|
if "DEVICES" not in env:
|
|
env["DEVICES"] = "scripts/ci/regression-scope/configs/release_tests_devices.txt"
|
|
if "RULES_FILE" not in env:
|
|
env["RULES_FILE"] = "scripts/ci/regression-scope/configs/release_tests_rules.json"
|
|
if "LOGS_DIR" not in env:
|
|
logs_base = f"/srv/nfs/logs/osfv_stability/ci_logs"
|
|
|
|
env["ALLOW_DIRTY"] = "1"
|
|
|
|
os.makedirs(logs_base, exist_ok=True)
|
|
|
|
repeats = tqdm.tqdm(range(N_REPEATS), colour="green")
|
|
rcs = []
|
|
for i in repeats:
|
|
logs_dir = f"{logs_base}/{BRANCH}_{COMMIT}/{RUN_DATE}/run{i}"
|
|
os.makedirs(logs_dir)
|
|
env["LOGS_DIR"] = logs_dir
|
|
|
|
rcs.append(develop_pr_auto_regression.main(silent=True))
|
|
|
|
if sum(rcs) != 0:
|
|
print("return codes: ", rcs)
|
|
sys.exit(1)
|