Commit Graph

185 Commits

Author SHA1 Message Date
Jaehyun Kim 992a1dcec5 Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenSTA into secure-sta-test-by-opus
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-20 21:56:12 +09:00
Vitor Bandeira 69e11bbd0d
Merge pull request #300 from The-OpenROAD-Project-staging/secure-sta-test-suite
test: Add test infrastructure and sample test cases
2026-03-18 08:54:06 -03:00
dsengupta0628 d213f0fa71 Merge remote-tracking branch 'upstream/master' 2026-03-16 17:50:53 +00:00
Jaehyun Kim e7b861051d test: Fix post-merge build errors and regolden .ok files
After merging upstream changes, fix all build errors in C++ test files
and regolden Tcl test golden files to match updated code output.

Build fixes:
- dcalc/test/cpp/TestDcalc.cc: Fix const char* loop iterations, use
  EXPECT_NEAR for uninitialized subnormal float comparison
- liberty/test/cpp/TestLibertyStaBasicsB.cc: Wrap tests using removed
  LibertyBuilder() default constructor in #if 0
- liberty/test/cpp/TestLibertyStaCallbacks.cc: Fix LibertyBuilder()
  call to use sta_->debug()/report(); wrap old visitor tests in #if 0
- search/test/cpp/TestSearchStaDesignB.cc: Fix pg->name() nullptr
  comparison (now returns std::string&)
- search/test/cpp/TestSearchStaInit.cc: Fix 5 clkPinsInvalid/isIdealClock
  tests to expect throw (API now requires linked network)

Tcl test fixes:
- Remove calls to removed APIs: report_path_end_header/footer, report_path_end2
  from 6 search test scripts; regolden their .ok files
- Regolden .ok files for liberty (15), graph (1), network (8),
  parasitics (3), sdc (3), util (2), verilog (8) modules to reflect
  upstream format changes (timing arcs output, pin ordering, spacing)

All 6103 tests now pass.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 17:11:08 +09:00
Jaehyun Kim 00e83881b2 test: Remove duplicate codes in TestPower.cc
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 11:27:00 +09:00
Jaehyun Kim a5f8e9c3ab test: Fix test failures after master merge
Update test code to match API changes from upstream master:

- TestGraph.cc: Fix makeScenes() call to pass reference instead of pointer
- TestLibertyClasses.cc: Fix ScaleFactorType wire_res/wire_cap name mapping;
  fix TablePtr usage by calling .get() where const TableModel* is expected
- TestLibertyClasses.cc: Update liberty_read_nangate.ok for new timing arc output
- TestPower.cc: Replace PwrActivityOrigin::defaulted with ::unknown;
  fix isSet() expectations (unknown origin returns false)
- TestSdcClasses.cc, TestSdf.cc, TestUtil.cc, TestSpice.cc:
  Fix RiseFall::to_string() expected values from short form ("^"/"v")
  to long form ("rise"/"fall")
- TestUtil.cc: Remove tests for deleted StringVector/split/TokenParser
  and StringSet::deleteContents (removed from master)
- TestSpice.cc: Replace StdStringSeq with StringSeq
- helpers.tcl: Use pwd-based result_dir so module tests write results
  to their own test/results/ directory
- verilog_bus.ok: Update golden file for new port ordering from master

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 10:16:27 +09:00
Jaehyun Kim d4ad9312ea Merge origin/master into secure-sta-test-suite
Resolve add/add conflict in test/helpers.tcl by merging both versions:
- Keep master's report_file, report_file_filter, sort_objects functions
- Keep branch's diff_files, diff_files_sorted functions
- Use master's result_dir setup with branch's mkdir logic in make_result_file

Resolve content conflict in test/regression by keeping branch's
bash/ctest launcher over master's Tcl regression script.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 09:48:28 +09:00
James Cherry 981f44db68 update copyright
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-10 14:57:45 -07:00
Matt Liberty 38f7af09cc Merge remote-tracking branch 'upstream/master' into upstream 2026-03-09 17:58:52 +00:00
Matt Liberty b5b2f540c0 Merge remote-tracking branch 'upstream/master' into update-upstream
Get levelizations fixes

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-03-07 19:26:14 +00:00
James Cherry 60f6e5963f rm PwrActivityOrigin::defaulted
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-07 12:21:31 -07:00
James Cherry 741bf4d561 rm using std::
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-02 12:13:13 -08:00
James Cherry a6425a3364 FindMessages criticalError
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-28 14:51:09 -08:00
James Cherry c010a0f99e liberty reader rewrite
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-27 17:12:50 -08:00
Jaehyun Kim 92bb9b8ec9 test: Add comprehensive test infrastructure and test cases across all OpenSTA modules
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 12:59:25 +09:00
Jaehyun Kim 43da2d59a4 power: Revert a missing constructor bug fix, which should be fixed in the upstream repo
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 12:54:58 +09:00
Jaehyun Kim 643f09f074 test: Rebase failed regressions after master merge
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 12:13:04 +09:00
Jaehyun Kim 55259b894b test: Add `save_ok` script
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 11:12:27 +09:00
Jaehyun Kim 9bbac53157 test: Make ctest run C++ unit tests
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 09:51:10 +09:00
Jaehyun Kim b98c2d0bcc test: harden module Tcl coverage tests
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-24 14:08:56 +09:00
Jaehyun Kim 8adbcc0d6d Merge upstream STA update and adapt all tests to new API
Major upstream refactoring: Corner→Scene, Mode architecture, warning
format change (Warning ID:), command renames, and many API signature
changes. Adapted all C++ test files and TCL test scripts/expected
output files to pass with the new API. 6159/6159 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 23:05:29 +09:00
Jaehyun Kim 7173c10cc1 test: strengthen assertions, add sorted SDC diff, and clean up tests
- Split oversized test files to stay under 5,000 lines per file:
  TestSdc.cc → TestSdcClasses.cc, TestSdcStaInit.cc, TestSdcStaDesign.cc
  TestSearchStaDesign.cc → TestSearchStaDesign.cc, TestSearchStaDesignB.cc
  TestLibertyStaBasics.cc → TestLibertyStaBasics.cc, TestLibertyStaBasicsB.cc
  TestNetwork.cc → TestNetwork.cc, TestNetworkB.cc
- Replace ~200+ (void) casts with proper EXPECT_* assertions across all
  C++ test files (dcalc, liberty, network, sdc, search, power, spice, util)
- Remove ~55 SUCCEED() and EXPECT_TRUE(true) no-op assertions
- Fix 6 load-only Tcl tests by adding diff_files verification with
  22 new .sdcok golden reference files
- Delete 7 orphan .ok files with no matching .tcl tests
- Add how_to_write_good_tests.md and TODO6.md documenting test quality rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 17:36:45 +09:00
Jaehyun Kim b6d598a119 test: strengthen assertions, add sorted SDC diff, and clean up tests
- Add diff_files_sorted to test/helpers.tcl for hash-order-independent
  SDC comparison (fixes non-deterministic write_sdc output ordering)
- Use diff_files_sorted in sdc_derate_disable_deep and
  sdc_port_delay_advanced tests
- Remove stale coverage percentages from test comments (Comment 1)
- Remove unnecessary catch blocks in search property tests (Comment 3)
- Strengthen load-only tests with actual data verification (Comment 8)
- Remove orphan .ok files for deleted monolithic tests (Comment 9)
- Add golden .sdcok/.libok/.vok/.sdfok files for SDC/liberty/verilog
  write-and-diff tests
