I'd like to be able to run tests by file name, not by class name or group name, in scripts/run-tests.sh

Comments

dlhubler’s picture

StatusFileSize
new1.66 KB

Also fixes small bug i noticed, selecting tests by class name had wrong keyname (class_name v.s. class)

dlhubler’s picture

Status: Active » Needs review
dlhubler’s picture

Project: Test driven development infrastructure » Drupal core
Version: » 7.x-dev
Component: Code » simpletest.module

I incorrectly had this under "Testing Infrastructure", moving to Drupal proper

moshe weitzman’s picture

looks good to me. i only did a code review.

damien tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Fair enough for me, and also fixes a bug (--class had no effect).

dries’s picture

Status: Reviewed & tested by the community » Fixed

I removed some tabs, extended the documentation a bit and committed this to CVS HEAD. Thanks.

swentel’s picture

Shouldn't there be this at the top of the file:

#!/usr/bin/php

easier to run ;-) (and we do it for all other files too)

swentel’s picture

Status: Fixed » Needs review
StatusFileSize
new231 bytes

Patch adds #!/usr/bin/php at the top.
Trivial patch of he month ?

damien tournoud’s picture

Status: Needs review » Fixed

There is no sane default for this. On Mac OS X for example, this will default to the system PHP binary (old for Tiger, more recent for Leopard), not to the one you use in MAMP. It's better to have no default at all.

On the other hand, it would be cool if you could find a way to automatically detect the path of the PHP binary which is used to run the script. We need that information down the road (see comments in the file), and we currently default it badly to /usr/bin/php.

swentel’s picture

Fair enough, but should'nt we remove it then from drupal.sh to be consistent in core ?
Oh well, this is trivial of course :)

damien tournoud’s picture

No really: it's critical for Simpletest to run on the good PHP interpreter. It's not that critical for drupal.sh.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.