From a4fa5a82dd111a9fff115c260f24cf9b703dbf59 Mon Sep 17 00:00:00 2001 From: doterop Date: Fri, 31 Jul 2020 16:17:00 +0200 Subject: [PATCH] Added prints to see what test is running and added wait before starting sync mode --- PythonAPI/test/smoke/test_blueprint.py | 1 + PythonAPI/test/smoke/test_client.py | 1 + PythonAPI/test/smoke/test_map.py | 2 ++ PythonAPI/test/smoke/test_props_loading.py | 1 + PythonAPI/test/smoke/test_snapshot.py | 1 + PythonAPI/test/smoke/test_spawnpoints.py | 10 +++++----- PythonAPI/test/smoke/test_streamming.py | 1 + PythonAPI/test/smoke/test_sync.py | 6 ++++++ PythonAPI/test/smoke/test_world.py | 1 + 9 files changed, 19 insertions(+), 5 deletions(-) diff --git a/PythonAPI/test/smoke/test_blueprint.py b/PythonAPI/test/smoke/test_blueprint.py index 3fafb0961..11330ed01 100644 --- a/PythonAPI/test/smoke/test_blueprint.py +++ b/PythonAPI/test/smoke/test_blueprint.py @@ -11,6 +11,7 @@ from . import SmokeTest class TestBlueprintLibrary(SmokeTest): def test_blueprint_ids(self): + print("TestBlueprintLibrary.test_blueprint_ids") library = self.client.get_world().get_blueprint_library() self.assertTrue([x for x in library]) self.assertTrue([x for x in library.filter('sensor.*')]) diff --git a/PythonAPI/test/smoke/test_client.py b/PythonAPI/test/smoke/test_client.py index ce6f77e60..6f0c80403 100644 --- a/PythonAPI/test/smoke/test_client.py +++ b/PythonAPI/test/smoke/test_client.py @@ -10,4 +10,5 @@ from . import SmokeTest class TestClient(SmokeTest): def test_version(self): + print("TestClient.test_version") self.assertEqual(self.client.get_client_version(), self.client.get_server_version()) diff --git a/PythonAPI/test/smoke/test_map.py b/PythonAPI/test/smoke/test_map.py index 41813af34..241037504 100644 --- a/PythonAPI/test/smoke/test_map.py +++ b/PythonAPI/test/smoke/test_map.py @@ -12,11 +12,13 @@ from . import SmokeTest class TestMap(SmokeTest): def test_reload_world(self): + print("TestMap.test_reload_world") map_name = self.client.get_world().get_map().name world = self.client.reload_world() self.assertEqual(map_name, world.get_map().name) def test_load_all_maps(self): + print("TestMap.test_load_all_maps") map_names = list(self.client.get_available_maps()) random.shuffle(map_names) for map_name in map_names: diff --git a/PythonAPI/test/smoke/test_props_loading.py b/PythonAPI/test/smoke/test_props_loading.py index 5cdac79de..d3d374574 100644 --- a/PythonAPI/test/smoke/test_props_loading.py +++ b/PythonAPI/test/smoke/test_props_loading.py @@ -12,6 +12,7 @@ from . import SmokeTest class TestPropsLoading(SmokeTest): def test_spawn_loaded_props(self): + print("TestPropsLoading.test_spawn_loaded_props") client = self.client world = client.get_world() diff --git a/PythonAPI/test/smoke/test_snapshot.py b/PythonAPI/test/smoke/test_snapshot.py index 8c1976829..4b79b7c35 100644 --- a/PythonAPI/test/smoke/test_snapshot.py +++ b/PythonAPI/test/smoke/test_snapshot.py @@ -12,6 +12,7 @@ from . import SyncSmokeTest class TestSnapshot(SyncSmokeTest): def test_spawn_points(self): + print("TestSnapshot.test_spawn_points") self.world = self.client.reload_world() # Check why the world settings aren't applied after a reload diff --git a/PythonAPI/test/smoke/test_spawnpoints.py b/PythonAPI/test/smoke/test_spawnpoints.py index af46fe3f7..2c9198585 100644 --- a/PythonAPI/test/smoke/test_spawnpoints.py +++ b/PythonAPI/test/smoke/test_spawnpoints.py @@ -11,18 +11,18 @@ from . import SyncSmokeTest class TestSpawnpoints(SyncSmokeTest): def test_spawn_points(self): - + print("TestSpawnpoints.test_spawn_points") self.world = self.client.get_world() blueprints = self.world.get_blueprint_library().filter("vehicle.*") - + # get all available maps maps = self.client.get_available_maps() for m in maps: - + # load the map self.client.load_world(m) self.world = self.client.get_world() - + # get all spawn points spawn_points = self.world.get_map().get_spawn_points() @@ -61,6 +61,6 @@ class TestSpawnpoints(SyncSmokeTest): self.assertAlmostEqual(t0.rotation.pitch, t1.rotation.pitch, places=2) self.assertAlmostEqual(t0.rotation.yaw, t1.rotation.yaw, places=2) self.assertAlmostEqual(t0.rotation.roll, t1.rotation.roll, places=2) - + self.client.apply_batch_sync([carla.command.DestroyActor(x) for x in ids], True) frame = self.world.tick() diff --git a/PythonAPI/test/smoke/test_streamming.py b/PythonAPI/test/smoke/test_streamming.py index 07f5397b3..b845e93c3 100644 --- a/PythonAPI/test/smoke/test_streamming.py +++ b/PythonAPI/test/smoke/test_streamming.py @@ -40,6 +40,7 @@ class TestStreamming(SmokeTest): def test_multistream(self): + print("TestStreamming.test_multistream") # create the sensor world = self.client.get_world() bp = world.get_blueprint_library().find('sensor.other.gnss') diff --git a/PythonAPI/test/smoke/test_sync.py b/PythonAPI/test/smoke/test_sync.py index 397554b4a..e38bbb3ef 100644 --- a/PythonAPI/test/smoke/test_sync.py +++ b/PythonAPI/test/smoke/test_sync.py @@ -7,6 +7,7 @@ from . import SyncSmokeTest import carla +import time try: import queue @@ -16,6 +17,7 @@ except ImportError: class TestSynchronousMode(SyncSmokeTest): def test_reloading_map(self): + print("TestSynchronousMode.test_reloading_map") settings = carla.WorldSettings( no_rendering_mode=False, synchronous_mode=True, @@ -25,6 +27,10 @@ class TestSynchronousMode(SyncSmokeTest): self.world.apply_settings(settings) def test_camera_on_synchronous_mode(self): + print("TestSynchronousMode.test_camera_on_synchronous_mode") + + time.sleep(10.0) + cam_bp = self.world.get_blueprint_library().find('sensor.camera.rgb') t = carla.Transform(carla.Location(z=10)) camera = self.world.spawn_actor(cam_bp, t) diff --git a/PythonAPI/test/smoke/test_world.py b/PythonAPI/test/smoke/test_world.py index 40f9b299a..ee2019cbc 100644 --- a/PythonAPI/test/smoke/test_world.py +++ b/PythonAPI/test/smoke/test_world.py @@ -10,6 +10,7 @@ from . import SmokeTest class TestWorld(SmokeTest): def test_fixed_delta_seconds(self): + print("TestWorld.test_fixed_delta_seconds") world = self.client.get_world() settings = world.get_settings() self.assertFalse(settings.synchronous_mode)