Skip to content

Commit

Permalink
Prevent unsupported platforms from running cpu usage black box test. …
Browse files Browse the repository at this point in the history
…(#3776)

b/341774149
  • Loading branch information
aee-google committed Jul 8, 2024
1 parent c1e5b30 commit 7326dbc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cobalt/black_box_tests/tests/cpu_usage_tracker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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:
Expand Down

0 comments on commit 7326dbc

Please sign in to comment.