- Add -B (clean rebuild) option to make_coverage_report.sh
- Replace (void) casts and EXPECT_TRUE(true) with real assertions in
  TestSdc.cc and TestVerilog.cc

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 11:50:23 +09:00
Jaehyun Kim e57c8043cd test: Apply review feedback - part3
Remove unnecessary catch blocks from Tcl test files across all modules,
add report_checks after each set_wire_load_model in liberty_wireload,
rewrite liberty_sky130_corners for actual multi-corner timing analysis
with define_corners, and expand C++ tests (TestSearchIncremental 8→36,
TestPower 71→96, TestSpice 98→126 tests).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:05:07 +09:00
Jaehyun Kim 547737f71e test: Apply review feedback - part2
- Remove stale line-number coverage comments (# Targets: line NNN, hit=0)
- Remove useless file-existence checks from verilog/sdf tests
- Delete 21 orphaned dcalc Tcl tests (C++ tests already cover them)
- Rename liberty_ccsn_ecsm -> liberty_ccsn (no ECSM libs available)
- Fix liberty_sky130_corners to use define_corners/-corner for real multi-corner testing
- Add report_checks per wireload model in liberty_wireload
- Fix test/regression to work from test/ directory (label mismatch)
- Refactor all module CMakeLists.txt with sta_module_tests() macro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 01:13:42 +09:00
Jaehyun Kim 6799b1909a test: Apply review feedback - part1
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-19 23:30:23 +09:00
Martin Povišer 0d34825700 Merge remote-tracking branch 'parallax/rel_3.0' into pull-rel_3.0 2026-02-19 11:31:08 +01:00
Jaehyun Kim b77779f7a6 test: Refactoring. Standardize Google Test naming conventions by removing `R#_` prefixes, improve temporary file creation with `mkstemp`, etc
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-13 20:36:42 +09:00
Jaehyun Kim d6c09372ba test: Initial upload
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-13 19:19:09 +09:00
James Cherry 4c157f46ee InternalPower::related_pg_port string->port
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:33:09 -07:00
James Cherry 4823a4e1e0 Merge branch 'master' into rel_3.0
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:11:44 -07:00
James Cherry f08cdd165a Power::findLeakagePower
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:03:34 -07:00
Matt Liberty e872c55bfe Merge remote-tracking branch 'parallax/master' 2026-02-05 04:12:23 +00:00
James Cherry 7cb71fe766 liberty memory management
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-04 18:33:32 -07:00
James Cherry 33e480a6c1 liberty memory management
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-04 18:33:04 -07:00
James Cherry c7f4bb3bb3 Merge branch 'master' into rel_3.0
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-04 17:36:33 -07:00
James Cherry cde32a1572 leakage power well pg pin resolves #377
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-04 16:50:28 -07:00
Matt Liberty ec62b3a5b9 Merge remote-tracking branch 'parallax/master' 2026-02-04 07:51:04 +00:00
James Cherry 98bffa3b95 Merge branch 'master' into rel_3.0 2026-01-29 19:47:56 -07:00
James Cherry 0c6c3d3d35 leakage power if uncond, ignore cell power resolves #373
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-29 19:44:18 -07:00
James Cherry b8c6b56736 Merge branch 'master' into rel_3.0
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-28 12:18:14 -07:00
Matt Liberty 087793e8a0 Merge remote-tracking branch 'parallax/master' 2026-01-28 19:13:58 +00:00
James Cherry 25ea7a3795 network edits invalidate power resolves #371
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-28 12:06:40 -07:00
James Cherry 24f9ee3f20 Merge branch 'master' into rel_3.0 2026-01-15 15:01:40 -07:00
James Cherry 0429ac324b rm dbg print
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-15 15:00:48 -07:00
James Cherry 5314489195 rebase
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-13 09:43:13 -07:00
James Cherry d42b821c00 rel 3.0
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-13 09:36:45 -07:00
James Cherry b58ff962d6 msg id conflict
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-11 15:01:04 -08:00
Matt Liberty 94dc4a04c6 Merge remote-tracking branch 'parallax/master' 2026-01-10 18:17:05 +00:00
James Cherry 3618838be0 read_vcd missing $dumpvars resolves #360
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-10 09:10:42 -08:00