Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openroad/scripts/checkpoint.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ proc load_checkpoint {{checkpoint ""}} {
# if no arg or the literal "latest", pick the most-recent .zip
if {$checkpoint eq "" || $checkpoint eq "latest"} {
set zips [lsort -decreasing -index 0 [glob -nocomplain -directory $save_dir -types f *.zip]]
if {![llength $zips]} {utl::error "No checkpoint .zip found in $save_dir"; return}
if {![llength $zips]} {utl::report "No checkpoint .zip found in $save_dir"; return}
set checkpoint [file rootname [file tail [lindex $zips 0]]]
}
utl::report "Loading checkpoint $checkpoint"

# glob search for the checkpoint inside save_dir
set candidates [glob -nocomplain -directory $save_dir -types f "*${checkpoint}*"]
if {![llength $candidates]} {utl::error "No checkpoint found matching: $checkpoint (.zip/.odb)"; return}
if {![llength $candidates]} {utl::report "No checkpoint found matching: $checkpoint (.zip/.odb)"; return}
set ext [file extension [lindex $candidates 0]]
set name [lindex $candidates 0]

Expand All @@ -63,7 +63,7 @@ proc load_checkpoint {{checkpoint ""}} {
read_db $name
set sdc [file rootname $name].sdc
if {[file exists $sdc]} {read_sdc $sdc}
} else {utl::error "Unsupported checkpoint type: $ext"}
} else {utl::report "Unsupported checkpoint type: $ext"}
}

proc load_checkpoint_def { checkpoint_name } {
Expand Down
Loading