Running tests in the front end works fine, but via the command line, with or without sudo, I get an empty result with no warnings or errors, but the tests do not execute.

Does anyone know where I could begin to debug this?

$ php scripts/run-tests.sh --verbose --color "Blog"

Drupal test run
---------------

Tests to be run:
 - Blog functionality (BlogTestCase)

Test run started:
 Mardi, Avril 23, 2013 - 15:28

Test summary
------------


Test run duration: 0 s

Detailed test results
---------------------
$ 

Comments

alberto56’s picture

Title: php scripts/run-tests.sh not running the tests, but no error given and all looks fine » Globalredirect causes php scripts/run-tests.sh to silently fail
Project: Drupal core » Global Redirect
Version: 7.22 » 7.x-1.x-dev
Component: simpletest.module » Code
Category: support » bug
Status: Active » Needs review
StatusFileSize
new692 bytes

Global Redirect's init hook implementation causes simpletests to not run from the command line.

To reproduce:

Enable globalredirect

Go to the command line and type

cd /path/to/drupal
php scripts/run-tests.sh --verbose --color "Blog"

(I have not tested this on a fresh install, only on my development site)

The test does not run, and no error is given.

Here is a patch which allows the tests to run. It's not really elegant, but it might be useful if you want to run tests in the command line on an environment with globalredirect enabled.

alberto56’s picture

Title: Globalredirect causes php scripts/run-tests.sh to silently fail » Globalredirect on host site causes php scripts/run-tests.sh to silently fail

A few notes:

- the failure occurs when globalredirect is present on the host site.
- confirming that running tests in the UI work even if globalredirect is present in the host site.

Albert.

markpavlitski’s picture

Status: Needs review » Fixed

@alberto56 This is fixed in the 7.x dev release. _globalredirect_is_active() checks the script name and also checks if php is running via the command line before performing any redirects.

I've just run your test case on a fresh install with global redirect enabled and the issue doesn't occur.

I'm marking this as fixed, but please re-open the ticket if you're still experiencing the issue with the latest 7.x dev release.

Status: Fixed » Closed (fixed)

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