Skip to content

Commit e3bc5cd

Browse files
committed
dbSta: rename StalePrevPath test and derive verilog filename from gtest info
Tighten the test-name <-> verilog-file coupling so future stale-path variants can just drop a new TestDbSta_<Name>.v alongside a new TEST_F without touching the data list: use gtest's current_test_info() at runtime to build the filename, matching the pattern already used in src/rsz/test/cpp/TestInsertBuffer.cpp. Test renamed StalePrevPathAfterUpdateTiming -> StalePrevPath (the "AfterUpdateTiming" qualifier was redundant with the flow header). Verilog renamed TestDbSta_StalePath.v -> TestDbSta_StalePrevPath.v to match. Signed-off-by: Minju Kim <mkim@precisioninno.com>
1 parent 719f733 commit e3bc5cd

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/dbSta/test/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ cc_test(
292292
"Nangate45/Nangate45.lef",
293293
"Nangate45/Nangate45_typ.lib",
294294
"cpp/TestDbSta_0.v",
295-
"cpp/TestDbSta_StalePath.v",
295+
"cpp/TestDbSta_StalePrevPath.v",
296296
],
297297
deps = [
298298
"//src/dbSta",

src/dbSta/test/cpp/TestDbSta.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ TEST_F(TestDbSta, TestHierarchyConnectivity)
104104

105105
// Regression for #10210 (stale Path* dereference in rsz).
106106
//
107-
// Topology (TestDbSta_StalePath.v):
107+
// Topology (TestDbSta_StalePrevPath.v):
108108
// clk -> b1(BUF) -> inv1(INV) -> nd1(NAND2) -> out1
109109
// nd1/A2 <- in2
110110
//
@@ -115,9 +115,12 @@ TEST_F(TestDbSta, TestHierarchyConnectivity)
115115
// 4. Assert the captured Path's prev slot has been recycled: pin()
116116
// decodes to data that belongs to a different instance than nd1's
117117
// real input.
118-
TEST_F(TestDbSta, StalePrevPathAfterUpdateTiming)
118+
TEST_F(TestDbSta, StalePrevPath)
119119
{
120-
readVerilogAndSetup("TestDbSta_StalePath.v");
120+
const auto* test_info = testing::UnitTest::GetInstance()->current_test_info();
121+
const std::string test_name
122+
= std::string(test_info->test_suite_name()) + "_" + test_info->name();
123+
readVerilogAndSetup(test_name + ".v");
121124
sta_->updateTiming(true);
122125

123126
Network* network = sta_->network();
File renamed without changes.

0 commit comments

Comments
 (0)