fix: read validate_pr data from the repo root

Run from another directory, validate_pr.py read no database, platform or
profile and reported every file as referenced by no platform and outside
bios/. It now moves to the root as verify.py does, reading the files
named from where they were typed.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 10:08:23 +02:00
1 parent d63c881648
commit ec1001de95
3 files changed
+45 -1

No files matched your search

+10
View File
@@ -512,6 +512,16 @@ def main() -> None:
output.add_argument("--json", action="store_true", help="Output as JSON")
args = parser.parse_args()
# The database, platforms and profiles are read from the repository
# root. Run from elsewhere, every file read as referenced by no platform
# and placed outside bios/. The files named are read from where they
# were typed.
from verify import REPO_ROOT, work_from_repo_root
if os.path.realpath(os.getcwd()) != os.path.realpath(REPO_ROOT):
args.files = [os.path.abspath(f) for f in args.files]
work_from_repo_root(args, parser, ["db", "platforms_dir", "emulators_dir"])
files = _files_to_validate(args, parser)
if not files:
if args.json: