blob: 263634ed0e9a6399eb8b7f9a5d11a07d69950690 [file] [log] [blame]
agorararmardb5367e22021-04-05 19:12:07 +02001#!/bin/bash
2# SPDX-FileCopyrightText: 2020 Efabless Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15# SPDX-License-Identifier: Apache-2.0
16export TARGET_PATH=$(pwd)
17cd ..
18export PDK_ROOT=$(pwd)/precheck_pdks
19cd $TARGET_PATH/open_mpw_precheck/
20
manarabdelaty2482ace2021-04-19 12:40:33 +020021docker run -v $(pwd):/usr/local/bin -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/open_mpw_precheck:latest bash -c "python3 open_mpw_prechecker.py --skip_drc -p $PDK_ROOT -t $TARGET_PATH -ms develop"
agorararmardb5367e22021-04-05 19:12:07 +020022output=$TARGET_PATH/checks/full_log.log
23
24gzipped_file=$TARGET_PATH/checks/full_log.log.gz
25
26if [[ -f $gzipped_file ]]; then
27 gzip -d $gzipped_file
28fi
29
30grep "Violation Message" $output
31
32cnt=$(grep -c "All Checks PASSED!" $output)
33if ! [[ $cnt ]]; then cnt=0; fi
34if [[ $cnt -eq 1 ]]; then exit 0; fi
manarabdelaty71c0e0a2021-04-08 17:03:47 +020035exit 2