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>
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>
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>
- 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>
- 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>
Negate conditions in empty if-body assertions so the FAIL message
is printed directly (e.g. `if { $x != 0 } { } else { puts FAIL }`
becomes `if { $x == 0 } { puts FAIL }`). Remove dead if/else blocks
where both branches were empty, strip meaningless status-only puts
from Tcl tests and their .ok golden files, and wrap a long line in
search_report_gated_datacheck.tcl to stay within 80 columns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Remove useless empty-body if-blocks that check file size/existence without
doing anything, replacing them with meaningful puts output where appropriate.
Split monolithic verilog test files into individual per-test files with
their own .ok golden files. Update .ok files to match actual output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Document why each catch block is needed across 48 test files,
covering liberty, search, sdc, spice, network, parasitics, util,
and verilog modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unnecessary catch blocks in network, parasitics, sdc, spice,
and util test modules. Add report_checks after set_wire_load_model
in parasitics_wireload.tcl to verify timing changes per wireload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
I'm looking to try to have unified thread pool with OpenSTA and OpenROAD
and having this method would make it easier to understand how much
parallelism is available in the pool.
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
This prevents the thundering herd problem and should increase the
scalability of the DispatchQueue significantly.
Additionally the code the DispatchQueue was taken from made this
improvement five years ago:
79ad8a539d
Signed-off-by: Drew Lewis <cannada@google.com>
* Use a unique_ptr to avoid leaks
* Use memmove instead of memcopy
As both arguments can overlap, use memmove instead of memcopy
* Fix code style issues
When allocating a new string object in tcl you need increment and
then decremenet the ref counter in order for objects to be correctly
collected.
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
commit 1abf72bc3430d34a51d82992f1c753f0274a662a
Author: James Cherry <cherry@parallaxsw.com>
Date: Mon Jan 27 08:01:04 2025 -0700
rm unused lib visitors
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 1e76acfc7829a8ba82f96d369fae6225a7361844
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 21:15:46 2025 -0700
verilog/sdf stream->is_open
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 19:54:41 2025 -0700
leak
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit b992ed1124a862cb04f0c7617a4575f916c3fe01
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 16:39:16 2025 -0700
liberty mv string_buf to scanner
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 894cbfa5d5b731738dcc60d492689fad9d13bd40
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 16:29:42 2025 -0700
liberty use regex to parse include file
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 176225849d3fcac0b2be1a5b623270c386daed3d
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 15:48:09 2025 -0700
liberty include filename
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 516e12721d7185015d8c29e8b16fa185f0f46983
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 15:31:18 2025 -0700
liberty include
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 32098a2159798dfbb80140927949bb36f480093d
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 15:01:47 2025 -0700
liberty include
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 880214e632d756c3199b000fee88fd4fdffac371
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 13:55:02 2025 -0700
liberty include
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit ad1efca842a6d7ee608ffd5a19a69885786b77fa
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 10:11:07 2025 -0700
liberty passes all but include
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd
Author: James Cherry <cherry@parallaxsw.com>
Date: Sun Jan 26 10:01:08 2025 -0700
liberty parser use class compiles
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit 02dea0ff753b0fa12f280661a46e2c0ef2432357
Author: James Cherry <cherry@parallaxsw.com>
Date: Sat Jan 25 19:08:06 2025 -0700
liberty parser compiles
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
* Add error/warning suppression with `suppress_msg` and `unsuppress_msg` commands
* Fixes
* Merge docs
* Fixes
* Remove optional arg from class
* Add where to find message codes
* Update docs
* Requested fixes
* Deal with errors on the TCL side instead of C++ side
* Update ok file
* Add back in C++ side error suppression and have tests for both C++/TCL side suppression
* Requested fixes to ChangeLog and unifying suppression in C++/TCL
* Requested fixes
* Requested test adjustments
* Smallfixes
* Smallfixes
* Another smallfix
commit b08f24685f52d242985c1c1f48c5b3821728d355
Author: James Cherry <cherry@parallaxsw.com>
Date: Thu Jan 2 15:18:46 2025 -0800
tcl9 conditional support
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit bc0ebaa856196d09ea95cbd4e12e4d88b8a8d13e
Author: James Cherry <cherry@parallaxsw.com>
Date: Thu Jan 2 11:33:46 2025 -0800
tcl9 partial support
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>