Skip to content

Commit d19c999

Browse files
authored
Merge pull request #332 from The-OpenROAD-Project-staging/secure-test-suite-cleanup
Clean up test suite: remove dead code, fix race conditions, centralize helpers
2 parents e4338cf + ba46d45 commit d19c999

92 files changed

Lines changed: 232 additions & 2402 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ doc/messages.txt
3030

3131
# clangd turds
3232
.cache/
33+
34+
# test artifacts
35+
*/test/*.log
36+
Testing/

dcalc/test/cpp/TestDcalc.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,15 +1467,14 @@ TEST_F(ArcDcalcResultTest, CopyResult) {
14671467
EXPECT_FLOAT_EQ(delayAsFloat(copy.loadSlew(1)), 6e-12f);
14681468
}
14691469

1470-
// Test ArcDcalcArg assignment
1471-
TEST_F(ArcDcalcArgTest, Assignment) {
1470+
// Test ArcDcalcArg copy construction with alternate values
1471+
TEST_F(ArcDcalcArgTest, CopyConstructionAltValues) {
14721472
ArcDcalcArg arg;
14731473
arg.setLoadCap(3.5e-12f);
14741474
arg.setInputDelay(1.5e-9f);
14751475
arg.setInSlew(200e-12f);
14761476

1477-
ArcDcalcArg other;
1478-
other = arg;
1477+
ArcDcalcArg other(arg);
14791478
EXPECT_FLOAT_EQ(other.loadCap(), 3.5e-12f);
14801479
EXPECT_FLOAT_EQ(other.inputDelay(), 1.5e-9f);
14811480
EXPECT_FLOAT_EQ(other.inSlewFlt(), 200e-12f);
@@ -2829,14 +2828,13 @@ TEST_F(ArcDcalcArgTest, InputDelayConstructorZero) {
28292828
EXPECT_FLOAT_EQ(arg.inputDelay(), 0.0f);
28302829
}
28312830

2832-
TEST_F(ArcDcalcArgTest, CopyAssignment) {
2831+
TEST_F(ArcDcalcArgTest, CopyConstructionAltValues2) {
28332832
ArcDcalcArg arg;
28342833
arg.setLoadCap(3.0e-12f);
28352834
arg.setInputDelay(2.0e-9f);
28362835
arg.setInSlew(75e-12f);
28372836

2838-
ArcDcalcArg copy;
2839-
copy = arg;
2837+
ArcDcalcArg copy(arg);
28402838
EXPECT_FLOAT_EQ(copy.loadCap(), 3.0e-12f);
28412839
EXPECT_FLOAT_EQ(copy.inputDelay(), 2.0e-9f);
28422840
EXPECT_FLOAT_EQ(copy.inSlewFlt(), 75e-12f);

etc/Build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
1616
numThreads=$(sysctl -n hw.ncpu)
1717
else
1818
cat << EOF
19-
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs"
20-
Defaulting to 2 threads. Use -threads=N to use N threads"
19+
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs
20+
Defaulting to 2 threads. Use -threads=N to use N threads
2121
EOF
2222
numThreads=2
2323
fi

graph/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ sta_module_tests("graph"
55
delay_corners
66
delete_modify
77
incremental
8-
make_verify
98
modify
109
operations
1110
timing_edges

graph/test/graph_bidirect.ok

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ No paths found.
6868
No paths found.
6969
No paths found.
7070
--- Test 3: report with fields ---
71-
Warning 168: graph_bidirect.tcl line 1, unknown field nets.
7271
Startpoint: d1 (input port clocked by clk)
7372
Endpoint: reg2 (rising edge-triggered flip-flop clocked by clk)
7473
Path Group: clk
@@ -80,12 +79,16 @@ Fanout Cap Slew Delay Time Description
8079
0.00 0.00 clock network delay (ideal)
8180
0.00 0.00 v input external delay
8281
1 0.88 0.10 0.00 0.00 v d1 (in)
82+
d1 (net)
8383
0.10 0.00 0.00 v buf1/A (BUF_X1)
8484
2 1.67 0.01 0.06 0.06 v buf1/Z (BUF_X1)
85+
n1 (net)
8586
0.01 0.00 0.06 v or1/A1 (OR2_X1)
8687
2 1.96 0.01 0.05 0.10 v or1/ZN (OR2_X1)
88+
n6 (net)
8789
0.01 0.00 0.10 v and2/A2 (AND2_X1)
8890
1 1.06 0.01 0.03 0.13 v and2/ZN (AND2_X1)
91+
n9 (net)
8992
0.01 0.00 0.13 v reg2/D (DFF_X1)
9093
0.13 data arrival time
9194

graph/test/graph_bidirect.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ report_checks -from [get_ports d3] -to [get_ports q4]
4141
# Test 3: Fields that exercise graph delay/slew queries
4242
#---------------------------------------------------------------
4343
puts "--- Test 3: report with fields ---"
44-
report_checks -fields {slew cap input_pins nets fanout}
44+
report_checks -fields {slew cap input_pins net fanout}
4545

4646
report_checks -format full_clock
4747

graph/test/graph_delete_modify.ok

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Path Type: min
5858
1.03 slack (MET)
5959

6060

61-
Warning 168: graph_delete_modify.tcl line 1, unknown field nets.
6261
Startpoint: d2 (input port clocked by clk)
6362
Endpoint: reg2 (rising edge-triggered flip-flop clocked by clk)
6463
Path Group: clk
@@ -70,12 +69,16 @@ Fanout Cap Slew Delay Time Description
7069
0.00 0.00 clock network delay (ideal)
7170
1.00 1.00 v input external delay
7271
1 0.88 0.10 0.00 1.00 v d2 (in)
72+
d2 (net)
7373
0.10 0.00 1.00 v buf2/A (BUF_X1)
7474
2 1.69 0.01 0.06 1.06 v buf2/Z (BUF_X1)
75+
n2 (net)
7576
0.01 0.00 1.06 v or1/A1 (OR2_X1)
7677
2 2.56 0.01 0.05 1.11 v or1/ZN (OR2_X1)
78+
n6 (net)
7779
0.01 0.00 1.11 v nand1/A2 (NAND2_X1)
7880
1 1.14 0.01 0.02 1.12 ^ nand1/ZN (NAND2_X1)
81+
n7 (net)
7982
0.01 0.00 1.12 ^ reg2/D (DFF_X1)
8083
1.12 data arrival time
8184

graph/test/graph_delete_modify.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ report_checks
2626

2727
report_checks -path_delay min
2828

29-
report_checks -fields {slew cap input_pins nets fanout}
29+
report_checks -fields {slew cap input_pins net fanout}
3030

3131
#---------------------------------------------------------------
3232
# Test 2: Add multiple instances and nets, then delete

graph/test/graph_make_verify.ok

Lines changed: 0 additions & 1 deletion
This file was deleted.

graph/test/graph_make_verify.tcl

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)