Regression tests
От | Heikki Linnakangas |
---|---|
Тема | Regression tests |
Дата | |
Msg-id | 54C8CB1B.8060002@vmware.com обсуждение исходный текст |
Ответы |
Re: Regression tests
|
Список | pgsql-odbc |
Hi, Last weekend I tried to run the regression tests on a different system than what I usually use, but it failed because the system didn't have pg_regress installed. It had a PostgreSQL server running, and it had libpq and libpq header files, but pg_regress and the rest of the PGXS system was not included in those OS packages. It was easy enough to install the right packages (apt-get install ...), but it's nevertheless a bit silly that we depend on PGXS and pg_regress. When I wrote the regression suite, I actually had to jump through some hoops to use pg_regress in the first place. There's the ugly hack where "make installcheck" creates the .sql files that just run the test binaries. Using pg_regress also means that the ODBC.ini file must agree with the current PGHOST etc. settings. Otherwise psql will fail to connect even if odbc.ini is correct, or worse, it will connect to a different server. I've also been trying to make it easier to run the regression tests on Windows. Using psql and pg_regress is a bit of pain there, and again it requires that you have those installed on the build machine, which isn't a given. For these reasons, I propose to refactor the way the regression tests are launched. I wrote a small C utility to basically replace pg_regress. It runs the test programs, compares their outputs with the expected outputs, and runs "diff" to create regression.diffs file if they don't match. It produces TAP-compatible output, which is nice because you can use a frontend like perl 'prove' program to pretty-print it with colors and everything, and you can easily integrate it with tools like Jenkins. But it's also quite human-readable without any such tools. Patch attached. Any objections? The second patch adds a .vcproj file for MSVC, for running the regression tests, and a -RegressionTests option to the BuildAll command to run the regression tests after building the drivers. There are a few regression failures on Windows, so you won't get a clean pass, but at least it's much easier to run the tests with this. - Heikki
Вложения
В списке pgsql-odbc по дате отправления: