Skip to content

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

Closed
wants to merge 8 commits into from
Closed

Add support for Travis CI #5

wants to merge 8 commits into from

Conversation

kadler
Copy link
Contributor

@kadler kadler commented Jan 30, 2019

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.

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).
@kadler
Copy link
Contributor Author

kadler commented Jan 30, 2019

You can see the TravisCI status for this PR here: https://travis-ci.com/kadler/pecl-database-ibm_db2/builds/99198501

@kadler
Copy link
Contributor Author

kadler commented Jan 31, 2019

CC @abhi7436 can you please review?

@kadler kadler mentioned this pull request Jan 31, 2019
@abhi7436
Copy link
Contributor

@kadler
I am working on it.

@abhi7436
Copy link
Contributor

@kadler
I went through your changes and it looks good to me. This was in my bucket but unable to deliver as i was busy with db2 development.
I tried to merge but i don't have merge permission. What can i do is take your code and manually merge and push it to repository.

@kadler
Copy link
Contributor Author

kadler commented Apr 3, 2019

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.

image

You also took my code changes and applied them outside of git, so they show up as you authoring them.

@kadler kadler closed this Apr 3, 2019
@abhi7436
Copy link
Contributor

abhi7436 commented Apr 4, 2019

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.

@kadler
Copy link
Contributor Author

kadler commented Apr 5, 2019

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.

@kadler kadler reopened this Apr 5, 2019
@kadler
Copy link
Contributor Author

kadler commented Apr 5, 2019

@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.

@kadler
Copy link
Contributor Author

kadler commented Apr 25, 2019

Merged with fd5c9f9

@kadler kadler closed this Apr 25, 2019
@kadler kadler deleted the add_ci branch March 25, 2021 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants