Bug 1484503 - Ensure spidermonkey style check output is deterministic. r=jandem
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 20 Aug 2018 06:44:07 -0400
changeset 487441 7a34cfe5e1962171bf56bdb9dd162e538dfefc95
parent 487440 d2dd172726371ade8959495deb5c1cf60dc7fa29
child 487442 03dfadb39d50cfc6822a66435e003c0b8802f8b8
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1484503
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1484503 - Ensure spidermonkey style check output is deterministic. r=jandem
config/check_spidermonkey_style.py
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -128,34 +128,34 @@ oddly_ordered_inclnames = set([
 # ways.  Here is the output we expect.  If the actual output differs from
 # this, one of the following must have happened.
 # - New SpiderMonkey code violates one of the checked rules.
 # - The tests/style/ files have changed without expected_output being changed
 #   accordingly.
 # - This script has been broken somehow.
 #
 expected_output = '''\
-js/src/tests/style/BadIncludes2.h:1: error:
-    vanilla header includes an inline-header file "tests/style/BadIncludes2-inl.h"
-
 js/src/tests/style/BadIncludes.h:3: error:
     the file includes itself
 
 js/src/tests/style/BadIncludes.h:6: error:
     "BadIncludes2.h" is included using the wrong path;
     did you forget a prefix, or is the file not yet committed?
 
 js/src/tests/style/BadIncludes.h:8: error:
     <tests/style/BadIncludes2.h> should be included using
     the #include "..." form
 
 js/src/tests/style/BadIncludes.h:10: error:
     "stdio.h" is included using the wrong path;
     did you forget a prefix, or is the file not yet committed?
 
+js/src/tests/style/BadIncludes2.h:1: error:
+    vanilla header includes an inline-header file "tests/style/BadIncludes2-inl.h"
+
 js/src/tests/style/BadIncludesOrder-inl.h:5:6: error:
     "vm/JSScript-inl.h" should be included after "vm/Interpreter-inl.h"
 
 js/src/tests/style/BadIncludesOrder-inl.h:6:7: error:
     "vm/Interpreter-inl.h" should be included after "js/Value.h"
 
 js/src/tests/style/BadIncludesOrder-inl.h:7:8: error:
     "js/Value.h" should be included after "ds/LifoAlloc.h"
@@ -301,17 +301,17 @@ def check_style(enable_fixup):
     edges = dict()      # type: dict(inclname, set(inclname))
 
     # We don't care what's inside the MFBT and MOZALLOC files, but because they
     # are #included from JS files we have to add them to the inclusion graph.
     for inclname in non_js_inclnames:
         edges[inclname] = set()
 
     # Process all the JS files.
-    for filename in js_names.keys():
+    for filename in sorted(js_names.keys()):
         inclname = js_names[filename]
         file_kind = FileKind.get(filename)
         if file_kind == FileKind.C or file_kind == FileKind.CPP or \
            file_kind == FileKind.H or file_kind == FileKind.INL_H:
             included_h_inclnames = set()    # type: set(inclname)
 
             with open(filename) as f:
                 code = read_file(f)