support internal urls

pull/26301/head
Shane Smiskol 3 years ago
parent 84f5bb3947
commit 4918f06643
  1. 13
      selfdrive/car/tests/test_models.py
  2. 3
      selfdrive/test/openpilotci.py

@ -35,21 +35,20 @@ ignore_addr_checks_valid = [
HYUNDAI.GENESIS_G70_2020, HYUNDAI.GENESIS_G70_2020,
] ]
# build list of test cases
test_cases: List[Tuple[str, Optional[CarTestRoute]]] = []
if INTERNAL: if INTERNAL:
with open(SEG_LIST_PATH, "r") as f: with open(os.path.join(BASEDIR, "selfdrive/car/tests/test_models_segs.txt"), "r") as f:
seg_list = f.read().splitlines() seg_list = f.read().splitlines()
platforms, segs = seg_list[0::2], seg_list[1::2] platforms, segs = seg_list[0::2], seg_list[1::2]
car_test_routes = []
for platform, seg in list(zip(platforms, segs)): for platform, seg in list(zip(platforms, segs)):
car_test_routes.append(CarTestRoute(seg[:37], platform[2:], segment=int(seg[39:]))) test_cases.append((platform[2:], CarTestRoute(seg[:37], platform[2:], segment=int(seg[39:]))))
else: else:
# build list of test cases
routes_by_car = defaultdict(set) routes_by_car = defaultdict(set)
for r in routes: for r in routes:
routes_by_car[r.car_model].add(r) routes_by_car[r.car_model].add(r)
test_cases: List[Tuple[str, Optional[CarTestRoute]]] = []
for i, c in enumerate(sorted(all_known_cars())): for i, c in enumerate(sorted(all_known_cars())):
if i % NUM_JOBS == JOB_ID: if i % NUM_JOBS == JOB_ID:
test_cases.extend((c, r) for r in routes_by_car.get(c, (None, ))) test_cases.extend((c, r) for r in routes_by_car.get(c, (None, )))
@ -85,7 +84,9 @@ class TestCarModelBase(unittest.TestCase):
for seg in test_segs: for seg in test_segs:
try: try:
if cls.ci: if INTERNAL:
lr = LogReader(f"cd:/{cls.test_route.route[:16]}/{cls.test_route.route[17:37]}/{seg}/rlog.bz2")
elif cls.ci:
lr = LogReader(get_url(cls.test_route.route, seg)) lr = LogReader(get_url(cls.test_route.route, seg))
else: else:
lr = LogReader(Route(cls.test_route.route).log_paths()[seg]) lr = LogReader(Route(cls.test_route.route).log_paths()[seg])

@ -3,8 +3,7 @@ import os
import sys import sys
import subprocess import subprocess
# BASE_URL = "https://commadataci.blob.core.windows.net/openpilotci/" BASE_URL = "https://commadataci.blob.core.windows.net/openpilotci/"
BASE_URL = "http://data-raw.comma.internal/"
TOKEN_PATH = "/data/azure_token" TOKEN_PATH = "/data/azure_token"

Loading…
Cancel
Save