Re: [PATCHES] pg_regress breaks on msys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] pg_regress breaks on msys
Дата
Msg-id 20400.1154212692@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> I modified pg_regress.c to use just the return code to determine if the
> diff worked, but I added in a WIN32-specific test for the file size.  I
> think that is the cleanest solution.  Attached.

It really needs a comment, along the lines of

    /*
     * On Windows we'll get exit status 1 if the diff invocation
     * failed; so we need a way to distinguish failure from "files
     * are different".  Check to make sure that a diff file was
     * created and is nonempty.
     */

Also the test ought to account for file_size returning -1 if file's
not there, so

+ #ifdef WIN32
+     if (WEXITSTATUS(r) == 1 && file_size(filename) <= 0)
...

            regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] Possible explanation for Win32 stats regression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in