Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
90cfa9ac
Commit
90cfa9ac
authored
Nov 21, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for different result files when using GCC versus native compiler.
parent
fd05f896
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
48 deletions
+68
-48
doc/src/sgml/regress.sgml
doc/src/sgml/regress.sgml
+53
-44
src/test/regress/GNUmakefile
src/test/regress/GNUmakefile
+2
-1
src/test/regress/pg_regress.sh
src/test/regress/pg_regress.sh
+13
-3
No files found.
doc/src/sgml/regress.sgml
View file @
90cfa9ac
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.1
2 2000/10/22 19:11:05 tgl
Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.1
3 2000/11/21 23:40:27 petere
Exp $ -->
<chapter id="regress">
<chapter id="regress">
<title id="regress-title">Regression Tests</title>
<title id="regress-title">Regression Tests</title>
...
@@ -275,48 +275,57 @@ diff results/random.out expected/random.out
...
@@ -275,48 +275,57 @@ diff results/random.out expected/random.out
<title>Platform-specific comparison files</title>
<title>Platform-specific comparison files</title>
<para>
<para>
Since some of the tests inherently produce platform-specific results,
Since some of the tests inherently produce platform-specific
we have provided a way to supply platform-specific result comparison
results, we have provided a way to supply platform-specific result
files. Frequently, the same variation applies to multiple platforms;
comparison files. Frequently, the same variation applies to
rather than supplying a separate comparison file for every platform,
multiple platforms; rather than supplying a separate comparison
there is a mapping file that defines which comparison file to use.
file for every platform, there is a mapping file that defines
So, to eliminate bogus test "failures" for a particular platform,
which comparison file to use. So, to eliminate bogus test
you must choose or make a variant result file, and then add a line
<quote>failures</quote> for a particular platform, you must choose
to the mapping file, which is "resultmap".
or make a variant result file, and then add a line to the mapping
file, which is <filename>resultmap</filename>.
</para>
</para>
<para>
<para>
Each line in the mapping file is of the form
Each line in the mapping file is of the form
<programlisting>
<synopsis>
testname/platformnamepattern=comparisonfilename
testname/platformnamepattern=comparisonfilename
</programlisting>
</synopsis>
The test name is just the name of the particular regression test module.
The test name is just the name of the particular regression test
The platform name pattern is a pattern in the style of expr(1) (that is,
module. The platform name pattern is a pattern in the style of
a regular expression with an implicit ^ anchor at the start). It is matched
expr(1) (that is, a regular expression with an implicit ^ anchor
against the platform name as printed by config.guess. The comparison
at the start). It is matched against the platform name as printed
file name is the name of the substitute result comparison file.
by <filename>config.guess</filename> with an appended
<literal>:gcc</literal> or <literal>:cc</literal>, depending on
whether you use the GNU compiler or the system's native compiler
(on systems where there is a difference). The comparison file
name is the name of the substitute result comparison file.
</para>
</para>
<para>
<para>
For example: the int2 regress test includes a deliberate entry of a value
For example: the int2 regression test includes a deliberate entry
that is too large to fit in int2. The specific error message that is
of a value that is too large to fit in int2. The specific error
produced is platform-dependent; our reference platform emits
message that is produced is platform-dependent; our reference
<programlisting>
platform emits
ERROR: pg_atoi: error reading "100000": Numerical result out of range
<screen>
</programlisting>
<computeroutput>ERROR: pg_atoi: error reading "100000": Numerical result out of range</computeroutput>
</screen>
but a fair number of other Unix platforms emit
but a fair number of other Unix platforms emit
<programlisting>
<screen>
ERROR: pg_atoi: error reading "100000": Result too large
<computeroutput>ERROR: pg_atoi: error reading "100000": Result too large</computeroutput>
</programlisting>
</screen>
Therefore, we provide a variant comparison file, int2-too-large.out,
Therefore, we provide a variant comparison file,
that includes this spelling of the error message. To silence the
<filename>int2-too-large.out</filename>, that includes this
bogus "failure" message on HPPA platforms, resultmap includes
spelling of the error message. To silence the bogus
<programlisting>
<quote>failure</quote> message on HPPA platforms, resultmap
int2/hppa=int2-too-large
includes
</programlisting>
<programlisting>
int2/hppa=int2-too-large
</programlisting>
which will trigger on any machine for which config.guess's output
which will trigger on any machine for which config.guess's output
begins with 'hppa'. Other lines in resultmap select the variant
begins with <quote><literal>hppa</literal></quote>. Other lines
comparison file for other platforms where it's appropriate.
in resultmap select the variant comparison file for other
platforms where it's appropriate.
</para>
</para>
</sect1>
</sect1>
...
...
src/test/regress/GNUmakefile
View file @
90cfa9ac
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.3
0 2000/10/27 20:00:19
petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.3
1 2000/11/21 23:40:28
petere Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -37,6 +37,7 @@ pg_regress: pg_regress.sh GNUmakefile
...
@@ -37,6 +37,7 @@ pg_regress: pg_regress.sh GNUmakefile
-e
's/@host_tuple@/
$(host_tuple)
/g'
\
-e
's/@host_tuple@/
$(host_tuple)
/g'
\
-e
's,@GMAKE@,
$(MAKE)
,g'
\
-e
's,@GMAKE@,
$(MAKE)
,g'
\
-e
's/@enable_shared@/
$(enable_shared)
/g'
\
-e
's/@enable_shared@/
$(enable_shared)
/g'
\
-e
's/@GCC@/
$(GCC)
/g'
\
$<
>
$@
$<
>
$@
chmod
a+x
$@
chmod
a+x
$@
...
...
src/test/regress/pg_regress.sh
View file @
90cfa9ac
#! /bin/sh
#! /bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.1
1 2000/11/21 17:34:21
petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.1
2 2000/11/21 23:40:28
petere Exp $
me
=
`
basename
$0
`
me
=
`
basename
$0
`
:
${
TMPDIR
=/tmp
}
:
${
TMPDIR
=/tmp
}
...
@@ -74,6 +74,13 @@ bindir='@bindir@'
...
@@ -74,6 +74,13 @@ bindir='@bindir@'
datadir
=
'@datadir@'
datadir
=
'@datadir@'
host_platform
=
'@host_tuple@'
host_platform
=
'@host_tuple@'
enable_shared
=
'@enable_shared@'
enable_shared
=
'@enable_shared@'
GCC
=
@GCC@
if
[
"
$GCC
"
=
yes
]
;
then
compiler
=
gcc
else
compiler
=
cc
fi
unset
mode
unset
mode
unset
schedule
unset
schedule
...
@@ -226,6 +233,9 @@ trap '
...
@@ -226,6 +233,9 @@ trap '
# testname/hostplatformpattern=substitutefile
# testname/hostplatformpattern=substitutefile
# where the hostplatformpattern is evaluated per the rules of expr(1),
# where the hostplatformpattern is evaluated per the rules of expr(1),
# namely, it is a standard regular expression with an implicit ^ at the start.
# namely, it is a standard regular expression with an implicit ^ at the start.
# What hostplatformpattern will be matched against is the config.guess output
# followed by either ':gcc' or ':cc' (independent of the actual name of the
# compiler executable).
#
#
# The tempfile hackery is needed because some shells will run the loop
# The tempfile hackery is needed because some shells will run the loop
# inside a subshell, whereupon shell variables set therein aren't seen
# inside a subshell, whereupon shell variables set therein aren't seen
...
@@ -236,7 +246,7 @@ cat /dev/null >$TMPFILE
...
@@ -236,7 +246,7 @@ cat /dev/null >$TMPFILE
while
read
LINE
while
read
LINE
do
do
HOSTPAT
=
`
expr
"
$LINE
"
:
'.*/\(.*\)='
`
HOSTPAT
=
`
expr
"
$LINE
"
:
'.*/\(.*\)='
`
if
[
`
expr
"
$host_platform
"
:
"
$HOSTPAT
"
`
-ne
0
]
if
[
`
expr
"
$host_platform
:
$compiler
"
:
"
$HOSTPAT
"
`
-ne
0
]
then
then
# remove hostnamepattern from line so that there are no shell
# remove hostnamepattern from line so that there are no shell
# wildcards in SUBSTLIST; else later 'for' could expand them!
# wildcards in SUBSTLIST; else later 'for' could expand them!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment