Problem/Motivation

run-tests.sh ignores classes if they have whitespace before the declaration using --directory

So if you have something like

namespace MyNamespace {
   class WhateverTest {
   }
}

the test is not run. But works if you have

namespace MyNamespace {
class WhateverTest {
}
}

Proposed resolution

Change the regexp for namespace and class declarations to include \s*

Remaining tasks

Patch.

User interface changes

None.

API changes

None

Data model changes

None

CommentFileSizeAuthor
#5 2869120-5.patch872 bytesMixologic
#3 2869120-2.patch872 bytespenyaskito

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Issue summary: View changes
penyaskito’s picture

Status: Active » Needs review
StatusFileSize
new872 bytes

Adding a patch for this. Please attribute to Mixologic and berdir, I just uploaded it.

Mixologic’s picture

Version: 8.2.x-dev » 8.3.x-dev
Mixologic’s picture

StatusFileSize
new872 bytes

Re-uploads patch to trigger bot.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

I identified the problem, Mixologic came up with the fix, penyaskito wrote the patch. We can't test run-tests.sh, so I think we're good to go.

Core itself is also not directly affected as --directory is only used for contrib modules.

  • catch committed a16b7dd on 8.4.x
    Issue #2869120 by penyaskito, Mixologic, Berdir: run-tests.sh ignores...

  • catch committed 977da4b on 8.3.x
    Issue #2869120 by penyaskito, Mixologic, Berdir: run-tests.sh ignores...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.4.x and cherry-picked to 8.3.x, thanks!

mile23’s picture

We can't test run-tests.sh, so I think we're good to go.

Appreciate the sentiment, but... :-)

Here's a follow-up: #2871289: Make run-tests.sh --directory testable

Status: Fixed » Closed (fixed)

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