Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ODBC support to Travis-CI configuration #49

Closed
mloskot opened this issue Feb 3, 2013 · 6 comments
Closed

Add ODBC support to Travis-CI configuration #49

mloskot opened this issue Feb 3, 2013 · 6 comments

Comments

@mloskot
Copy link
Contributor

mloskot commented Feb 3, 2013

Update .travis.yml to install and configure ODBC for Linux, so the ODBC backend is built by CI machine.

It may also be worth to request CMake to configure ODBC tests, so we have minimal test coverage for this backend.

@ghost ghost assigned mloskot Feb 3, 2013
@vadz
Copy link
Member

vadz commented Feb 3, 2013

I don't know anything about Travis so am unable to do this myself but I'd very much like to have it as checking things in without the unit tests is an acutely uncomfortable experience. TIA!

@mloskot
Copy link
Contributor Author

mloskot commented Feb 4, 2013

@vadz Great you like the idea. No problem, I'll take of Travis setup.

What OS do you use for ODBC? On Travis, we have Linux VM. If you use Linux too, do you have any preference of ODBC implementation and drivers?

BTW, some time ago, I asked on SO: What are the functional differences between iODBC and unixODBC?

@vadz
Copy link
Member

vadz commented Feb 4, 2013

I'm testing mostly under Windows and Linux but we also support Solaris. We use unixODBC under Linux because I had some problems (the details of which I unfortunately forgot by now but I think it was related to MS SQL/freeTDS...) with iODBC and also because I found, just as indicated by the answer to your SO question, that unixODBC was more widespread.

@mloskot
Copy link
Contributor Author

mloskot commented Feb 4, 2013

Great, then I'll install unixODBC which I've used myself too. I've never used iODBC.

@mloskot
Copy link
Contributor Author

mloskot commented Feb 4, 2013

@vadz Travis installs unixODBC and builds ODBC backends now: https://travis-ci.org/SOCI/soci/builds/4569916

It also tries to run the ODBC tests, but they are failing. I think it should be possible to configure them with FILEDSN to connect to SQLite3, PostgreSQL and MySQL which we all have available on Travis. AFAIK, there are ODBC drivers available for these database on Linux.

All the connection settings has to be put into .dsn files we manage in git in src/backends/odbc/test.

I'll try to configure it later.

@mloskot
Copy link
Contributor Author

mloskot commented Feb 6, 2013

Yay! Travis is now executing the ODBC tests against PostgreSQL: https://travis-ci.org/SOCI/soci/builds/4618826

So, @vadz, you've got a minimal safety net :)

The last build log may be confusing, because it says the built passed and is green, but it consists of this:

test 7
      Start  7: soci_odbc_test_access

7: Test command: /home/travis/build/SOCI/soci/src/_build/bin/soci_odbc_test_access "test-access.dsn"
7: Test timeout computed to be: 1500
7: 
7: SOCI Common Tests:
7: 
7: ODBC Error Code: IM002
7: Native Error Code: 0
7: SOCI Message: Error Connecting to database
7: ODBC Message: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
 7/12 Test  #7: soci_odbc_test_access ..............***Failed    0.09 sec
test 8
      Start  8: soci_odbc_test_access_static

8: Test command: /home/travis/build/SOCI/soci/src/_build/bin/soci_odbc_test_access_static "test-access.dsn"
8: Test timeout computed to be: 1500
8: 
8: SOCI Common Tests:
8: 
8: ODBC Error Code: IM002
8: Native Error Code: 0
8: SOCI Message: Error Connecting to database
8: ODBC Message: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
8/12 Test  #8: soci_odbc_test_access_static .......***Failed    0.01 sec

Simply, the ODBC test programs return EXIT_SUCCESS on failure, instead of return EXIT_FAILURE. This needs to be corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants