Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit e5b1bb9

Browse files
committed
Bug 1229233 - Add a (incomplete) end-to-end build test. r=gps
We have many unit tests in the tree for some small parts of the build system pipeline, but we don't have anything that resembles an end to end test, and we kind of rely on the resulting Firefox not being broken by our changes. With the Faster make backend growing, I want to ensure it produces the same thing as the recursive make backend, at least for the parts it supports. This adds some kind of test that allows to check that.
1 parent b80b97e commit e5b1bb9

21 files changed

Lines changed: 324 additions & 0 deletions

File tree

Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ else
3434
configure_dir = $(topsrcdir)
3535
endif
3636

37+
ifndef TEST_MOZBUILD
3738
ifndef MOZ_PROFILE_USE
3839
# We need to explicitly put backend.RecursiveMakeBackend here
3940
# otherwise the rule in rules.mk doesn't run early enough.
@@ -44,6 +45,7 @@ $(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
4445
endif
4546
endif
4647
endif
48+
endif
4749

4850
ifdef JS_STANDALONE
4951
.PHONY: CLOBBER
@@ -81,6 +83,7 @@ config.status js/src/config.status:
8183
# The mach build driver will ensure the backend is up to date for partial tree
8284
# builds. This cleanly avoids most of the pain.
8385

86+
ifndef TEST_MOZBUILD
8487
backend.RecursiveMakeBackend:
8588
@echo 'Build configuration changed. Regenerating backend.'
8689
$(PYTHON) config.status
@@ -91,6 +94,7 @@ Makefile: backend.RecursiveMakeBackend
9194
include backend.RecursiveMakeBackend.pp
9295

9396
default:: backend.RecursiveMakeBackend
97+
endif
9498

9599
install_manifests := \
96100
$(addprefix dist/,bin branding idl include public private sdk xpi-stage) \

config/faster/rules.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ default: $(addprefix install-,$(INSTALL_MANIFESTS))
4343

4444
# Explicit files to be built for a default build
4545
default: $(addprefix $(TOPOBJDIR)/,$(MANIFEST_TARGETS))
46+
ifndef TEST_MOZBUILD
4647
default: $(TOPOBJDIR)/dist/bin/platform.ini
48+
endif
4749

4850
ifndef NO_XPIDL
4951
# Targets from the recursive make backend to be built for a default build
@@ -52,6 +54,9 @@ endif
5254

5355
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
5456
# Mac builds require to copy things in dist/bin/*.app
57+
# TODO: remove the MOZ_WIDGET_TOOLKIT and MOZ_BUILD_APP variables from
58+
# faster/Makefile and python/mozbuild/mozbuild/test/backend/test_build.py
59+
# when this is not required anymore.
5560
default:
5661
$(MAKE) -C $(TOPOBJDIR)/$(MOZ_BUILD_APP)/app repackage
5762
endif

python/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ PYTHON_UNIT_TESTS += [
3535
'mozbuild/mozbuild/test/backend/__init__.py',
3636
'mozbuild/mozbuild/test/backend/common.py',
3737
'mozbuild/mozbuild/test/backend/test_android_eclipse.py',
38+
'mozbuild/mozbuild/test/backend/test_build.py',
3839
'mozbuild/mozbuild/test/backend/test_configenvironment.py',
3940
'mozbuild/mozbuild/test/backend/test_recursivemake.py',
4041
'mozbuild/mozbuild/test/backend/test_visualstudio.py',
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
DIST_SUBDIR = 'app'
2+
3+
EXTRA_JS_MODULES += [
4+
'../foo.jsm',
5+
]
6+
7+
EXTRA_JS_MODULES.child += [
8+
'../bar.jsm',
9+
]
10+
11+
EXTRA_PP_JS_MODULES += [
12+
'../baz.jsm',
13+
]
14+
15+
EXTRA_PP_JS_MODULES.child2 += [
16+
'../qux.jsm',
17+
]
18+
19+
FINAL_TARGET_FILES += [
20+
'../foo.ini',
21+
]
22+
23+
FINAL_TARGET_FILES.child += [
24+
'../bar.ini',
25+
]
26+
27+
FINAL_TARGET_PP_FILES += [
28+
'../baz.ini',
29+
]
30+
31+
FINAL_TARGET_PP_FILES.child2 += [
32+
'../qux.ini',
33+
]
34+
35+
EXTRA_COMPONENTS += [
36+
'../components.manifest',
37+
'../foo.js',
38+
]
39+
40+
EXTRA_PP_COMPONENTS += [
41+
'../bar.js',
42+
]
43+
44+
JS_PREFERENCE_FILES += [
45+
'../prefs.js',
46+
]
47+
48+
DEFINES['FOO'] = 'bar'
49+
DEFINES['BAR'] = True
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bar.ini
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#filter substitution
2+
bar.js: FOO is @FOO@
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bar.jsm
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#filter substitution
2+
baz.ini: FOO is @FOO@
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#filter substitution
2+
baz.jsm: FOO is @FOO@
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
component {foo} foo.js
2+
component {bar} bar.js

0 commit comments

Comments
 (0)