mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 10:35:37 +02:00
Improves ServerArch so that it can detect the remote architecture by running uname and checking %PROCESSOR_ARCHITECTURE%. So far, only x64 Linux and x64 Windows are supported, but in the future it is easy to add support for others, e.g. aarch64, as well. Before the detection is run, the remote architecture is guessed first based on the destination. For instance, if the destination directory starts with "C:\", it pretty much means Windows. If cdc_rsync_server exists and runs fine, there's no need for detection. Since also PortManager depends on the remote architecture, it has to be adjusted as well. So far, PortManager assumeed that "local" means Windows and "remote" means Linux. This is no longer the case for syncing to Windows devices, so this CL adds the necessary abstractions to PortManager. Also refactors ArchType into a separate class in common, since it is used now from several places. It is also expanded to handle future changes that add support for different processor architectures, e.g. aarch64.
51 lines
1.4 KiB
Python
51 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:ansi_filter",
|
|
"//common:arch_type",
|
|
"//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",
|
|
],
|
|
)
|