Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
ae8a2c35
Commit
ae8a2c35
authored
24 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Make the world safe for QNX's busted shell ...
parent
69b323f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/regress/regress.sh
+18
-8
18 additions, 8 deletions
src/test/regress/regress.sh
src/test/regress/run_check.sh
+19
-10
19 additions, 10 deletions
src/test/regress/run_check.sh
with
37 additions
and
18 deletions
src/test/regress/regress.sh
+
18
−
8
View file @
ae8a2c35
#!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.5
0
2000/05/
16 02:14:15
tgl Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.5
1
2000/05/
24 22:32:58
tgl Exp $
#
if
[
$#
-eq
0
]
;
then
echo
"Syntax:
$0
<hostname> [extra-tests]"
...
...
@@ -41,17 +41,27 @@ FRONTEND="psql $HOSTLOC -a -q -X"
# testname/hostnamepattern=substitutefile
# where the hostnamepattern is evaluated per the rules of expr(1) --- namely,
# it is a standard regular expression with an implicit ^ at the start.
#
# The tempfile hackery is needed because some shells will run the loop
# inside a subshell, whereupon shell variables set therein aren't seen
# outside the loop :-(
# ----------
SUBSTLIST
=
"
"
RESULTMAP
=
`
cat
resultmap
`
for
LINE
in
$RESULTMAP
TMPFILE
=
"matches.
$$
"
cat
/dev/null
>
$TMPFILE
while
read
LINE
do
HOSTPAT
=
`
expr
"
$LINE
"
:
'.*/\(.*\)='
`
if
[
`
expr
"
$hostname
"
:
"
$HOSTPAT
"
`
-ne
0
]
then
SUBSTLIST
=
"
$SUBSTLIST
$LINE
"
# remove hostnamepattern from line so that there are no shell
# wildcards in SUBSTLIST; else later 'for' could expand them!
TESTNAME
=
`
expr
"
$LINE
"
:
'\(.*\)/'
`
SUBST
=
`
echo
"
$LINE
"
|
sed
's/^.*=//'
`
echo
"
$TESTNAME
=
$SUBST
"
>>
$TMPFILE
fi
done
done
<resultmap
SUBSTLIST
=
`
cat
$TMPFILE
`
rm
-f
$TMPFILE
if
[
-d
./obj
]
;
then
cd
./obj
...
...
@@ -97,7 +107,7 @@ fi
fi
echo
"=============== running regression queries... ================="
echo
""
>
regression.diffs
cat
/dev/null
>
regression.diffs
if
[
"x
$hostname
"
=
"xi386-pc-qnx"
]
;
then
DIFFOPT
=
"-b"
...
...
@@ -123,7 +133,7 @@ do
EXPECTED
=
"expected/
${
tst
}
.out"
for
LINE
in
$SUBSTLIST
do
if
[
`
expr
"
$LINE
"
:
"
$tst
/
"
`
-ne
0
]
if
[
`
expr
"
$LINE
"
:
"
$tst
=
"
`
-ne
0
]
then
SUBST
=
`
echo
"
$LINE
"
|
sed
's/^.*=//'
`
EXPECTED
=
"expected/
${
SUBST
}
.out"
...
...
This diff is collapsed.
Click to expand it.
src/test/regress/run_check.sh
+
19
−
10
View file @
ae8a2c35
#!/bin/sh
#
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.1
8
2000/05/
18 16:11:39 momjian
Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.1
9
2000/05/
24 22:32:59 tgl
Exp $
# ----------
# Check call syntax
...
...
@@ -104,18 +104,27 @@ FRONTEND="$BINDIR/psql $HOSTLOC -a -q -X"
# testname/hostnamepattern=substitutefile
# where the hostnamepattern is evaluated per the rules of expr(1) --- namely,
# it is a standard regular expression with an implicit ^ at the start.
#
# The tempfile hackery is needed because some shells will run the loop
# inside a subshell, whereupon shell variables set therein aren't seen
# outside the loop :-(
# ----------
SUBSTLIST
=
"
"
exec
4<resultmap
while
read
LINE
<&4
TMPFILE
=
"matches.
$$
"
cat
/dev/null
>
$TMPFILE
while
read
LINE
do
HOSTPAT
=
`
expr
"
$LINE
"
:
'.*/\(.*\)='
`
if
[
`
expr
"
$hostname
"
:
"
$HOSTPAT
"
`
-ne
0
]
then
SUBSTLIST
=
"
$SUBSTLIST
$LINE
"
# remove hostnamepattern from line so that there are no shell
# wildcards in SUBSTLIST; else later 'for' could expand them!
TESTNAME
=
`
expr
"
$LINE
"
:
'\(.*\)/'
`
SUBST
=
`
echo
"
$LINE
"
|
sed
's/^.*=//'
`
echo
"
$TESTNAME
=
$SUBST
"
>>
$TMPFILE
fi
done
exec
4<&-
done
<resultmap
SUBSTLIST
=
`
cat
$TMPFILE
`
rm
-f
$TMPFILE
# ----------
# Catch SIGINT and SIGTERM to shutdown the postmaster
...
...
@@ -258,8 +267,8 @@ fi
# Run the regression tests specified in the ./sql/run_check.tests file
# ----------
echo
"=============== Running regression queries... ================"
echo
""
>
regression.diffs
echo
""
>
regress.out
cat
/dev/null
>
regression.diffs
cat
/dev/null
>
regress.out
if
[
"x
$hostname
"
=
"xi386-pc-qnx"
]
;
then
DIFFOPT
=
"-b"
...
...
@@ -439,7 +448,7 @@ lno=0
EXPECTED
=
"expected/
${
name
}
.out"
for
LINE
in
$SUBSTLIST
do
if
[
`
expr
"
$LINE
"
:
"
$name
/
"
`
-ne
0
]
if
[
`
expr
"
$LINE
"
:
"
$name
=
"
`
-ne
0
]
then
SUBST
=
`
echo
"
$LINE
"
|
sed
's/^.*=//'
`
EXPECTED
=
"expected/
${
SUBST
}
.out"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment