Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298686

scripts/run-tests.sh does not warn the user about an invalid xml path prior to test run (or at all)

$
0
0

Problem/Motivation

When providing an invalid xml path, no warnings are provided to the user prior to the test run. The attached patch provides these warnings and prevents the test run.

To reproduce: Run tests with anything but a writable directory path

  • php scripts/run-tests.sh --xml ~/bad_path AJAX
  • php scripts/run-tests.sh --xml ~/afile AJAX
  • php scripts/run-tests.sh --xml ~/adirectory_nowrite AJAX

What was expected: To be warned and halt the test run, since my data knowingly will not be saved.

  • ERROR: Error: supplied --xml path of '/home/user/afile' is not a directory
  • ERROR: Error: supplied --xml path of '/home/user/afile' is not a directory
  • ERROR: Error: supplied --xml path of '/home/user/adirectory_nowrite' is not writable

Instead: Tests are run, no warnings issued, and no data is saved.

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

Tests to be run:
- AJAX commands (AJAXCommandsTestCase)
- Miscellaneous AJAX tests (AJAXElementValidation)
- AJAX command form values (AJAXFormValuesTestCase)
- AJAX framework (AJAXFrameworkTestCase)
- AJAX multi form (AJAXMultiFormTestCase)

Test run started:
Wednesday, October 30, 2013 - 14:41

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

AJAX commands 36 passes, 35 fails, 45 exceptions, and 16 debug messages
Miscellaneous AJAX tests 5 passes, 3 fails, 2 exceptions, and 1 debug message
AJAX command form values 16 passes, 20 fails, 15 exceptions, and 6 debug messages
FATAL AJAXFrameworkTestCase: test runner returned a non-zero error code (255).
AJAX multi form 17 passes, 21 fails, 8 exceptions, and 2 debug messages

Test run duration: 51 sec

Steps to reproduce

Use runtests.sh

Proposed resolution

Check that the path is a directory and writable and executable.

Remaining tasks

Review
Manual testing

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298686