php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59656 Please wrap rrd_strversion
Submitted: 2011-03-07 13:47 UTC Modified: 2011-04-11 05:30 UTC
From: Fedora at FamilleCollet dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.5 OS: GNU/Linux (Fedora 14)
Private report: No CVE-ID: None
 [2011-03-07 13:47 UTC] Fedora at FamilleCollet dot com
Description:
------------
It will be great to 
- have a rrd_strversion in a future version.
- display this value in phpinfo(), as some other extension does (mysql, memcached, ...)

The first use will be to have conditional part in test suite.

I mean, when the rrdtool API changes and affects the test suite, the old tests are kept, but skip for new version, and the new ones are created, but skip for old version.

This solution will allow to provide a more robust test suite, I think.

Patch proposal:
http://remi.fedorapeople.org/rrd-strversion.patch

This patch :
- add rrd_strversion wrapped function
- display "rrdtool library version" in phpinfo()
- change test 19 to run only if rrdtool >= 1.4.0
- add test 20 (copied from 19) to run only if rrdtool < 1.4.0

Feel free to comment this minor contribution.

Test under fedora 14
PASS RRDGraph saveVerbose full export test [tests/rrd_019.phpt] 
SKIP RRDGraph saveVerbose full export test [tests/rrd_020.phpt] reason: - test only applies to rrdtool 1.3.x

Test under RHEL 6
SKIP RRDGraph saveVerbose full export test [tests/rrd_019.phpt] reason: - test only applies to rrdtool >= 1.4.x
PASS RRDGraph saveVerbose full export test [tests/rrd_020.phpt] 


Of course, if you think this is a good idea, I should be able to fix the others some tests which fails with rrdtool 1.3.x


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-11 05:30 UTC] koubel at seznam dot cz
rrd_version added to php user space functions, underlying librrd version added to phpinfo() also.

Regarding test suite:
Make test result with current trunk for librrd 1.3.x and publish it on some public url. After that I'll try to make some librrd conditional tests. Maybe I'll change names for phpt files also, I think they aren't so transparent now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC