Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ jobs:
-r ./tensorboard/pip_package/requirements.txt \
-r ./tensorboard/pip_package/requirements_dev.txt \
;
- name: 'Install Chrome dependencies'
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev libxss1 libasound2
- name: 'Check Pip state'
run: pip freeze --all
- name: 'Bazel: fetch'
Expand Down
20 changes: 13 additions & 7 deletions tensorboard/BUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Description:
# TensorBoard, a dashboard for investigating TensorFlow

load("//tensorboard/defs:py_repl.bzl", "py_repl")
load("//tensorboard/defs:web.bzl", "tf_web_library")
load("//tensorboard/defs:zipper.bzl", "tensorboard_zip_file")
load("@rules_python//python:py_binary.bzl", "py_binary")
load("@rules_python//python:py_library.bzl", "py_library")
load("@rules_python//python:py_test.bzl", "py_test")
load("//tensorboard/defs:py_repl.bzl", "py_repl")
load("//tensorboard/defs:web.bzl", "tf_web_library")
load("//tensorboard/defs:zipper.bzl", "tensorboard_zip_file")

package(default_visibility = [":internal"])

Expand Down Expand Up @@ -211,10 +211,13 @@ py_library(

py_test(
name = "manager_test",
size = "small",
size = "large",
srcs = ["manager_test.py"],
srcs_version = "PY3",
tags = ["support_notf"],
tags = [
"exclusive",
"support_notf",
],
visibility = ["//tensorboard:internal"],
deps = [
":manager",
Expand Down Expand Up @@ -273,10 +276,13 @@ py_library(

py_test(
name = "program_test",
size = "small",
size = "large",
srcs = ["program_test.py"],
srcs_version = "PY3",
tags = ["support_notf"],
tags = [
"exclusive",
"support_notf",
],
deps = [
":default",
":program",
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def test_get_all_ignores_bad_files(self):
os.chmod(os.path.join(self.info_dir, "pid-9012.info"), 0o000)
with mock.patch.object(tb_logging.get_logger(), "debug") as fn:
self.assertEqual(manager.get_all(), [])
self.assertEqual(fn.call_count, 2) # 2 invalid, 1 unreadable (silent)
self.assertEqual(fn.call_count, 3) # 2 invalid, 1 unreadable (silent)


if __name__ == "__main__":
Expand Down
16 changes: 9 additions & 7 deletions tensorboard/program_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# ==============================================================================
"""Unit tests for program package."""


import argparse
import io
import sys
Expand Down Expand Up @@ -149,22 +148,25 @@ def testSpecifiedHost(self):
)
self.assertStartsWith(server.get_url(), "http://127.0.0.1:")
one_passed = True
except program.TensorBoardServerException:
# IPv4 is not supported
except (program.TensorBoardServerException, OSError, SystemExit):
# IPv4 is not supported or failed to bind
pass

try:
server = program.WerkzeugServer(
self._StubApplication(),
self.make_flags(host="::1", port=0, path_prefix=""),
)
self.assertStartsWith(server.get_url(), "http://[::1]:")
one_passed = True
except program.TensorBoardServerException:
# IPv6 is not supported
except (program.TensorBoardServerException, OSError, SystemExit):
# IPv6 is not supported or failed to bind
pass

self.assertTrue(
one_passed
) # We expect either IPv4 or IPv6 to be supported
one_passed,
"Neither IPv4 (127.0.0.1) nor IPv6 (::1) could be bound.",
)


class SubcommandTest(tb_test.TestCase):
Expand Down
Loading