This is a followup from #1900282: Tests fail with "Failed to run tests: run-tests.sh reported no tests were found".

What happened in that issue is that the module in question had a versioned dependency specified in it's info file, with the format dependencies[] = system (> 7.14) instead of dependencies[] = system (>7.14). This extra space resulted in some strange behaviour within the dependency array passed on to testbot for the module ... it contained an empty dependency array as well as a dependency on a completely unrelated module (in this case, lingotek).

Recognizing that a space between the operator and version is actually invalid syntax, it still seems like it could be a common mistake ... and it would be nice to be able to accommodate it if/when it does happen, without this sort of unexpected results.

I'm not sure if the required modifications would occur in project_dependency or the original version dependency calculation code (core?), but thought I'd start here.

Comments

trobey’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (works as designed)

Project Dependency does not parse the version requirements. It calls drupal_parse_info_file($filename) for Drupal 7 projects and earlier. This function is located in Drupal core in common.inc. For Drupal 8 projects and above, Project Dependency calls a Symfony parse function to parse the YAML file.

Project Dependency is primarily used to determine dependencies for testing projects. As a matter of principle it is not a good idea for Project Dependency to be modified to get tests to pass when there is an error in the project. This could result in websites using the wrong version of a project since Drupal will not prevent it due to the error in the info file. The resulting problems could be more serious than the problem with debugging a test failure.