blob: dcd8a7ab597eb08de673196ef2f5e58bc065f1e2 [file] [log] [blame]
# Copyright 2023 GlobalFoundries PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The top directory where environment will be created.
TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
# A pip `requirements.txt` file.
# https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
REQUIREMENTS_FILE := requirements.txt
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
ENVIRONMENT_FILE := pdk_regression.yml
KLAYOUT_LVS_TESTS := klayout/lvs/testing/
include third_party/make-env/conda.mk
# Lint python code
lint_python: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) flake8 .
################################################################################
## DRC Regression section
################################################################################
#=================================
# ----- test-DRC_regression ------
#=================================
.ONESHELL:
test-DRC-BCDLite-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_drc.py --variant=BCDLite --table=$*
.ONESHELL:
test-DRC-ULL-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_drc.py --variant=ULL --table=$*
.ONESHELL:
test-DRC-IC-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_drc.py --variant=IC --table=$*
#=================================
# -------- test-DRC-switch -------
#=================================
# LVS main testing
test-DRC-switch: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v
################################################################################
## LVS Regression section
################################################################################
#=================================
# ----- test-LVS_regression ------
#=================================
.ONESHELL:
test-LVS-BCDLite-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_lvs.py --variant=BCDLite --device=$*
.ONESHELL:
test-LVS-ULL-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_lvs.py --variant=ULL --device=$*
.ONESHELL:
test-LVS-IC-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 ./scripts/run_regression_lvs.py --variant=IC --device=$*
#=================================
# -------- test-LVS-switch -------
#=================================
# LVS main testing
test-LVS-switch: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v