chipfoundry-cli 1.2.2__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/PKG-INFO +1 -1
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/chipfoundry_cli/main.py +41 -8
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/pyproject.toml +1 -1
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/LICENSE +0 -0
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/README.md +0 -0
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/chipfoundry_cli/__init__.py +0 -0
- {chipfoundry_cli-1.2.2 → chipfoundry_cli-1.2.4}/chipfoundry_cli/utils.py +0 -0
|
@@ -1932,7 +1932,7 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
1932
1932
|
if not librelane_venv.exists():
|
|
1933
1933
|
console.print("[red]✗[/red] LibreLane not installed")
|
|
1934
1934
|
console.print("[yellow]Run 'cf setup --only-openlane' to install LibreLane[/yellow]")
|
|
1935
|
-
|
|
1935
|
+
sys.exit(1)
|
|
1936
1936
|
|
|
1937
1937
|
# Fetch versions from upstream
|
|
1938
1938
|
console.print("[dim]Fetching version information from cf-cli repository...[/dim]")
|
|
@@ -1976,7 +1976,7 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
1976
1976
|
if force_nix_flag and not use_nix:
|
|
1977
1977
|
console.print("[red]✗[/red] Nix not available or cannot access LibreLane flake")
|
|
1978
1978
|
console.print("[yellow]Install Nix from: https://librelane.readthedocs.io[/yellow]")
|
|
1979
|
-
|
|
1979
|
+
sys.exit(1)
|
|
1980
1980
|
|
|
1981
1981
|
# Check if Docker is available
|
|
1982
1982
|
if not use_nix and (force_docker_flag or not force_nix_flag):
|
|
@@ -1993,7 +1993,7 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
1993
1993
|
if force_docker_flag and not use_docker:
|
|
1994
1994
|
console.print("[red]✗[/red] Docker not available")
|
|
1995
1995
|
console.print("[yellow]Install Docker from: https://docker.com[/yellow]")
|
|
1996
|
-
|
|
1996
|
+
sys.exit(1)
|
|
1997
1997
|
|
|
1998
1998
|
# Error if neither is available
|
|
1999
1999
|
if not use_nix and not use_docker:
|
|
@@ -2002,7 +2002,7 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2002
2002
|
console.print(" 1. [cyan]Nix[/cyan] - Install from: https://librelane.readthedocs.io")
|
|
2003
2003
|
console.print(" 2. [cyan]Docker[/cyan] - Install from: https://docker.com")
|
|
2004
2004
|
console.print("\nAfter installing either one, try again.")
|
|
2005
|
-
|
|
2005
|
+
sys.exit(1)
|
|
2006
2006
|
|
|
2007
2007
|
execution_method = "Nix" if use_nix else "Docker"
|
|
2008
2008
|
|
|
@@ -2100,6 +2100,18 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2100
2100
|
'-m', str(pdk_root),
|
|
2101
2101
|
'-m', str(caravel_root),
|
|
2102
2102
|
'--dockerized',
|
|
2103
|
+
]
|
|
2104
|
+
|
|
2105
|
+
# Add --docker-no-tty if not running in a TTY (e.g., CI environments)
|
|
2106
|
+
try:
|
|
2107
|
+
import sys
|
|
2108
|
+
if not sys.stdin.isatty():
|
|
2109
|
+
cmd.append('--docker-no-tty')
|
|
2110
|
+
except:
|
|
2111
|
+
# If we can't detect TTY, assume non-TTY (safer for CI)
|
|
2112
|
+
cmd.append('--docker-no-tty')
|
|
2113
|
+
|
|
2114
|
+
cmd.extend([
|
|
2103
2115
|
'--run-tag', tag,
|
|
2104
2116
|
'--manual-pdk',
|
|
2105
2117
|
'--pdk-root', str(pdk_root),
|
|
@@ -2107,7 +2119,7 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2107
2119
|
'--ef-save-views-to', str(project_root_path),
|
|
2108
2120
|
'--overwrite',
|
|
2109
2121
|
config_file
|
|
2110
|
-
]
|
|
2122
|
+
])
|
|
2111
2123
|
|
|
2112
2124
|
# Run LibreLane
|
|
2113
2125
|
|
|
@@ -2128,9 +2140,11 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2128
2140
|
console.print(f"[dim]Results saved to: {project_root_path}/runs/{macro}/{tag}/[/dim]")
|
|
2129
2141
|
elif returncode == -2 or returncode == 130: # SIGINT
|
|
2130
2142
|
console.print("\n[yellow]⚠[/yellow] Hardening interrupted by user")
|
|
2143
|
+
sys.exit(130)
|
|
2131
2144
|
else:
|
|
2132
2145
|
console.print(f"\n[red]✗[/red] [bold red]Hardening failed with exit code {returncode}[/bold red]")
|
|
2133
2146
|
console.print(f"[yellow]Check logs in: {project_root_path}/runs/{macro}/{tag}/[/yellow]")
|
|
2147
|
+
sys.exit(returncode)
|
|
2134
2148
|
|
|
2135
2149
|
except KeyboardInterrupt:
|
|
2136
2150
|
console.print("\n[yellow]⚠[/yellow] Hardening interrupted by user")
|
|
@@ -2385,9 +2399,11 @@ def precheck(project_root, disable_lvs, checks, dry_run):
|
|
|
2385
2399
|
console.print("[green]✓[/green] Precheck passed!")
|
|
2386
2400
|
elif returncode == -2 or returncode == 130: # SIGINT
|
|
2387
2401
|
console.print("[yellow]⚠[/yellow] Precheck interrupted by user")
|
|
2402
|
+
sys.exit(130)
|
|
2388
2403
|
else:
|
|
2389
2404
|
console.print(f"[red]✗[/red] Precheck failed with exit code {returncode}")
|
|
2390
2405
|
console.print(f"[yellow]Check the output above for details[/yellow]")
|
|
2406
|
+
sys.exit(returncode)
|
|
2391
2407
|
|
|
2392
2408
|
except KeyboardInterrupt:
|
|
2393
2409
|
console.print("\n[yellow]⚠[/yellow] Precheck interrupted by user")
|
|
@@ -2521,12 +2537,12 @@ def verify(test, project_root, sim, list_tests, run_all, tag, dry_run):
|
|
|
2521
2537
|
if not caravel_root.exists():
|
|
2522
2538
|
console.print(f"[red]✗[/red] Caravel not found at {caravel_root}")
|
|
2523
2539
|
console.print("[yellow]Run 'cf setup --only-caravel' to install[/yellow]")
|
|
2524
|
-
|
|
2540
|
+
sys.exit(1)
|
|
2525
2541
|
|
|
2526
2542
|
if not (pdk_root / pdk).exists():
|
|
2527
2543
|
console.print(f"[red]✗[/red] PDK not found at {pdk_root / pdk}")
|
|
2528
2544
|
console.print("[yellow]Run 'cf setup --only-pdk' to install[/yellow]")
|
|
2529
|
-
|
|
2545
|
+
sys.exit(1)
|
|
2530
2546
|
|
|
2531
2547
|
# Build command
|
|
2532
2548
|
caravel_cocotb_bin = venv_cocotb / 'bin' / 'caravel_cocotb'
|
|
@@ -2576,7 +2592,22 @@ def verify(test, project_root, sim, list_tests, run_all, tag, dry_run):
|
|
|
2576
2592
|
cmd.extend(['-tl', yaml_path])
|
|
2577
2593
|
elif tag:
|
|
2578
2594
|
# User specified a custom test list
|
|
2579
|
-
|
|
2595
|
+
# Check if tag is a directory or file path
|
|
2596
|
+
tag_path = cocotb_dir / tag
|
|
2597
|
+
if tag_path.is_dir():
|
|
2598
|
+
# If it's a directory, construct the YAML file path based on simulation type
|
|
2599
|
+
yaml_file = f'{tag}_gl.yaml' if sim.lower() == 'gl' else f'{tag}.yaml'
|
|
2600
|
+
yaml_path = f'{tag}/{yaml_file}'
|
|
2601
|
+
# Verify the file exists
|
|
2602
|
+
yaml_full_path = tag_path / yaml_file
|
|
2603
|
+
if not yaml_full_path.exists():
|
|
2604
|
+
console.print(f"[red]✗[/red] Test list file not found: {yaml_full_path}")
|
|
2605
|
+
console.print(f"[yellow]Expected: {yaml_path}[/yellow]")
|
|
2606
|
+
sys.exit(1)
|
|
2607
|
+
cmd.extend(['-tl', yaml_path])
|
|
2608
|
+
else:
|
|
2609
|
+
# It's already a file path, use it as-is
|
|
2610
|
+
cmd.extend(['-tl', tag])
|
|
2580
2611
|
|
|
2581
2612
|
if sim.lower() == 'gl':
|
|
2582
2613
|
cmd.extend(['-sim', 'GL'])
|
|
@@ -2600,9 +2631,11 @@ def verify(test, project_root, sim, list_tests, run_all, tag, dry_run):
|
|
|
2600
2631
|
console.print(f"\n[green]✓[/green] Verification passed!")
|
|
2601
2632
|
elif returncode == -2 or returncode == 130: # SIGINT
|
|
2602
2633
|
console.print("\n[yellow]⚠[/yellow] Verification interrupted by user")
|
|
2634
|
+
sys.exit(130)
|
|
2603
2635
|
else:
|
|
2604
2636
|
console.print(f"\n[red]✗[/red] Verification failed with exit code {returncode}")
|
|
2605
2637
|
console.print(f"[yellow]Check logs in: {cocotb_dir}[/yellow]")
|
|
2638
|
+
sys.exit(returncode)
|
|
2606
2639
|
|
|
2607
2640
|
except KeyboardInterrupt:
|
|
2608
2641
|
console.print("\n[yellow]⚠[/yellow] Verification interrupted by user")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|