Files
OpenSTA/test/regression
T
Jaehyun KimandClaude Opus 4.6 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 <[email protected]>
2026-02-20 01:13:42 +09:00

52 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# CLI launcher for module regression tests.
# Symlinked from <module>/test/regression.
# Usage: ./regression [ctest args...]
# ./regression run all tests for this module
# ./regression -R search_timing run matching test
# ./regression -R search_timing.tcl .tcl suffix is stripped automatically
#
# Modeled after OpenROAD/test/shared/regression.sh
set -e
# Determine module name from current directory.
script_path=$(realpath "$PWD")
sta_home=$(cd "$(dirname "$(realpath "$0")")/.." && pwd)
module=${script_path#${sta_home}/}
module=${module%%/*}
# Find build directory.
if [ -d "${sta_home}/build_test" ]; then
build_dir="${sta_home}/build_test"
elif [ -d "${sta_home}/build" ]; then
build_dir="${sta_home}/build"
else
echo "Error: no build directory found (tried build_test, build)"
exit 1
fi
# Rewrite -R argument: strip .tcl suffix, convert _ to . for ctest name matching.
args=()
next_is_pattern=false
for arg in "$@"; do
if $next_is_pattern; then
arg="${arg%.tcl}"
arg="${arg//_/.}"
next_is_pattern=false
fi
if [ "$arg" = "-R" ]; then
next_is_pattern=true
fi
args+=("$arg")
done
cd "${build_dir}"
# The top-level test/ directory uses label "tcl" (not "module_test").
if [ "$module" = "test" ]; then
ctest -L "tcl" "${args[@]}"
else
ctest -L "module_${module}" "${args[@]}"
fi