2019-01-29 13:21:31 +00:00
|
|
|
load("@foreign_cc_platform_utils//:bazel_version.bzl", "BAZEL_VERSION")
|
|
|
|
load(":select_windows_tests.bzl", "select_windows_tests")
|
|
|
|
|
2018-09-11 11:07:11 +00:00
|
|
|
tests = [
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cmake:test_libgd",
|
|
|
|
"//cmake:test_libpng",
|
|
|
|
"//cmake:test_zlib",
|
|
|
|
"//cmake_cares:test_c_ares",
|
2019-01-08 11:25:16 +00:00
|
|
|
"//cmake_cares:test_old_c_ares",
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cmake_hello_world_lib/static:test_hello",
|
|
|
|
"//cmake_nghttp2:test_nghttp2",
|
2019-01-08 11:25:16 +00:00
|
|
|
# Commented out because the paths in shell test should be different depending on whether it called
|
|
|
|
# from out workspace or same workspace
|
|
|
|
# Uncomment after nested workspaces are supported on CI
|
|
|
|
# "//built_ninja:test_ninja_version",
|
2019-01-07 09:31:27 +00:00
|
|
|
"@rules_foreign_cc//test:cmake_script_test_suite",
|
2019-01-18 17:06:10 +00:00
|
|
|
"@rules_foreign_cc//test:shell_script_conversion_suite",
|
2019-06-19 13:50:58 +00:00
|
|
|
"@rules_foreign_cc//test:utils_test_suite",
|
2020-04-30 09:24:25 +00:00
|
|
|
"@rules_foreign_cc//test:shell_script_inner_fun_test",
|
2020-05-08 09:43:40 +00:00
|
|
|
"@rules_foreign_cc//test:shell_method_symlink_contents_to_dir_test",
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cc_configure_make:libevent_echosrv1",
|
2021-01-25 15:44:44 +00:00
|
|
|
"//cmake_with_data:data_attr_tests",
|
2018-09-11 11:07:11 +00:00
|
|
|
]
|
|
|
|
|
2018-08-13 10:44:53 +00:00
|
|
|
test_suite(
|
|
|
|
name = "tests",
|
2018-12-04 17:54:21 +00:00
|
|
|
tests = tests + [
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cmake_synthetic:test_libs",
|
2019-05-09 08:35:00 +00:00
|
|
|
"//cmake_with_bazel_transitive:test",
|
2019-01-07 09:31:27 +00:00
|
|
|
"//configure_gnuplot:configure_libgd_tests",
|
2020-06-08 17:01:21 +00:00
|
|
|
"//configure_libunwind:configure_libunwind_tests",
|
|
|
|
"//configure_mpc:configure_mpc_tests",
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cmake_hello_world_lib/shared:test_libhello",
|
|
|
|
"//cmake_hello_world_lib/binary:test_binary",
|
2019-05-09 08:35:00 +00:00
|
|
|
"//configure_with_bazel_transitive:test",
|
2019-07-10 16:05:24 +00:00
|
|
|
"//simple_make:test_lib",
|
2019-06-25 16:31:21 +00:00
|
|
|
"//cmake_hello_world_variant:test_hello_world",
|
2019-09-17 18:34:20 +00:00
|
|
|
"//cmake_synthetic:test_bazel_transitive_deps",
|
2020-04-24 07:16:21 +00:00
|
|
|
"//cmake_working_dir:test_lib",
|
2018-12-04 17:54:21 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
test_suite(
|
2019-11-26 18:13:54 +00:00
|
|
|
name = "mac_tests",
|
2018-12-04 17:54:21 +00:00
|
|
|
tests = tests + [
|
2019-01-07 09:31:27 +00:00
|
|
|
"//cmake_synthetic:test_libs",
|
|
|
|
"//cmake_hello_world_lib/shared:test_libhello",
|
|
|
|
"//cmake_hello_world_lib/binary:test_binary",
|
2019-11-26 18:13:54 +00:00
|
|
|
"//simple_make:test_lib",
|
2018-10-23 14:49:20 +00:00
|
|
|
],
|
2018-09-14 13:37:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
test_suite(
|
|
|
|
name = "tests_no_synthetic",
|
2019-01-07 09:31:27 +00:00
|
|
|
tests = tests + ["//configure_gnuplot:configure_libgd_tests"],
|
2018-09-11 11:07:11 +00:00
|
|
|
)
|
|
|
|
|
2019-01-29 13:21:31 +00:00
|
|
|
# As Bazel 0.22.0 is broken for rules_foreign_cc on Windows, we do not want to run any tests
|
|
|
|
# with this version on CI
|
|
|
|
# So we are selecting the list of tests to run according to recorded-in-workspace
|
|
|
|
# Bazel version.
|
|
|
|
# But list of tests can not be empty! Instead, have a test that just prints the Bazel version.
|
|
|
|
windows_tests = select_windows_tests(
|
|
|
|
BAZEL_VERSION,
|
|
|
|
tests + [
|
|
|
|
# "//cmake_synthetic:test_libs",
|
|
|
|
# "//configure_gnuplot:configure_libgd_tests",
|
|
|
|
"//cmake_hello_world_lib/static:test_hello_ninja",
|
2019-06-25 16:31:21 +00:00
|
|
|
"//cmake_hello_world_variant:test_hello_world",
|
2019-01-29 13:21:31 +00:00
|
|
|
# "//cmake_hello_world_lib/static:test_hello_nmake",
|
|
|
|
],
|
|
|
|
[":bazel_version"],
|
|
|
|
)
|
|
|
|
|
2018-09-11 11:07:11 +00:00
|
|
|
test_suite(
|
|
|
|
name = "win_tests",
|
|
|
|
tags = ["windows"],
|
2019-01-29 13:21:31 +00:00
|
|
|
tests = windows_tests,
|
|
|
|
)
|
|
|
|
|
|
|
|
sh_test(
|
|
|
|
name = "bazel_version",
|
|
|
|
srcs = ["print_bazel_version.sh"],
|
|
|
|
args = [BAZEL_VERSION],
|
|
|
|
tags = ["windows"],
|
2018-08-13 10:44:53 +00:00
|
|
|
)
|
2019-01-08 11:25:16 +00:00
|
|
|
|
|
|
|
# On Bazel CI Mac machines, we are using ninja built from sources
|
|
|
|
toolchain(
|
2019-01-18 17:06:10 +00:00
|
|
|
name = "built_ninja_toolchain_osx",
|
|
|
|
exec_compatible_with = [
|
2021-01-25 16:01:46 +00:00
|
|
|
"@platforms//os:macos",
|
2021-01-23 20:28:38 +00:00
|
|
|
"@platforms//cpu:x86_64",
|
2019-01-18 17:06:10 +00:00
|
|
|
],
|
|
|
|
toolchain = "@rules_foreign_cc//tools/build_defs/native_tools:built_ninja",
|
|
|
|
toolchain_type = "@rules_foreign_cc//tools/build_defs:ninja_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "built_ninja_toolchain_linux",
|
|
|
|
exec_compatible_with = [
|
2021-01-23 20:28:38 +00:00
|
|
|
"@platforms//os:linux",
|
|
|
|
"@platforms//cpu:x86_64",
|
2019-01-18 17:06:10 +00:00
|
|
|
],
|
2019-01-08 11:25:16 +00:00
|
|
|
toolchain = "@rules_foreign_cc//tools/build_defs/native_tools:built_ninja",
|
|
|
|
toolchain_type = "@rules_foreign_cc//tools/build_defs:ninja_toolchain",
|
|
|
|
)
|