Bug 143021 - =dev-db/freetds emerge fails in src_test()
Bug#: 143021 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P4
Resolution: FIXED Assigned To: php-bugs@gentoo.org Reported By: ticho@gentoo.org
Component: Ebuilds
URL: 
Summary: =dev-db/freetds emerge fails in src_test()
Keywords:  
Status Whiteboard: 
Opened: 2006-08-06 15:33 0000
Description:   Opened: 2006-08-06 15:33 0000
It looks like the test suite is trying to connect somewhere. Should something
be running on my side for the tests to finish succesfully?

make[4]: Leaving directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src/tds/unittests'
make  check-TESTS
make[4]: Entering directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src/tds/unittests'
tds_connect() failed
try_tds_login() failed
t0001.c: Testing login, logout
FAIL: t0001
tds_connect() failed
try_tds_login() failed
t0002.c: Test basic submit query, results
FAIL: t0002
tds_connect() failed
try_tds_login() failed
t0003.c: Testing DB change -- 'use tempdb'
FAIL: t0003
tds_connect() failed
try_tds_login() failed
t0004.c: Test large (>512 bytes) queries
FAIL: t0004
tds_connect() failed
try_tds_login() failed
t0005.c: Test large (>512 bytes) replies
FAIL: t0005
tds_connect() failed
try_tds_login() failed
t0006.c: Test SYBREAL, SYBFLT8 values
FAIL: t0006
some checks...
1234
123
-1234
error
overflow checks...
2147483647
error
-2147483648
error
32767
error
-32768
error
255
error
0
error
overflow on big number checks...
error
error
error
error
12
unique type...
12345678-1234-1234-9876543298765432
12345678-1234-1E34-9876AB3298765432
error
error
error
12345678-1234-A234-9876543298765432
error
error
binary test...
len=2 12 34
len=2 AB FD
len=2 AB FD
len=2 00 00
len=1 00
len=2 01 00
len=1 01
PASS: t0007
test some valid values..
prec=18 scale=0 00 00 00 00 00 00 00 04 D2 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
prec=18 scale=0 00 00 00 00 00 49 96 02 D2 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
1234567890
prec=18 scale=0 00 01 B6 9B 4B A6 30 F3 4E 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
123456789012345678
prec=18 scale=0 00 0D E0 B6 B3 A7 63 FF FF 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
999999999999999999
test overflow..
error
error
prec=38 scale=0 00 00 00 00 01 8E E9 0F F6 C3 73 E0 EE 4E 3F 0A D2 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
123456789012345678901234567890
error
prec=38 scale=0 00 4B 3B 4C A8 5A 86 C4 7A 09 8A 22 3F FF FF FF FF 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
99999999999999999999999999999999999999
error
prec=18 scale=1 00 00 00 00 00 00 00 30 34 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
prec=18 scale=2 00 00 00 00 00 00 01 E2 40 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
1234.56
prec=18 scale=5 00 00 00 00 00 00 00 00 7B 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
0.00123
prec=18 scale=4 00 00 00 00 00 00 00 00 7B 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
0.0123
prec=18 scale=3 00 00 00 00 00 00 00 00 7B 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
0.123
prec=18 scale=2 00 00 00 00 00 00 00 00 7B 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
1.23
prec=18 scale=1 00 00 00 00 00 00 00 00 7B 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
12.3
prec=18 scale=4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
0.0000
prec=18 scale=0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
0
PASS: t0008
tds_connect() failed
try_tds_login() failed
dynamic1.c: Test dynamic queries
FAIL: dynamic1
converted 39 (varchar, 12 bytes) : 47 (char, 12 bytes).
       0 iterations/second converting       varchar => char.
converted 39 (varchar, 12 bytes) : 35 (text, 12 bytes).
       0 iterations/second converting       varchar => text.

.
.
.

converted 61 (datetime, 8 bytes) : 35 (text, 19 bytes).
       0 iterations/second converting      datetime => text.
converted 61 (datetime, 8 bytes) : 45 (binary, 8 bytes).
       0 iterations/second converting      datetime => binary.
converted 61 (datetime, 8 bytes) : 34 (image, 8 bytes).
       0 iterations/second converting      datetime => image.
converted 61 (datetime, 8 bytes) : 58 (smalldatetime, 4 bytes).
       0 iterations/second converting      datetime => smalldatetime.
converted 58 (smalldatetime, 4 bytes) : 39 (varchar, 19 bytes).
       0 iterations/second converting smalldatetime => varchar.
converted 58 (smalldatetime, 4 bytes) : 47 (char, 19 bytes).
       0 iterations/second converting smalldatetime => char.
converted 58 (smalldatetime, 4 bytes) : 35 (text, 19 bytes).
       0 iterations/second converting smalldatetime => text.
converted 58 (smalldatetime, 4 bytes) : 45 (binary, 4 bytes).
       0 iterations/second converting smalldatetime => binary.
converted 58 (smalldatetime, 4 bytes) : 34 (image, 4 bytes).
       0 iterations/second converting smalldatetime => image.
converted 58 (smalldatetime, 4 bytes) : 61 (datetime, 8 bytes).
       0 iterations/second converting smalldatetime => datetime.
PASS: convert
tds_connect() failed
try_tds_login() failed
dataread.c: Testing conversion from server
FAIL: dataread
tds_connect() failed
try_tds_login() failed
FAIL: utf8_1
tds_connect() failed
try_tds_login() failed
FAIL: utf8_2
=====================
10 of 13 tests failed
=====================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src/tds/unittests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src/tds/unittests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src/tds'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/portage/freetds-0.62.3/work/freetds-0.62.3/src'
make: *** [check-recursive] Error 1

!!! ERROR: dev-db/freetds-0.62.3 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_test
  ebuild.sh, line 987:   Called src_test
  ebuild.sh, line 618:   Called die

------- Comment #1 From Jakub Moc (RETIRED) 2007-03-03 12:11:11 0000 -------
Any better w/ 0.64?

------- Comment #2 From Andrej Kacian (RETIRED) 2007-03-03 13:29:29 0000 -------
Created an attachment (id=111906) [details]
build log of 0.62.3

Not really - 0.64 has one more failed test compared to 0.62.3. Build logs (will
be) attached.

------- Comment #3 From Andrej Kacian (RETIRED) 2007-03-03 13:30:09 0000 -------
Created an attachment (id=111908) [details]
build log of 0.64

------- Comment #4 From Jakub Moc (RETIRED) 2007-08-12 13:25:14 0000 -------
So, from the documentation:

<snip>
The unit tests rely on the PWD file in root of the FreeTDS source tree.  
PWD holds a username, password, servername, and database to be used for the
unit tests.  We try to make sure to leave nothing behind: any data and objects
created are either temporary or removed at the end of the test.  The tests
should all work, subject to disclaimers in the directory's README               

To invoke the tests, edit the PWD file and issue the command make check. In
order to execute all tests successfully, you must indicate a working, available
dataserver in PWD. Some tests require permission to create stored procedures on
server.

To complete successfully, the ODBC tests require some additional setup. In your
PWD file, add a SRV entry specifying the DSN entry for your odbc.ini. The ODBC
tests all build their own odbc.ini and try to redirect the Driver Manager to
it, however this functionality is very DM dependent and may well fail unless
you have either iODBC or unixODBC.
</snip>

Apparently, this requires a running MSSQL/Sybase server and database login. As
such, this is highly setup dependent, requires very specific resources and is
not meant to run non-interactively in the ebuild.

Feel free to stick RESTRICT=test to the ebuild and close this bug, this won't
work for us.

------- Comment #5 From Marijn Schouten 2007-08-14 10:54:36 0000 -------
I restricted tests per jakub's request.