selfdrive.test package

Subpackages

Submodules

selfdrive.test.ciui module

selfdrive.test.cpp_harness module

selfdrive.test.fuzzy_generation module

class selfdrive.test.fuzzy_generation.FuzzyGenerator(draw: Callable[[SearchStrategy], Any], real_floats: bool)[source]

Bases: object

generate_field(field: _StructSchemaField) SearchStrategy[source]
generate_native_type(field: str) SearchStrategy[bool | int | float | str | bytes][source]
generate_struct(schema: _StructSchema, event: str = None) SearchStrategy[dict[str, Any]][source]
classmethod get_random_event_msg(draw: Callable[[SearchStrategy], Any], events: list[str], real_floats: bool = False) list[dict[str, Any]][source]
classmethod get_random_msg(draw: Callable[[SearchStrategy], Any], struct: _StructModule, real_floats: bool = False) dict[str, Any][source]

selfdrive.test.helpers module

selfdrive.test.helpers.DirectoryHttpServer(directory) type[SimpleHTTPRequestHandler][source]
selfdrive.test.helpers.http_server_context(handler, setup=None)[source]
selfdrive.test.helpers.noop(*args, **kwargs)[source]
selfdrive.test.helpers.phone_only(f)[source]
selfdrive.test.helpers.processes_context(processes, init_time=0, ignore_stopped=None)[source]
selfdrive.test.helpers.read_segment_list(segment_list_path)[source]
selfdrive.test.helpers.release_only(f)[source]
selfdrive.test.helpers.set_params_enabled()[source]
selfdrive.test.helpers.with_http_server(func, handler=<class 'http.server.BaseHTTPRequestHandler'>, setup=None)[source]
selfdrive.test.helpers.with_processes(processes, init_time=0, ignore_stopped=None)[source]

selfdrive.test.test_onroad module

class selfdrive.test.test_onroad.TestOnroad(methodName='runTest')[source]

Bases: TestCase

pytestmark = [Mark(name='tici', args=(), kwargs={})]
property service_msgs
classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_camera_frame_timings()[source]
test_camera_processing_time()[source]
test_cloudlog_size()[source]
test_cpu_usage()[source]
test_engagable()[source]
test_gpu_usage()[source]
test_log_sizes()[source]
test_memory_usage()[source]
test_model_execution_timings()[source]
test_mpc_execution_timings()[source]
test_service_frequencies()[source]
test_startup()[source]
test_timings()[source]
test_ui_timings()[source]
selfdrive.test.test_onroad.cputime_total(ct)[source]

selfdrive.test.test_time_to_onroad module

selfdrive.test.test_time_to_onroad.test_time_to_onroad()[source]

selfdrive.test.test_updated module

class selfdrive.test.test_updated.TestUpdated(methodName='runTest')[source]

Bases: TestCase

pytestmark = [Mark(name='tici', args=(), kwargs={})]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_clear_neos_cache()[source]
test_multiple_instances()[source]
test_no_update()[source]
test_overlay_reinit()[source]
test_update()[source]
test_update_loop()[source]
test_update_with_neos_update()[source]

selfdrive.test.test_valgrind_replay module

class selfdrive.test.test_valgrind_replay.ProcessConfig(proc_name, pub_sub, ignore, command, path, segment, wait_for_response)

Bases: tuple

command

Alias for field number 3

ignore

Alias for field number 2

path

Alias for field number 4

proc_name

Alias for field number 0

pub_sub

Alias for field number 1

segment

Alias for field number 5

wait_for_response

Alias for field number 6

class selfdrive.test.test_valgrind_replay.TestValgrind(methodName='runTest')[source]

Bases: TestCase

extract_leak_sizes(log)[source]
replay_process(config, logreader)[source]
test_config()[source]
valgrindlauncher(arg, cwd)[source]

selfdrive.test.update_ci_routes module

selfdrive.test.update_ci_routes.sync_to_ci_public(route: str) bool[source]
selfdrive.test.update_ci_routes.upload_route(path: str, exclude_patterns: Iterable[str] = None) None[source]

Module contents