From 7326dbc537cf803af9b216e549cc2fa2fc369748 Mon Sep 17 00:00:00 2001 From: aee Date: Mon, 8 Jul 2024 10:31:38 -0700 Subject: [PATCH] Prevent unsupported platforms from running cpu usage black box test. (#3776) b/341774149 --- cobalt/black_box_tests/tests/cpu_usage_tracker_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cobalt/black_box_tests/tests/cpu_usage_tracker_test.py b/cobalt/black_box_tests/tests/cpu_usage_tracker_test.py index 46d1965556248..020ebe0059be1 100644 --- a/cobalt/black_box_tests/tests/cpu_usage_tracker_test.py +++ b/cobalt/black_box_tests/tests/cpu_usage_tracker_test.py @@ -15,6 +15,7 @@ from cobalt.black_box_tests import black_box_tests from cobalt.black_box_tests.threaded_web_server import ThreadedWebServer +import logging PLATFORMS_SUPPORTED = [ 'linux-x64x11', @@ -34,6 +35,11 @@ class CpuUsageTrackerTest(black_box_tests.BlackBoxTestCase): def test_cpu_usage_tracker(self): + if self.launcher_params.platform not in PLATFORMS_SUPPORTED: + logging.warning('Blackbox tests disabled for platform:%s', + self.launcher_params.platform) + return + with ThreadedWebServer(binding_address=self.GetBindingAddress()) as server: url = server.GetURL(file_name='testdata/cpu_usage_tracker_test.html') with self.CreateCobaltRunner(url=url) as runner: