Skip to content

Commit

Permalink
WIP: debug Android Blackbox test failure
Browse files Browse the repository at this point in the history
b/291648592
  • Loading branch information
maxz-lab committed Sep 26, 2024
1 parent 3fb4b2d commit ba214d7
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions cobalt/black_box_tests/tests/cpu_usage_tracker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.
"""Test CpuUsageTracker config and CVals."""

from cobalt.black_box_tests import black_box_tests
from cobalt.black_box_tests.threaded_web_server import ThreadedWebServer
import logging
# 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 @@ -31,17 +31,16 @@
'linux-x64x11-clang-crosstool',
]

# class CpuUsageTrackerTest(black_box_tests.BlackBoxTestCase):

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

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:
runner.WaitForJSTestsSetup()
self.assertTrue(runner.JSTestsSucceeded())
# 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:
# runner.WaitForJSTestsSetup()
# self.assertTrue(runner.JSTestsSucceeded())

0 comments on commit ba214d7

Please sign in to comment.