-
Notifications
You must be signed in to change notification settings - Fork 27
Add support for Travis CI #5
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
Conversation
This is similar to what I did for Python ibmdb ibmdb/python-ibmdb#343
Mostly involved finding resources relative to the script directory instead of from the current directory, which make test sets as the source directory. Instead of writing a file and then reading it back in to compare, just build up a string in memory and compare them. Connecting to a missing db alias returns an empty SQLSTATE. I'm not sure if/when that changed, but I've adjusted the code to handle either case. Finally, escape.dat was missing a \r in the file.
The code does an SQLGetData, binding as SQL_CLOB_LOCATOR, but DB2 Connect CLI returns invalid conversion to bind a CLOB to a locator for some reason: 07006[IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006 The BLOB path works, using SQLGetData with SQL_BLOB_LOCATOR, so I'm not sure what's wrong with CLOBs. It seems like a bug, but I can't get it to work and the test predates the CI setup, so just expect it to fail for now.
db2_execute calls _php_db2_execute_helper, which allocs curr->value if it is currently NULL. Later, _php_db2_set_symbol is called which frees tmp_curr->value, but it does not set it to NULL, which means on the next time through, _php_db2_execute_helper will skip allocating new memory and instead re-use a previously freed address. Found using Valgrind.
Check for IBM_DB2_TEST_SKIP_CONNECT_FAILURE if it's set to an empty string or 0, instead of skipping the test it continues onward (and probaby fails).
You can see the TravisCI status for this PR here: https://travis-ci.com/kadler/pecl-database-ibm_db2/builds/99198501 |
CC @abhi7436 can you please review? |
@kadler |
@kadler |
I don't understand how you don't have merge permission, but have permission to push directly to the repository. That makes no sense. In any event, GitHub gives you explicit directions for merging manually and pushing, eg. You also took my code changes and applied them outside of git, so they show up as you authoring them. |
My sincere apologies but it was never my intention. I will try to remove last commit and try to push your pull request via command line. GUI dosnt give me merge option. |
Yeah, sorry about that - I was not having a great day and that didn't help. After talking directly, I remembered that PHP does not use GitHub directly, but instead git.php.net. So the changes need to be pushed there and then they will show up here. |
@abhi7436 FYI, I found this: https://wiki.php.net/vcs/gitworkflow See "Reviewing and closing pull requests" for a tool to do the merging automatically or the next section "Merge a pull request" for command line doc on how to do it. |
Merged with fd5c9f9 |
This is similar to the support I added in ibmdb/python-ibmdb#343
I found that a few tests were failing due to code errors, which I fixed. I also spent a lot of time trying to track down and fix the failure I found for test_147_CallSPINAndOUTParamsMultipleTimes.phpt when run on PHP 7.1 in Travis CI. I ended up being unable to fix that issue, due to needing many more changes to work on ZTS-enabled PHP versions (which are the only ones that Travis CI supports, at least until travis-ci/php-src-builder#24 gets merged). In the end, I opened up https://bugs.php.net/bug.php?id=77547 and skip that test on PHP 7.1 when built with ZTS.