Exclude new vehicle testing in the old towns
This commit is contained in:
parent
66efc12e4b
commit
dcda50140a
|
@ -21,12 +21,13 @@ import carla
|
|||
import time
|
||||
|
||||
TESTING_ADDRESS = ('localhost', 3654)
|
||||
|
||||
VEHICLE_VEHICLES_EXCLUDE_FROM_OLD_TOWNS = ['vehicle.mitsubishi.fusorosa']
|
||||
|
||||
class SmokeTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.testing_address = TESTING_ADDRESS
|
||||
self.client = carla.Client(*TESTING_ADDRESS)
|
||||
self.vehicle_vehicles_exclude_from_old_towns = VEHICLE_VEHICLES_EXCLUDE_FROM_OLD_TOWNS
|
||||
self.client.set_timeout(120.0)
|
||||
self.world = self.client.get_world()
|
||||
|
||||
|
@ -36,6 +37,13 @@ class SmokeTest(unittest.TestCase):
|
|||
time.sleep(5)
|
||||
self.world = None
|
||||
self.client = None
|
||||
|
||||
def filter_vehicles_for_old_towns(self, blueprint_list):
|
||||
new_list = []
|
||||
for blueprint in blueprint_list:
|
||||
if blueprint.id not in self.vehicle_vehicles_exclude_from_old_towns:
|
||||
new_list.append(blueprint)
|
||||
return new_list
|
||||
|
||||
|
||||
class SyncSmokeTest(SmokeTest):
|
||||
|
|
|
@ -40,6 +40,7 @@ class TestCollisionSensor(SyncSmokeTest):
|
|||
print("TestCollisionSensor.test_single_car")
|
||||
|
||||
bp_vehicles = self.world.get_blueprint_library().filter("vehicle.*")
|
||||
bp_vehicles = self.filter_vehicles_for_old_towns(bp_vehicles)
|
||||
cars_failing = ""
|
||||
for bp_veh in bp_vehicles:
|
||||
# Run collision agains wall
|
||||
|
|
|
@ -15,6 +15,7 @@ class TestSpawnpoints(SyncSmokeTest):
|
|||
print("TestSpawnpoints.test_spawn_points")
|
||||
self.world = self.client.get_world()
|
||||
blueprints = self.world.get_blueprint_library().filter("vehicle.*")
|
||||
blueprints = self.filter_vehicles_for_old_towns(blueprints)
|
||||
|
||||
# get all available maps
|
||||
maps = self.client.get_available_maps()
|
||||
|
|
|
@ -185,6 +185,7 @@ class TestApplyVehiclePhysics(SyncSmokeTest):
|
|||
print("TestApplyVehiclePhysics.test_single_physics_control")
|
||||
|
||||
bp_vehicles = self.world.get_blueprint_library().filter("vehicle.*")
|
||||
bp_vehicles = self.filter_vehicles_for_old_towns(bp_vehicles)
|
||||
for bp_veh in bp_vehicles:
|
||||
self.check_single_physics_control(bp_veh)
|
||||
|
||||
|
@ -192,10 +193,12 @@ class TestApplyVehiclePhysics(SyncSmokeTest):
|
|||
print("TestApplyVehiclePhysics.test_multiple_physics_control")
|
||||
|
||||
bp_vehicles = self.world.get_blueprint_library().filter("vehicle.*")
|
||||
bp_vehicles = self.filter_vehicles_for_old_towns(bp_vehicles)
|
||||
for idx in range(0, len(bp_vehicles)):
|
||||
self.check_multiple_physics_control(bp_vehicles, idx)
|
||||
|
||||
bp_vehicles = self.world.get_blueprint_library().filter("vehicle.*")
|
||||
bp_vehicles = self.filter_vehicles_for_old_towns(bp_vehicles)
|
||||
self.check_multiple_physics_control(bp_vehicles)
|
||||
|
||||
class TestVehicleFriction(SyncSmokeTest):
|
||||
|
|
Loading…
Reference in New Issue