I've got a patch to an issue which adds a new test: #1965760: Flags should use the actual token type rather than flag type when adding tokens to entity types.

The test required another contrib module, and calls it in its setUp().

QA fails the test at the module setup stage.

Comments

tim.plunkett’s picture

You have to declare test dependencies. See #698932: "test_dependencies" for dependencies / integration tests. There's no way for the tests to sniff your setUp calls.

joachim’s picture

Category: Bug report » Support request
Status: Active » Fixed

Thanks! I'd no idea about that property!

joachim’s picture

Urgh, it's still failing to enable the modules even with test_dependencies: https://qa.drupal.org/pifr/test/711333

drumm’s picture

Project: Drupal.org infrastructure » Drupal.org Testbots
Component: qa.drupal.org » unexplained test failure
Status: Fixed » Active
jthorson’s picture

I suspect that the test_dependencies will need to be committed to the repository before they can be picked up by project_dependency, which is what builds out the dependency chain for a given project.

The testing infrastructure does not calculate the dependencies to be checked out at run-time ... they are passed to qa.d.o from drupal.org based on project_dependency's view of the repositories. Therefore, adding the test dependency via a patch does not work.

Committing the test dependency to the repository, and triggering a rebuild of the project dependency calculation should resolve the issue.

jthorson’s picture

Status: Active » Needs review
joachim’s picture

> Committing the test dependency to the repository,

Done.

> and triggering a rebuild of the project dependency calculation should resolve the issue.

I presume you mean that will happen automatically when I push that commit to git?

jthorson’s picture

Status: Needs review » Fixed

I verified the dependencies were rebuilt, and retested the patch; which came back green.

FWIW, In situations like this one, we need to retest the patch from within the issue queue (i.e. triggered on d.o) instead of simply re-testing on qa.d.o; since it is d.o which builds the dependency array. Triggering a retest on qa.d.o directly does not rebuild the test array.

Status: Fixed » Closed (fixed)

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