|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +################################################################################ |
| 4 | +## Authors: Mateus Fogaca, Eder Matheus Monteiro |
| 5 | +## (Advisor: Ricardo Reis) |
| 6 | +## |
| 7 | +## BSD 3-Clause License |
| 8 | +## |
| 9 | +## Copyright (c) 2019, Federal University of Rio Grande do Sul (UFRGS) |
| 10 | +## All rights reserved. |
| 11 | +## |
| 12 | +## Redistribution and use in source and binary forms, with or without |
| 13 | +## modification, are permitted provided that the following conditions are met: |
| 14 | +## |
| 15 | +## * Redistributions of source code must retain the above copyright notice, this |
| 16 | +## list of conditions and the following disclaimer. |
| 17 | +## |
| 18 | +## * Redistributions in binary form must reproduce the above copyright notice, |
| 19 | +## this list of conditions and the following disclaimer in the documentation |
| 20 | +## and#or other materials provided with the distribution. |
| 21 | +## |
| 22 | +## * Neither the name of the copyright holder nor the names of its |
| 23 | +## contributors may be used to endorse or promote products derived from |
| 24 | +## this software without specific prior written permission. |
| 25 | +## |
| 26 | +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 27 | +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 28 | +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 29 | +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 30 | +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 31 | +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 32 | +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 33 | +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 34 | +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 35 | +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 36 | +## POSSIBILITY OF SUCH DAMAGE. |
| 37 | +################################################################################ |
| 38 | + |
| 39 | +GREEN=0 |
| 40 | +RED=2 |
| 41 | + |
| 42 | +if [ "$#" -ne 2 ]; then |
| 43 | + exit 2 |
| 44 | +fi |
| 45 | + |
| 46 | +binary=$1 |
| 47 | +testdir=$2 |
| 48 | + |
| 49 | +ln -s ../test_rows_origin/input.* . |
| 50 | + |
| 51 | +$binary -no_init < run.tcl > test.log 2>&1 |
| 52 | + |
| 53 | +rm ./input.lef |
| 54 | +rm ./input.def |
| 55 | + |
| 56 | +grep -q "Master FILLCELL_X1x not found" ./test.log |
| 57 | +status=$? |
| 58 | + |
| 59 | +mkdir -p ../../results/test_invalid_cells/ |
| 60 | +cp test.log ../../results/test_invalid_cells/tapcell.log |
| 61 | + |
| 62 | +if [ $status -eq 0 ]; then |
| 63 | + exit $GREEN |
| 64 | +else |
| 65 | + echo " - [ERROR] Test failed. Check $testdir/src/check_invalid_cells/test.log" |
| 66 | + exit $RED |
| 67 | +fi |
0 commit comments