Skip to content

Commit

Permalink
add unit test for xor check
Browse files Browse the repository at this point in the history
  • Loading branch information
kareefardi committed Nov 12, 2023
1 parent 629b664 commit a8a5f05
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/2041-xor-checker/config.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set ::env(DESIGN_NAME) inverter

6 changes: 6 additions & 0 deletions tests/2041-xor-checker/interactive.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package require openlane;

prep -design $::env(TEST_DIR) {*}$argv

set ::env(signoff_results) $::env(TEST_DIR)
run_klayout_gds_xor
Binary file added tests/2041-xor-checker/inverter.gds
Binary file not shown.
Binary file added tests/2041-xor-checker/inverter.klayout.gds
Binary file not shown.
21 changes: 21 additions & 0 deletions tests/2041-xor-checker/issue_regression.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
import subprocess
import sys

args = sys.argv[1:]
exit_code = args[1]
run_folder = args[0]

assert exit_code != 0, "OpenLane did not throw non zero exit code"
log_path = os.path.join(run_folder, "openlane.log")
assert (
subprocess.call(
[
"grep",
"-i",
"There are XOR differences in the design",
log_path,
]
)
== 0
), "OpenLane did not report the existence of XOR violations correctly"

0 comments on commit a8a5f05

Please sign in to comment.