Skip to content

Commit

Permalink
Rename es2k_port_manager_dummy (#302)
Browse files Browse the repository at this point in the history
- Renamed es2k_port_manager_dummy.cc to es2k_port_manager_mock.cc.

Signed-off-by: Derek Foster <[email protected]>
  • Loading branch information
ffoulkes authored Nov 1, 2024
1 parent 13f62df commit c051028
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
20 changes: 4 additions & 16 deletions stratum/hal/lib/tdi/es2k/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,17 @@ stratum_cc_library(
)

stratum_cc_library(
name = "es2k_port_manager_dummy",
name = "es2k_port_manager_mock",
testonly = True,
srcs = ["es2k_port_manager_dummy.cc"],
hdrs = ["es2k_port_manager.h"],
srcs = ["es2k_port_manager_mock.cc"],
hdrs = ["es2k_port_manager_mock.h"],
deps = [
":es2k_port_manager_interface",
"//stratum/glue:integral_types",
"//stratum/glue:logging",
"//stratum/glue/status",
"//stratum/glue/status:statusor",
"//stratum/hal/lib/common:common_cc_proto",
"//stratum/hal/lib/tdi:tdi_sde_headers",
"//stratum/lib/channel",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/synchronization",
],
)
Expand All @@ -162,16 +160,6 @@ stratum_cc_library(
],
)

stratum_cc_library(
name = "es2k_port_manager_mock",
testonly = True,
hdrs = ["es2k_port_manager_mock.h"],
deps = [
":es2k_port_manager_dummy",
"@com_google_googletest//:gtest",
],
)

stratum_cc_library(
name = "es2k_switch",
srcs = ["es2k_switch.cc"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
// Copyright 2022-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

// Dummy implementation of ES2K Port Manager.
// Dummy implemementation of Es2kPortManager for use with
// Es2PortManagerMock.

#include "absl/synchronization/mutex.h"
#include "stratum/glue/integral_types.h"
#include "stratum/glue/logging.h"
#include "stratum/glue/status/status.h"
#include "stratum/glue/status/status_macros.h"
#include "stratum/glue/status/statusor.h"
#include "stratum/hal/lib/common/common.pb.h"
#include "stratum/hal/lib/common/utils.h"
#include "stratum/hal/lib/tdi/es2k/es2k_port_manager.h"
#include "stratum/hal/lib/tdi/tdi_status.h"
#include "stratum/lib/channel/channel.h"

namespace stratum {
namespace hal {
Expand Down Expand Up @@ -100,7 +96,7 @@ ::util::Status Es2kPortManager::SetPortLoopbackMode(
// TODO: Check with Sandeep: Is this required?
::util::StatusOr<uint32> Es2kPortManager::GetPortIdFromPortKey(
int device, const PortKey& port_key) {
return 43;
return 42;
}

} // namespace tdi
Expand Down

0 comments on commit c051028

Please sign in to comment.