Closed Bug 906696 Opened 6 years ago Closed 6 years ago

Start moving testplugin.mk to moz.build

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #792218 - Flags: review?(khuey)
Comment on attachment 792218 [details] [diff] [review]
Patch v1

>From: Ms2ger <ms2ger@gmail.com>
>
>diff --git a/dom/plugins/test/testplugin/moz.build b/dom/plugins/test/testplugin/moz.build
>--- a/dom/plugins/test/testplugin/moz.build
>+++ b/dom/plugins/test/testplugin/moz.build
>@@ -7,8 +7,11 @@
> DIRS += ['secondplugin']
> 
> MODULE = 'nptest'
> NO_DIST_INSTALL = True
> 
> LIBRARY_NAME = 'nptest'
> 
> FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
>+
>+relative_path = '.'
>+include('testplugin.build')

Ms2ger: Please use the '.mozbuild' extension to match the rest of the tree.

gps: This is similar to the discussion we had in bug 900974. Would your concerns in #c7 go away if the "relative_path" variable was calculated automatically in frontend/reader.py:_include(), and used as it is here in testplugin.build? Then we could just do include('testplugin.mozbuild') or include('../testplugin.mozbuild'), and relative_path (or some other magic variable name) is defined by mozbuild for the included file. The included file still has to do the explicit path expansion, rather than having it be automatic:

CPP_SOURCES += [
    relative_path + '/nptest.cpp',
    relative_path + '/nptest_utils.cpp',
    'nptest_name.cpp',
]


Note that this mozbuild file also has a local file (nptest_name.cpp) that is expected to be in the directory of the moz.build file, not in the directory of testplugin.mozbuild. So using absolute paths here isn't really possible, like we were thinking of doing in 900974.
Attachment #792218 - Flags: feedback?(gps)
Comment on attachment 792218 [details] [diff] [review]
Patch v1

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

I'm fine with hacking things like this.
Attachment #792218 - Flags: feedback?(gps) → feedback+
Comment on attachment 792218 [details] [diff] [review]
Patch v1

r+ assuming testplugin.build -> testplugin.mozbuild

We can do the relative_path thing automatically later if we want :)
Attachment #792218 - Flags: review?(mshal) → review+
https://hg.mozilla.org/mozilla-central/rev/511fbeed2a3b
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.