Closed Bug 1234955 Opened 4 years ago Closed 4 years ago

Make TEST_DIRS a SPECIAL_VARIABLE

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

No description provided.
Using TEST_DIRS is nothing more than a shortcut for

if CONFIG['ENABLE_TESTS']:
    DIRS += [...]

As such, we might as well remove it being a separate variable, and use some
Context magic to just fill DIRS when ENABLE_TESTS is set.

The security/manager/ssl/tests/unit/moz.build change ensures that the order
of DIRS before the change is kept, not because it matters, but because it
allows to confirm that nothing else is modified by this change.
Assignee: nobody → mh+mozilla
Attachment #8701635 - Flags: review?(gps)
Comment on attachment 8701635 [details] [diff] [review]
Make TEST_DIRS a SPECIAL_VARIABLE

Review of attachment 8701635 [details] [diff] [review]:
-----------------------------------------------------------------

::: python/mozbuild/mozbuild/frontend/context.py
@@ +1995,5 @@
>          ``TESTING_JS_MODULES.foo += ['module.jsm']``.
>          """),
>  
> +    'TEST_DIRS': (lambda context: context['DIRS'] if context.config.substs.get('ENABLE_TESTS')
> +                                  else TestDirsPlaceHolder, list,

Nice hack.
Attachment #8701635 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/1bcc9c336586
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.