Use diff's -w switch only on Windows, to avoid problems with inconsistent
newline representations. Per buildfarm results and subsequent discussion. Sync up a couple of other places that had their own policies.
This commit is contained in:
parent
fe4b8c42ad
commit
8d97c1dcfa
@ -11,7 +11,7 @@
|
|||||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress_ecpg.c,v 1.5 2009/01/01 17:24:02 momjian Exp $
|
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress_ecpg.c,v 1.6 2009/11/23 16:02:24 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -161,15 +161,7 @@ ecpg_start_test(const char *testname,
|
|||||||
static void
|
static void
|
||||||
ecpg_init(void)
|
ecpg_init(void)
|
||||||
{
|
{
|
||||||
/* no reason to set -w for ecpg checks, except for when on windows */
|
/* nothing to do here at the moment */
|
||||||
if (strstr(host_platform, "-win32") || strstr(host_platform, "-mingw32"))
|
|
||||||
basic_diff_opts = "-w";
|
|
||||||
else
|
|
||||||
basic_diff_opts = "";
|
|
||||||
if (strstr(host_platform, "-win32") || strstr(host_platform, "-mingw32"))
|
|
||||||
pretty_diff_opts = "-C3 -w";
|
|
||||||
else
|
|
||||||
pretty_diff_opts = "-C3";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# $PostgreSQL: pgsql/src/test/mb/mbregress.sh,v 1.10 2009/05/06 16:15:21 tgl Exp $
|
# $PostgreSQL: pgsql/src/test/mb/mbregress.sh,v 1.11 2009/11/23 16:02:24 tgl Exp $
|
||||||
|
|
||||||
if echo '\c' | grep -s c >/dev/null 2>&1
|
if echo '\c' | grep -s c >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
@ -49,7 +49,7 @@ do
|
|||||||
|
|
||||||
if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
|
if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
|
||||||
then
|
then
|
||||||
( diff -wC3 ${EXPECTED} results/${i}.out; \
|
( diff -C3 ${EXPECTED} results/${i}.out; \
|
||||||
echo ""; \
|
echo ""; \
|
||||||
echo "----------------------"; \
|
echo "----------------------"; \
|
||||||
echo "" ) >> regression.diffs
|
echo "" ) >> regression.diffs
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.66 2009/11/22 17:54:23 tgl Exp $
|
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.67 2009/11/23 16:02:24 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -65,9 +65,18 @@ static char *makeprog = MAKEPROG;
|
|||||||
static char *shellprog = SHELLPROG;
|
static char *shellprog = SHELLPROG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* currently we can use the same diff switches on all platforms */
|
/*
|
||||||
|
* On Windows we use -w in diff switches to avoid problems with inconsistent
|
||||||
|
* newline representation. The actual result files will generally have
|
||||||
|
* Windows-style newlines, but the comparison files might or might not.
|
||||||
|
*/
|
||||||
|
#ifndef WIN32
|
||||||
const char *basic_diff_opts = "";
|
const char *basic_diff_opts = "";
|
||||||
const char *pretty_diff_opts = "-C3";
|
const char *pretty_diff_opts = "-C3";
|
||||||
|
#else
|
||||||
|
const char *basic_diff_opts = "-w";
|
||||||
|
const char *pretty_diff_opts = "-w -C3";
|
||||||
|
#endif
|
||||||
|
|
||||||
/* options settable from command line */
|
/* options settable from command line */
|
||||||
_stringlist *dblist = NULL;
|
_stringlist *dblist = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user