Skip to content

Commit

Permalink
chore(agw): Bazelify test_s1ap_mme_handlers_with_injected_state (#13334)
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Kreutzer <lars.kreutzer@tngtech.com>
  • Loading branch information
LKreutzer committed Jul 25, 2022
1 parent 53a453f commit 6f443cc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
4 changes: 0 additions & 4 deletions bazel/scripts/check_c_cpp_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ DENY_LIST_NOT_YET_BAZELIFIED=(
# TODO: GH12771 add MME_BENCHMARK support and bazelify files
"./lte/gateway/c/core/oai/tasks/mme_app/experimental/mme_app_serialization.hpp"
"./lte/gateway/c/core/oai/tasks/mme_app/experimental/mme_app_serialization.cpp"
# TODO: GH12775 tests that need to be bazelified
"./lte/gateway/c/core/oai/test/s1ap_task/mock_s1ap_op.h"
"./lte/gateway/c/core/oai/test/s1ap_task/mock_s1ap_op.cpp"
"./lte/gateway/c/core/oai/test/s1ap_task/test_s1ap_mme_handlers_with_injected_state.cpp"
)

DENY_LIST=( "${DENY_LIST_NOT_RELEVANT[@]}" "${DENY_LIST_NOT_YET_BAZELIFIED[@]}" )
Expand Down
26 changes: 26 additions & 0 deletions lte/gateway/c/core/oai/test/s1ap_task/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,29 @@ cc_test(
"@com_google_googletest//:gtest_main",
],
)

cc_library(
name = "mock_s1ap_op",
testonly = True,
srcs = ["mock_s1ap_op.cpp"],
hdrs = ["mock_s1ap_op.h"],
deps = [
"//lte/gateway/c/core:lib_agw_of",
"//lte/gateway/c/core/common:common_defs",
],
)

cc_test(
name = "s1ap_mme_handlers_with_injected_state_test",
size = "small",
srcs = ["test_s1ap_mme_handlers_with_injected_state.cpp"],
deps = [
":mock_s1ap_op",
":s1ap_mme_test_utils",
"//lte/gateway/c/core:lib_agw_of",
"//lte/gateway/c/core/common:dynamic_memory_check",
"//lte/gateway/c/core/oai/lib/bstr:bstrlib",
"//lte/gateway/c/core/oai/test/mock_tasks",
"@com_google_googletest//:gtest_main",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
namespace magma {
namespace lte {

extern task_zmq_ctx_t task_zmq_ctx_main_s1ap;
task_zmq_ctx_t task_zmq_ctx_main_s1ap;

status_code_e setup_new_association(s1ap_state_t* state,
sctp_assoc_id_t assoc_id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern task_zmq_ctx_t task_zmq_ctx_mme;
namespace magma {
namespace lte {

task_zmq_ctx_t task_zmq_ctx_main_s1ap;
extern task_zmq_ctx_t task_zmq_ctx_main_s1ap;

static int handle_message(zloop_t* loop, zsock_t* reader, void* arg) {
MessageDef* received_message_p = receive_msg(reader);
Expand Down

0 comments on commit 6f443cc

Please sign in to comment.