mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 12:25:35 +02:00
Adds a flag to set the SSH forwarding port or port range used for 'cdc_stream start-service' and 'cdc_rsync'. If a single number is passed, e.g. --forward-port 12345, then this port is used without checking availability of local and remote ports. If the port is taken, this results in an error when trying to connect. Note that this restricts the number of connections that stream can make to one. If a range is passed, e.g. --forward-port 45000-46000, the tools search for available ports locally and remotely in that range. This is more robust, but a bit slower due to the extra overhead. Optimizes port_manager_win as it was very slow for a large port range. It's still not optimal, but the time needed to scan 30k ports is << 1 seconds now. Fixes #12
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
# Using a cc_binary rule here to avoid that this test is included when running
|
|
# test from bazel directly. This target is just a convenience target for all the
|
|
# unit tests in the scope run from Visual Studio, thus running the following
|
|
# command would execute all tests twice:
|
|
#
|
|
# bazel test --build_tests_only //...
|
|
#
|
|
# To run this target with Bazel directly, just use "bazel run" instead of
|
|
# "bazel test".
|
|
cc_binary(
|
|
name = "tests_common",
|
|
testonly = True,
|
|
srcs = [
|
|
"//common:all_test_sources",
|
|
],
|
|
data = [
|
|
"//common:all_test_data",
|
|
],
|
|
deps = [
|
|
"//common:buffer",
|
|
"//common:dir_iter",
|
|
"//common:file_watcher",
|
|
"//common:gamelet_component",
|
|
"//common:log",
|
|
"//common:path",
|
|
"//common:path_filter",
|
|
"//common:platform",
|
|
"//common:port_manager",
|
|
"//common:port_range_parser",
|
|
"//common:process",
|
|
"//common:remote_util",
|
|
"//common:sdk_util",
|
|
"//common:semaphore",
|
|
"//common:status_test_macros",
|
|
"//common:stopwatch",
|
|
"//common:stub_process",
|
|
"//common:test_main",
|
|
"//common:testing_clock",
|
|
"//common:thread_safe_map",
|
|
"//common:threadpool",
|
|
"//common:url",
|
|
"//common:util",
|
|
],
|
|
)
|