# REDIRECTTEST fails

- Thread: https://externals.io/message/55236
- Original archive: https://news-web.php.net/php.internals/55236
- Started by Stas Malyshev on 2011-09-05T20:26:22+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #55236 — Stas Malyshev — 2011-09-05T20:26:22+00:00

URL: https://externals.io/message/55236#55236

Hi!

I have the pdo_mysql common.phpt test failing on my config, specifically 
the REDIRECTTEST part. It is probably due to the way I run the tests, 
but other tests work fine, only this one is wrong. So my environment is 
like this:
My build directory in under php source in separate dir, so for 5.4 I'm 
building in ~/php-5.4/cgi. I run tests like this:

~/php-5.4/cgi$ ./cliphp ../run-tests.php ../ext/pdo_mysql/tests/common.phpt

Works just fine for most tests, but not for REDIRECTTEST, it returns:

ERROR: cannot open directory: 
ext/pdo/tests/PHP_5_4/ext/pdo_mysql/tests/common.phpt]

The path it produces seems to be some weird combination of redirected 
path, my current dir and test's path, but I can't figure out how it gets 
there. Any ideas?  	
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #55238 — Ferenc Kovacs — 2011-09-05T23:02:36+00:00

URL: https://externals.io/message/55236#55238 · In reply to: #55236

> Hi!
>
> I have the pdo_mysql common.phpt test failing on my config, specifically the
> REDIRECTTEST part. It is probably due to the way I run the tests, but other
> tests work fine, only this one is wrong. So my environment is like this:
> My build directory in under php source in separate dir, so for 5.4 I'm
> building in ~/php-5.4/cgi. I run tests like this:
>
> ~/php-5.4/cgi$ ./cliphp ../run-tests.php ../ext/pdo_mysql/tests/common.phpt
>
> Works just fine for most tests, but not for REDIRECTTEST, it returns:
>
> ERROR: cannot open directory:
> ext/pdo/tests/PHP_5_4/ext/pdo_mysql/tests/common.phpt]
>
> The path it produces seems to be some weird combination of redirected path,
> my current dir and test's path, but I can't figure out how it gets there.
> Any ideas?

I see a relative path in ext/pdo_mysql/tests/common.phpt :

$config = array(
        'TESTS' => 'ext/pdo/tests'
);

could you try setting that to:

$config = array(
        'TESTS' => dirname(__FILE__).'/ext/pdo/tests'
);

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu
