Updated: Comment 0

Problem/Motivation

As #2123897: Restore theme .yml support, add/fix tests has shown, run-tests --file just adds all the classes to the test, even it is not a real test.

Proposed resolution

Check whether the classes extends TestBase or UnitTestCase.

Remaining tasks

User interface changes

API changes

CommentFileSizeAuthor
#1 2129197.patch676 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Needs review
FileSize
676 bytes

Here is a patch.

Gábor Hojtsy’s picture

Title: simpletest_script_get_test_list() with --file adds non test classes » Testbot (run-tests.sh with --file) attempts to run non-test classes, fails
Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Reproduced this with the following using the core patch from #2123897-38: Restore theme .yml support, add/fix tests.

$ php ./scripts/run-tests.sh --url http://d8mi.localhost:8082/ --color --verbose --file modules/config_translation/tests/Drupal/config_translation/Tests/ConfigMapperManagerTest.php

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

Tests to be run:
 - Configuration translation mapper manager (Drupal\config_translation\Tests\ConfigMapperManagerTest)
 -  (Drupal\config_translation\Tests\TestConfigMapperManager)

Test run started:
 Thursday, November 7, 2013 - 14:53

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

 10 passes, 0 fails, and 0 exceptions

Fatal error: Class 'Drupal\config_translation\Tests\TestConfigMapperManager' not found in /Users/gabor/Web/d8mi/core/scripts/run-tests.sh on line 487
FATAL Drupal\config_translation\Tests\TestConfigMapperManager: test runner returned a non-zero error code (255).

FATAL Drupal\config_translation\Tests\TestConfigMapperManager: Found no database prefix for test ID 5. (Check whether setUp() is invoked correctly.)
Test run duration: 1 sec

After applying this patch it fabulously fixes it :)

$ php ./scripts/run-tests.sh --url http://d8mi.localhost:8082/ --color --verbose --file modules/config_translation/tests/Drupal/config_translation/Tests/ConfigMapperManagerTest.php

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

Tests to be run:
 - Configuration translation mapper manager (Drupal\config_translation\Tests\ConfigMapperManagerTest)

Test run started:
 Thursday, November 7, 2013 - 14:55

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

 10 passes, 0 fails, and 0 exceptions

Also the patch looks great on code review. Amazing patch :)

Gábor Hojtsy’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -blocker, -testbot

Committed f1ec238 and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Restore tags.

Status: Fixed » Closed (fixed)

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