mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
chore: Mark unsafe code as testonly.
We want to ensure that nobody links against testing code in production.
This commit is contained in:
parent
f52bc798c8
commit
044ae636a3
|
@ -13,6 +13,7 @@ cc_library(
|
|||
|
||||
cc_binary(
|
||||
name = "DHT_bootstrap",
|
||||
testonly = 1,
|
||||
srcs = ["DHT_bootstrap.c"],
|
||||
deps = [
|
||||
"//c-toxcore/testing:misc_tools",
|
||||
|
|
|
@ -4,6 +4,7 @@ package(features = ["layering_check"])
|
|||
|
||||
#cc_binary(
|
||||
# name = "cracker",
|
||||
# testonly = 1,
|
||||
# srcs = ["cracker.c"],
|
||||
# copts = ["-fopenmp"],
|
||||
# linkopts = ["-fopenmp"],
|
||||
|
@ -15,6 +16,7 @@ package(features = ["layering_check"])
|
|||
|
||||
cc_binary(
|
||||
name = "cracker_simple",
|
||||
testonly = 1,
|
||||
srcs = ["cracker_simple.c"],
|
||||
deps = [
|
||||
"//c-toxcore/testing:misc_tools",
|
||||
|
@ -25,6 +27,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "minimal-save-generator",
|
||||
testonly = 1,
|
||||
srcs = ["minimal-save-generator.c"],
|
||||
deps = [
|
||||
"//c-toxcore/toxcore:ccompat",
|
||||
|
@ -34,6 +37,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "sign",
|
||||
testonly = 1,
|
||||
srcs = ["sign.c"],
|
||||
copts = ["-w"],
|
||||
deps = [
|
||||
|
@ -45,6 +49,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "strkey",
|
||||
testonly = 1,
|
||||
srcs = ["strkey.c"],
|
||||
copts = ["-w"],
|
||||
deps = [
|
||||
|
@ -56,6 +61,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "save-generator",
|
||||
testonly = 1,
|
||||
srcs = ["save-generator.c"],
|
||||
deps = [
|
||||
"//c-toxcore/testing:misc_tools",
|
||||
|
|
|
@ -22,6 +22,7 @@ sh_test(
|
|||
|
||||
cc_library(
|
||||
name = "misc_tools",
|
||||
testonly = 1,
|
||||
srcs = ["misc_tools.c"],
|
||||
hdrs = ["misc_tools.h"],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
|
@ -34,6 +35,7 @@ cc_library(
|
|||
|
||||
cc_library(
|
||||
name = "trace",
|
||||
testonly = 1,
|
||||
srcs = ["trace.cc"],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
alwayslink = True,
|
||||
|
@ -41,6 +43,7 @@ cc_library(
|
|||
|
||||
cc_binary(
|
||||
name = "DHT_test",
|
||||
testonly = 1,
|
||||
srcs = ["DHT_test.c"],
|
||||
deps = [
|
||||
":misc_tools",
|
||||
|
@ -53,6 +56,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "Messenger_test",
|
||||
testonly = 1,
|
||||
srcs = ["Messenger_test.c"],
|
||||
deps = [
|
||||
":misc_tools",
|
||||
|
@ -63,6 +67,7 @@ cc_binary(
|
|||
|
||||
cc_binary(
|
||||
name = "random_testing",
|
||||
testonly = 1,
|
||||
srcs = ["random_testing.cc"],
|
||||
deps = [
|
||||
":misc_tools",
|
||||
|
|
Loading…
Reference in New Issue
Block a user