~catch-drupal/+junk/pressflow-content-cache-variable

« back to all changes in this revision

Viewing changes to modules/simpletest/run-tests.sh

  • Committer: David Strauss
  • Date: 2010-06-23 21:02:47 UTC
  • mfrom: (82.1.7 merge-drupal-6.17)
  • Revision ID: david@fourkitchens.com-20100623210247-ggd9fi82dyiayz98
Merge changes from the 6.17 branch that were intended for the mainline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: run-tests.sh,v 1.1.2.5 2009/09/05 13:34:10 boombatower Exp $
 
2
// $Id: run-tests.sh,v 1.1.2.7 2009/10/19 01:49:41 boombatower Exp $
3
3
// Core: Id: run-tests.sh,v 1.35 2009/08/17 19:14:41 webchick Exp
4
4
 
5
5
/**
152
152
  <test1>[,<test2>[,<test3> ...]]
153
153
 
154
154
              One or more tests to be run. By default, these are interpreted
155
 
              as the names of test groups as shown at 
 
155
              as the names of test groups as shown at
156
156
              ?q=admin/build/testing.
157
157
              These group names typically correspond to module names like "User"
158
158
              or "Profile" or "System", but there is also a group "XML-RPC".
366
366
  require_once drupal_get_path('module', 'simpletest') . '/drupal_web_test_case.php';
367
367
  $classes = simpletest_test_get_all_classes();
368
368
  require_once $classes[$test_class]['file'];
369
 
  
 
369
 
370
370
  $test = new $test_class($test_id);
371
371
  $test->run();
372
372
  $info = $test->getInfo();
415
415
      }
416
416
    }
417
417
    elseif ($args['file']) {
 
418
      require_once drupal_get_path('module', 'simpletest') . '/drupal_web_test_case.php';
418
419
      $files = array();
419
420
      foreach ($args['test_names'] as $file) {
420
421
//        $files[drupal_realpath($file)] = 1;
421
422
        $files[realpath($file)] = 1;
 
423
        require_once realpath($file);
422
424
      }
423
425
 
424
426
      // Check for valid class names.
425
427
      foreach ($all_tests as $class_name) {
426
 
        $refclass = new ReflectionClass($class_name);
427
 
        $file = $refclass->getFileName();
428
 
        if (isset($files[$file])) {
429
 
          $test_list[] = $class_name;
 
428
        if (class_exists($class_name, FALSE)) {
 
429
          $refclass = new ReflectionClass($class_name);
 
430
          if (isset($files[$refclass->getFileName()])) {
 
431
            $test_list[] = $class_name;
 
432
          }
430
433
        }
431
434
      }
432
435
    }