| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -4,6 +4,7 @@ import pytest | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import random | 
					 | 
					 | 
					 | 
					import random | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import unittest # noqa: TID251 | 
					 | 
					 | 
					 | 
					import unittest # noqa: TID251 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from collections import defaultdict, Counter | 
					 | 
					 | 
					 | 
					from collections import defaultdict, Counter | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					from functools import partial | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import hypothesis.strategies as st | 
					 | 
					 | 
					 | 
					import hypothesis.strategies as st | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from hypothesis import Phase, given, settings | 
					 | 
					 | 
					 | 
					from hypothesis import Phase, given, settings | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from parameterized import parameterized_class | 
					 | 
					 | 
					 | 
					from parameterized import parameterized_class | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -22,7 +23,8 @@ from openpilot.selfdrive.selfdrived.selfdrived import SelfdriveD | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from openpilot.selfdrive.pandad import can_capnp_to_list | 
					 | 
					 | 
					 | 
					from openpilot.selfdrive.pandad import can_capnp_to_list | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from openpilot.selfdrive.test.helpers import read_segment_list | 
					 | 
					 | 
					 | 
					from openpilot.selfdrive.test.helpers import read_segment_list | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT | 
					 | 
					 | 
					 | 
					from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from openpilot.tools.lib.logreader import LogReader, LogsUnavailable | 
					 | 
					 | 
					 | 
					from openpilot.tools.lib.logreader import LogReader, LogsUnavailable, openpilotci_source_zst, openpilotci_source, internal_source, \ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                          internal_source_zst, comma_api_source, auto_source | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from openpilot.tools.lib.route import SegmentName | 
					 | 
					 | 
					 | 
					from openpilot.tools.lib.route import SegmentName | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from panda.tests.libpanda import libpanda_py | 
					 | 
					 | 
					 | 
					from panda.tests.libpanda import libpanda_py | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -35,7 +37,7 @@ NUM_JOBS = int(os.environ.get("NUM_JOBS", "1")) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					JOB_ID = int(os.environ.get("JOB_ID", "0")) | 
					 | 
					 | 
					 | 
					JOB_ID = int(os.environ.get("JOB_ID", "0")) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					INTERNAL_SEG_LIST = os.environ.get("INTERNAL_SEG_LIST", "") | 
					 | 
					 | 
					 | 
					INTERNAL_SEG_LIST = os.environ.get("INTERNAL_SEG_LIST", "") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					INTERNAL_SEG_CNT = int(os.environ.get("INTERNAL_SEG_CNT", "0")) | 
					 | 
					 | 
					 | 
					INTERNAL_SEG_CNT = int(os.environ.get("INTERNAL_SEG_CNT", "0")) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "200")) | 
					 | 
					 | 
					 | 
					MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "300")) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					CI = os.environ.get("CI", None) is not None | 
					 | 
					 | 
					 | 
					CI = os.environ.get("CI", None) is not None | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -126,7 +128,9 @@ class TestCarModelBase(unittest.TestCase): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      segment_range = f"{cls.test_route.route}/{seg}" | 
					 | 
					 | 
					 | 
					      segment_range = f"{cls.test_route.route}/{seg}" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      try: | 
					 | 
					 | 
					 | 
					      try: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        lr = LogReader(segment_range) | 
					 | 
					 | 
					 | 
					        source = partial(auto_source, sources=[internal_source, internal_source_zst] if len(INTERNAL_SEG_LIST) else \ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                              [openpilotci_source_zst, openpilotci_source, comma_api_source]) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        lr = LogReader(segment_range, source=source) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return cls.get_testing_data_from_logreader(lr) | 
					 | 
					 | 
					 | 
					        return cls.get_testing_data_from_logreader(lr) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      except (LogsUnavailable, AssertionError): | 
					 | 
					 | 
					 | 
					      except (LogsUnavailable, AssertionError): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        pass | 
					 | 
					 | 
					 | 
					        pass | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |