diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 253841877f..abca99b55a 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -22,7 +22,7 @@ from openpilot.selfdrive.car.honda.values import CAR as HONDA, HONDA_BOSCH from openpilot.selfdrive.car.tests.routes import non_tested_cars, routes, CarTestRoute from openpilot.selfdrive.controls.controlsd import Controls from openpilot.selfdrive.test.helpers import read_segment_list -from openpilot.selfdrive.test.openpilotci import get_url +from openpilot.tools.lib.openpilotci import get_url from openpilot.tools.lib.logreader import LogReader from openpilot.tools.lib.route import Route, SegmentName, RouteName diff --git a/selfdrive/test/process_replay/model_replay.py b/selfdrive/test/process_replay/model_replay.py index 2841386bf4..a96dd18503 100755 --- a/selfdrive/test/process_replay/model_replay.py +++ b/selfdrive/test/process_replay/model_replay.py @@ -9,7 +9,7 @@ import cereal.messaging as messaging from openpilot.common.params import Params from openpilot.system.hardware import PC from openpilot.selfdrive.manager.process_config import managed_processes -from openpilot.selfdrive.test.openpilotci import BASE_URL, get_url +from openpilot.tools.lib.openpilotci import BASE_URL, get_url from openpilot.selfdrive.test.process_replay.compare_logs import compare_logs, format_diff from openpilot.selfdrive.test.process_replay.process_replay import get_process_config, replay_process from openpilot.system.version import get_commit @@ -143,7 +143,7 @@ if __name__ == "__main__": import requests import threading import http.server - from openpilot.selfdrive.test.openpilotci import upload_bytes + from openpilot.tools.lib.openpilotci import upload_bytes os.environ['MAPS_HOST'] = 'http://localhost:5000' class HTTPRequestHandler(http.server.BaseHTTPRequestHandler): @@ -229,7 +229,7 @@ if __name__ == "__main__": # upload new refs if (update or failed) and not PC: - from openpilot.selfdrive.test.openpilotci import upload_file + from openpilot.tools.lib.openpilotci import upload_file print("Uploading new refs") diff --git a/selfdrive/test/process_replay/test_debayer.py b/selfdrive/test/process_replay/test_debayer.py index baa9e255e6..bea1b1fb00 100755 --- a/selfdrive/test/process_replay/test_debayer.py +++ b/selfdrive/test/process_replay/test_debayer.py @@ -8,7 +8,7 @@ import pyopencl as cl # install with `PYOPENCL_CL_PRETEND_VERSION=2.0 pip insta from openpilot.system.hardware import PC, TICI from openpilot.common.basedir import BASEDIR -from openpilot.selfdrive.test.openpilotci import BASE_URL +from openpilot.tools.lib.openpilotci import BASE_URL from openpilot.system.version import get_commit from openpilot.system.camerad.snapshot.snapshot import yuv_to_rgb from openpilot.tools.lib.logreader import LogReader @@ -171,7 +171,7 @@ if __name__ == "__main__": # upload new refs if update or (failed and TICI): - from openpilot.selfdrive.test.openpilotci import upload_file + from openpilot.tools.lib.openpilotci import upload_file print("Uploading new refs") diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index 5429c9b63e..46fa93ba4d 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -8,7 +8,7 @@ from tqdm import tqdm from typing import Any, DefaultDict, Dict from openpilot.selfdrive.car.car_helpers import interface_names -from openpilot.selfdrive.test.openpilotci import get_url, upload_file +from openpilot.tools.lib.openpilotci import get_url, upload_file from openpilot.selfdrive.test.process_replay.compare_logs import compare_logs, format_diff from openpilot.selfdrive.test.process_replay.process_replay import CONFIGS, PROC_REPLAY_DIR, FAKEDATA, check_openpilot_enabled, replay_process from openpilot.system.version import get_commit diff --git a/selfdrive/test/process_replay/test_regen.py b/selfdrive/test/process_replay/test_regen.py index f352205564..41d67ea376 100755 --- a/selfdrive/test/process_replay/test_regen.py +++ b/selfdrive/test/process_replay/test_regen.py @@ -6,7 +6,7 @@ from parameterized import parameterized from openpilot.selfdrive.test.process_replay.regen import regen_segment, DummyFrameReader from openpilot.selfdrive.test.process_replay.process_replay import check_openpilot_enabled -from openpilot.selfdrive.test.openpilotci import get_url +from openpilot.tools.lib.openpilotci import get_url from openpilot.tools.lib.logreader import LogReader from openpilot.tools.lib.framereader import FrameReader diff --git a/selfdrive/test/test_valgrind_replay.py b/selfdrive/test/test_valgrind_replay.py index a8a3463104..75520df91b 100755 --- a/selfdrive/test/test_valgrind_replay.py +++ b/selfdrive/test/test_valgrind_replay.py @@ -15,7 +15,7 @@ else: import cereal.messaging as messaging from collections import namedtuple from openpilot.tools.lib.logreader import LogReader -from openpilot.selfdrive.test.openpilotci import get_url +from openpilot.tools.lib.openpilotci import get_url from openpilot.common.basedir import BASEDIR ProcessConfig = namedtuple('ProcessConfig', ['proc_name', 'pub_sub', 'ignore', 'command', 'path', 'segment', 'wait_for_response']) diff --git a/selfdrive/test/update_ci_routes.py b/selfdrive/test/update_ci_routes.py index ccaa7f9b84..2a841025e3 100755 --- a/selfdrive/test/update_ci_routes.py +++ b/selfdrive/test/update_ci_routes.py @@ -11,7 +11,7 @@ from tqdm import tqdm from openpilot.selfdrive.car.tests.routes import routes as test_car_models_routes from openpilot.selfdrive.test.process_replay.test_processes import source_segments as replay_segments -from openpilot.selfdrive.test.openpilotci import (DATA_CI_ACCOUNT, DATA_CI_ACCOUNT_URL, OPENPILOT_CI_CONTAINER, +from openpilot.tools.lib.openpilotci import (DATA_CI_ACCOUNT, DATA_CI_ACCOUNT_URL, OPENPILOT_CI_CONTAINER, DATA_CI_CONTAINER, get_azure_credential, get_container_sas, upload_file) DATA_PROD_ACCOUNT = "commadata2" diff --git a/tools/lib/logreader.py b/tools/lib/logreader.py index 2512be8ee2..ee893c7e15 100755 --- a/tools/lib/logreader.py +++ b/tools/lib/logreader.py @@ -15,7 +15,7 @@ from typing import Iterable, Iterator, List from urllib.parse import parse_qs, urlparse from cereal import log as capnp_log -from openpilot.selfdrive.test.openpilotci import get_url +from openpilot.tools.lib.openpilotci import get_url from openpilot.tools.lib.filereader import FileReader from openpilot.tools.lib.helpers import RE from openpilot.tools.lib.route import Route, SegmentRange diff --git a/selfdrive/test/openpilotci.py b/tools/lib/openpilotci.py similarity index 100% rename from selfdrive/test/openpilotci.py rename to tools/lib/openpilotci.py diff --git a/tools/replay/unlog_ci_segment.py b/tools/replay/unlog_ci_segment.py index ae97ad45d6..a2011f6876 100755 --- a/tools/replay/unlog_ci_segment.py +++ b/tools/replay/unlog_ci_segment.py @@ -12,7 +12,7 @@ from collections import defaultdict import cereal.messaging as messaging from openpilot.tools.lib.framereader import FrameReader from openpilot.tools.lib.logreader import LogReader -from openpilot.selfdrive.test.openpilotci import get_url +from openpilot.tools.lib.openpilotci import get_url IGNORE = ['initData', 'sentinel']