# PATCH: run-tests.php -l flag (local / non-recurisve)

- Thread: https://externals.io/message/8008
- Original archive: https://news-web.php.net/php.internals/8008
- Started by Daniel Convissor on 2004-02-19T21:50:28+00:00
- Messages: 10
- 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

---

## #8008 — Daniel Convissor — 2004-02-19T21:50:28+00:00

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

Hi:

As you probably know, run-tests.php runs recursively through each
subdirectory encountered.  I've run into circumstances where it is helpful
to have it just run files in the present directory, without recursion.  I 
have created a patch which watches for an "-l" flag.  The -l flag is 
similar to the one used with CVS.

Considering this is a simple, optional and helpful change, I hope this can
be applied to the all branches, please.

http://www.analysisandsolutions.com/php/run-tests.local.option.diff

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #8015 — Jan Lehnardt — 2004-02-20T10:05:05+00:00

URL: https://externals.io/message/8008#8015 · In reply to: #8008

Hi,

> As you probably know, run-tests.php runs recursively through each
> subdirectory encountered.  I've run into circumstances where it is 
> helpful
> to have it just run files in the present directory, without recursion. 
>  I
> have created a patch which watches for an "-l" flag.  The -l flag is
> similar to the one used with CVS.

TESTS=/path/test/dir make test or even TESTS=/path/to/test.phpt make 
test
works just fine, already.

There are plans to change run-tests.php so it accepts arguments instead
of environment variables, but nothing happened in this direction, yet.

regards,
Jan

---

## #8017 — Hartmut Holzgraefe — 2004-02-20T11:49:32+00:00

URL: https://externals.io/message/8008#8017 · In reply to: #8015

Jan Lehnardt wrote:
> TESTS=/path/test/dir make test or even TESTS=/path/to/test.phpt make test
> works just fine, already.

TESTS=/path/test/dir would still dive into /past/test/dir/subdir,
wouldn't it?

> There are plans to change run-tests.php so it accepts arguments instead
> of environment variables, but nothing happened in this direction, yet.

that's not really true, it's more like "nothing has been commited yet" ;)

-- 
Hartmut Holzgraefe  <hartmut@php.net

---

## #8018 — Marcus Boerger — 2004-02-20T17:40:22+00:00

URL: https://externals.io/message/8008#8018 · In reply to: #8017

Hello Hartmut,

Friday, February 20, 2004, 12:49:32 PM, you wrote:

> Jan Lehnardt wrote:
> > […]

> TESTS=/path/test/dir would still dive into /past/test/dir/subdir,
> wouldn't it?

> > […]

> that's not really true, it's more like "nothing has been commited yet" ;)

well i did some of those commits...long ago...or did i miss anything??????

i'd simply use php run-tests.php <whateverfile-or-dir-you-want> ....
if you want local files only without recursion then you can use find but
that doesn't help on windows. Anyway i see no reason because at least until
now there is not a single one extension where this functionality would be of
any use because test directories do not have sub-test-dirs. And btw. for
example:
php run-tests.php ext/dba
is shorter than
php run-tests.php ext/dba/tests
but does the same because of the recursion


-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #8019 — Hartmut Holzgraefe — 2004-02-20T17:47:10+00:00

URL: https://externals.io/message/8008#8019 · In reply to: #8018

Marcus Boerger wrote:
> well i did some of those commits...long ago...or did i miss anything??????

i was refering to stuff hidden somewhere on my disk ..

> 
> i'd simply use php run-tests.php <whateverfile-or-dir-you-want> ....
> if you want local files only without recursion then you can use find but
> that doesn't help on windows. Anyway i see no reason because at least until
> now there is not a single one extension where this functionality would be of
> any use because test directories do not have sub-test-dirs. 

ext/standard/tests has ;)

that aside i did not state whether the non-recursive option proposed by
Daniel makes sense, i was just trying to point out that Jans replay
slightly missed the point of the original request ...

-- 
Hartmut Holzgraefe  <hartmut@php.net

---

## #8020 — Daniel Convissor — 2004-02-20T17:54:19+00:00

URL: https://externals.io/message/8008#8020 · In reply to: #8018

Hi Marcus:


> 
> Anyway i see no reason because at least until
> now there is not a single one extension where this functionality would be of
> any use because test directories do not have sub-test-dirs.

The test platform is used in many places beside PHP development itself.  
This issue arose for me in the testing of PEAR DB, which does have a 
subdirectory.


> And btw. for
> example:
> php run-tests.php ext/dba
> is shorter than
> php run-tests.php ext/dba/tests
> but does the same because of the recursion

And the patch wouldn't change that.  It just allows people to choose 
whether they want recursion or not.

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #8021 — Marcus Boerger — 2004-02-20T17:56:06+00:00

URL: https://externals.io/message/8008#8021 · In reply to: #8020

Hello Daniel,

Friday, February 20, 2004, 6:54:19 PM, you wrote:

> Hi Marcus:

> 
> > […]

> The test platform is used in many places beside PHP development itself.  
> This issue arose for me in the testing of PEAR DB, which does have a 
> subdirectory.

Ah - ok then :-)


> > […]

> And the patch wouldn't change that.  It just allows people to choose 
> whether they want recursion or not.

-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #8022 — Marcus Boerger — 2004-02-20T18:02:58+00:00

URL: https://externals.io/message/8008#8022 · In reply to: #8020

Hello Daniel,

since there seems to be a usage i looked into including it.
Unfortunatley your patch doesn't help me. I'd need you to
look into php5's version of the script. There you'll see that
the switch 'l' is already being used. Hence i'd say we go with
'L' unless you find a better name.

Friday, February 20, 2004, 6:54:19 PM, you wrote:

> Hi Marcus:

> 
> > […]

> The test platform is used in many places beside PHP development itself.  
> This issue arose for me in the testing of PEAR DB, which does have a 
> subdirectory.


> > […]

> And the patch wouldn't change that.  It just allows people to choose 
> whether they want recursion or not.

> Thanks,

> --Dan

> -- 
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>             data intensive web and database programming
>                 http://www.AnalysisAndSolutions.com/
>  4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409




-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #8023 — Derick Rethans — 2004-02-20T18:13:51+00:00

URL: https://externals.io/message/8008#8023 · In reply to: #8015

> Hi,
> 
> > […]
>
> TESTS=/path/test/dir make test or even TESTS=/path/to/test.phpt make
> test works just fine, already.

And also:
TESTS=path/test/dir/*.phpt make test

so you don't need anything new for this to work.

Derick

---

## #8024 — Daniel Convissor — 2004-02-20T18:37:58+00:00

URL: https://externals.io/message/8008#8024 · In reply to: #8023

> TESTS=path/test/dir/*.phpt make test
> so you don't need anything new for this to work.

True enough.

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
