[unixODBC-dev] Patches to get TAP testing to work

Kent Boortz kent at mysql.com
Thu Jun 7 08:52:56 BST 2007


Hi,

Some patches I have applied to get the tests running, using TAP
output. Some might just apply to my setup, just included for
completeness. Note that I run the tests in CVS against the current
MySQL v3 driver and unixODBC 2.2.12.

  tests/tst.pl

     As test cases output trace information, this mixes with the TAP
     lines making it hard to parse. I just let the tap output start
     with a newline, but would be better to make all output unbuffered
     maybe.

  tests/v3/conformance/Other/ins1/ins1.c
  tests/v3/conformance/Other/lgetdata/lgetdata.c
  tests/v3/conformance/Other/lonchar2/lonchar2.c

     FreeBSD doesn't like the use of #include <malloc.h>,
     suggests in error message to use #include <stdlib.h>

  tests/v3/conformance/Core/AllocHandle-DBC/AllocHandle-DBC.pro
  tests/v3/conformance/Core/AllocHandle-ENV/AllocHandle-ENV.pro

     Could not reach all headers included, added "../../../../common"

  tests/v3/conformance/Other/getset/getset.c

     Moved last declaration before first statement.

  tests/index.ini
  tests/v3/conformance/index.ini

     Enabled "v1", "v2", and "v3/conformance/Other" to be built.

As the test cases don't use Qt, I tried to disable the default
assumtion by qmake that this is the case. This to avoid linking
all test cases with X11 libraries. I tried set "CONFIG-=qt" in
"tests/tests.pro" but is didn't work. Ended up setting this
on the call to "qmake". Must be a better way.

I do builds with things in non standard locations, quite some work to
convince this build to agree with that. On AIX I also want to add a
flag to allow "*.so" like shared libraries. Might be that someone that
knows qmake better than me can set it more "right".

LDFLAGS will not work, I override LFLAGS in the make call instead, GNU
make will pass it on to sub directories. But LFLAGS is not meant to be
used like that, need to preserve original LFLAGS content, this is not
the "right" way to do it. An example of how I compile the tests on AIX
64 bit

  LDFLAGS=-Wl,-brtl
  QMAKESPEC=aix-xlc
  MY_UNIXODBC_PATH=....
  QTDIR=....
  PATH=$QTDIR/bin:$PATH
  export QMAKESPEC QTDIR PATH

  qmake tests.pro CONFIG-=qt INCLUDEPATH+=$MY_UNIXODBC_PATH/include \
    LIBS+="-Wl,-brtl -L$MY_UNIXODBC_PATH/lib"

  make UNIXODBC_DIR=$MY_UNIXODBC_PATH \
    LFLAGS="-q64 -L/usr/lib/threads -Wl,-brtl"

kent

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20070607/5483e1ec/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unixodbc-tests-malloc_h.patch
Type: text/x-patch
Size: 1369 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20070607/5483e1ec/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unixodbc-tests.patch
Type: text/x-patch
Size: 3018 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20070607/5483e1ec/attachment-0002.bin>
-------------- next part --------------

-- 
Kent Boortz, Senior Software Developer
MySQL AB, www.mysql.com
Office: +46 18 174400 ext. 4450 (VoIP)
Office: +46 19 182931
Mobile: +46 70 2791171


More information about the unixODBC-dev mailing list