2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, # You can obtain one at http://mozilla.org/MPL/2.0/.
7 Check that the current sourcemap and worker bundles built for DevTools are up to date.
8 This job should fail if any file impacting the bundle creation was modified without
9 regenerating the bundles.
11 This check should be run after building the bundles via:
12 cd devtools/client/debugger
13 yarn && node bin/bundle.js
15 Those steps are done in the devtools-verify-bundle job, prior to calling this script.
16 The script will only run `hg status devtools/` and check that no change is detected by
25 print("Run `hg status devtools/`")
27 subprocess
.check_output(["hg", "status", "-n", "devtools/"])
34 doc
= "https://firefox-source-docs.mozilla.org/devtools/tests/node-tests.html#devtools-bundle"
42 if "module-manifest.json" in l
:
43 # Ignore module-manifest.json updates which can randomly happen when
54 + " is outdated and needs to be regenerated, "
55 + f
"instructions at: {doc}",
59 # Revert all the changes created by `node bin/bundle.js`
60 subprocess
.check_output(["hg", "revert", "-C", "devtools/"])
62 parser
= argparse
.ArgumentParser()
63 parser
.add_argument("--output", required
=True)
64 args
= parser
.parse_args()
66 with
open(args
.output
, "w") as fp
:
67 json
.dump(failures
, fp
, indent
=2)
71 "TEST-UNEXPECTED-FAIL | devtools-bundle | DevTools bundles need to be regenerated, "
72 + f
"instructions at: {doc}"
75 print("The following devtools bundles were detected as outdated:")
76 for failure
in failures
: