Verified Commit 3c4325fd authored by Sebastian Endres's avatar Sebastian Endres
Browse files

Warn if log_dir in result.json does not exist

parent ef196458
"""Parse quic-interop-runner result.json files."""
import json
import logging
import re
from abc import ABC, abstractmethod
from dataclasses import dataclass
......@@ -300,10 +301,16 @@ class Result:
def log_dir(self) -> Path:
"""The path to the detailed logs."""
log_dir = Path(self.raw_data["log_dir"])
if log_dir.is_absolute():
return log_dir
return self.file_path.parent / log_dir
if not log_dir.is_absolute():
log_dir = self.file_path.parent / log_dir
if not log_dir.is_dir():
f"The log dir {log_dir} given in {self.file_path} does not exist"
return log_dir
def log_dir(self, value: Path):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment