openbsd-ports/devel/gputils/patches/patch-gpasm_testsuite_test
naddy cfb6182a3f Import gputils 0.11.7.
Submitted by Andrew Dalgleish <openbsd@ajd.net.au>.

GPUTILS is a collection of tools for the Microchip (TM) PIC
microcontrollers. It includes gpasm, gplink, and gplib.
2003-11-03 01:02:34 +00:00

89 lines
2.4 KiB
Plaintext

$OpenBSD: patch-gpasm_testsuite_test,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
--- gpasm/testsuite/test.orig 2003-03-14 17:44:49.000000000 +1100
+++ gpasm/testsuite/test 2003-10-19 20:15:57.000000000 +1000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! /bin/sh
# test tests gpasm
# Copyright (C) 2001, 2002, 2003
@@ -48,7 +48,7 @@ binexists() {
return 1
fi
echo "testing for $1"
- if !(test -e $1); then
+ if ! test -e $1; then
echo "$1 not found. Aborting."
return 1
else
@@ -106,7 +106,7 @@ test_gpasm_sub() {
return 1
fi
- if !(test -d $1); then
+ if ! test -d $1; then
echo "$1 not found. Aborting."
return 1
fi
@@ -123,11 +123,11 @@ test_gpasm_sub() {
# create the test directory if it doesn't already exist
test -d $TESTDIR || mkdir $TESTDIR || exit 1
cd $TESTDIR
- rm -f *.asm
+ rm -f *.{asm,inc}
cp ../asmfiles/* .
# test all of the asm files
- for x in `ls *.asm`
+ for x in `ls *.asm | sort`
do
# split the base file name from the extension
for basefilename in `echo $x | tr -s "." " "`
@@ -176,9 +176,9 @@ test_gpasm_sub() {
echo "$errortested files tested with intentional errors"
echo "$notcompiled generated errors during compilation"
echo
- if !(test $tested=$passed); then
+ if ! test $tested=$passed; then
return 1
- elif !(test $errrortested=$notcompiled); then
+ elif ! test $errrortested=$notcompiled; then
return 1
else
return 0
@@ -199,7 +199,7 @@ test_gpasm_obj() {
return 1
fi
- if !(test -d $1); then
+ if ! test -d $1; then
echo "$1 not found. Aborting."
return 1
fi
@@ -216,11 +216,11 @@ test_gpasm_obj() {
# create the test directory if it doesn't already exist
test -d $TESTDIR || mkdir $TESTDIR || exit 1
cd $TESTDIR
- rm -f *.asm
+ rm -f *.{asm,inc}
cp ../objasm/* .
# test all of the asm files
- for x in `ls *.asm`
+ for x in `ls *.asm | sort`
do
# split the base file name from the extension
for basefilename in `echo $x | tr -s "." " "`
@@ -271,9 +271,9 @@ test_gpasm_obj() {
echo "$errortested files tested with intentional errors"
echo "$notcompiled generated errors during compilation"
echo
- if !(test $tested=$passed); then
+ if ! test $tested=$passed; then
return 1
- elif !(test $errrortested=$notcompiled); then
+ elif ! test $errrortested=$notcompiled; then
return 1
else
return 0