gecko/dom/imptests/parseManifest.py
Ms2ger e9861b5e27 Bug 752202 - Shorten the paths to imported tests some more to hopefully fix C-C windows builds; rs=Standard8
--HG--
rename : dom/imported-tests/Makefile.in => dom/imptests/Makefile.in
rename : dom/imported-tests/README => dom/imptests/README
rename : dom/imported-tests/WebIDLParser.js => dom/imptests/WebIDLParser.js
rename : dom/imported-tests/failures.txt => dom/imptests/failures.txt
rename : dom/imported-tests/html.json => dom/imptests/html.json
rename : dom/imported-tests/html.mk => dom/imptests/html.mk
rename : dom/imported-tests/html.txt => dom/imptests/html.txt
rename : dom/imported-tests/html/tests/submission/Mozilla/Makefile.in => dom/imptests/html/tests/submission/Mozilla/Makefile.in
rename : dom/imported-tests/html/tests/submission/Mozilla/nested-document-write-external.js => dom/imptests/html/tests/submission/Mozilla/nested-document-write-external.js
rename : dom/imported-tests/html/tests/submission/Mozilla/test_body-onload.html => dom/imptests/html/tests/submission/Mozilla/test_body-onload.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_pageload-image.html => dom/imptests/html/tests/submission/Mozilla/test_pageload-image.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_pageload-video.html => dom/imptests/html/tests/submission/Mozilla/test_pageload-video.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_script-for-onload.html => dom/imptests/html/tests/submission/Mozilla/test_script-for-onload.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_window-onerror-parse-error.html => dom/imptests/html/tests/submission/Mozilla/test_window-onerror-parse-error.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_window-onerror-runtime-error-throw.html => dom/imptests/html/tests/submission/Mozilla/test_window-onerror-runtime-error-throw.html
rename : dom/imported-tests/html/tests/submission/Mozilla/test_window-onerror-runtime-error.html => dom/imptests/html/tests/submission/Mozilla/test_window-onerror-runtime-error.html
rename : dom/imported-tests/idlharness.js => dom/imptests/idlharness.js
rename : dom/imported-tests/importTestsuite.py => dom/imptests/importTestsuite.py
rename : dom/imported-tests/parseManifest.py => dom/imptests/parseManifest.py
rename : dom/imported-tests/testharness.css => dom/imptests/testharness.css
rename : dom/imported-tests/testharness.js => dom/imptests/testharness.js
rename : dom/imported-tests/testharnessreport.js.in => dom/imptests/testharnessreport.js.in
rename : dom/imported-tests/updateTestharness.py => dom/imptests/updateTestharness.py
rename : dom/imported-tests/webapps.json => dom/imptests/webapps.json
rename : dom/imported-tests/webapps.mk => dom/imptests/webapps.mk
rename : dom/imported-tests/webapps.txt => dom/imptests/webapps.txt
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/Makefile.in => dom/imptests/webapps/DOMCore/tests/submissions/Opera/Makefile.in
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-01.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-01.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-02.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-02.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-03.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-03.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-04.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-04.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-05.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-05.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-06.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-06.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-07.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-07.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-08.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-08.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-09.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-09.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-10.xml
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-11.xml
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-12.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-12.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-13.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-13.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-14.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-14.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-15.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-15.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-16.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-16.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-17.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-17.htm
rename : dom/imported-tests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-18.htm => dom/imptests/webapps/DOMCore/tests/submissions/Opera/test_getElementsByClassName-18.htm
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/Makefile.in => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/Makefile.in
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/Makefile.in => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/Makefile.in
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_change_item_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_change_item_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_security_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_security_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_set_item_clear_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_set_item_clear_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_set_item_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/local_set_item_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_change_item_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_change_item_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_set_item_clear_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_set_item_clear_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_set_item_iframe.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/iframe/session_set_item_iframe.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_constructor.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_constructor.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_key.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_key.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_newvalue.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_newvalue.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_oldvalue.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_oldvalue.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_storagearea.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_storagearea.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_storageeventinit.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_storageeventinit.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_url.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_local_url.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_key.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_key.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_newvalue.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_newvalue.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_storagearea.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_storagearea.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_storageeventinit.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_storageeventinit.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_url.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_url.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_clear.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_clear.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_getitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_getitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_key.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_key.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_length.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_length.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_removeitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_removeitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_security.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_security.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_setitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_local_setitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_clear.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_clear.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_getitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_getitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_key.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_key.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_length.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_length.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_removeitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_removeitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_setitem.html => dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_storage_session_setitem.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Makefile.in => dom/imptests/webapps/WebStorage/tests/submissions/Makefile.in
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/Makefile.in => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/Makefile.in
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_clear_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_clear_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_getitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_getitem_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_in_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_in_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_index_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_index_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_length_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_length_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_removeitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_removeitem_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_setitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_local_setitem_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_clear_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_clear_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_getitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_getitem_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_in_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_in_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_index_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_index_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_length_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_length_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_removeitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_removeitem_js.html
rename : dom/imported-tests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_setitem_js.html => dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_storage_session_setitem_js.html
rename : dom/imported-tests/writeReporter.py => dom/imptests/writeReporter.py
2012-05-05 16:00:30 +02:00

65 lines
2.4 KiB
Python

# Copyright (C) 2011-2012 Ms2ger
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
def parseManifest(fd):
def parseReftestLine(chunks):
assert len(chunks) % 2 == 0
reftests = []
for i in range(2, len(chunks), 2):
if not chunks[i] in ["==", "!="]:
raise Exception("Misformatted reftest line " + line)
reftests.append([chunks[i], chunks[1], chunks[i + 1]])
return reftests
dirs = []
autotests = []
reftests = []
othertests = []
supportfiles = []
for fullline in fd:
line = fullline.strip()
if not line:
continue
chunks = line.split(" ")
if chunks[0] == "MANIFEST":
raise Exception("MANIFEST listed on line " + line)
if chunks[0] == "dir" or (chunks[0] == "support" and chunks[1] == "dir"):
dirs.append(chunks[1]);
elif chunks[0] == "ref":
if len(chunks) % 2:
raise Exception("Missing chunk in line " + line)
reftests.extend(parseReftestLine(chunks))
elif chunks[0] == "support":
supportfiles.append(chunks[1])
elif chunks[0] in ["manual", "parser"]:
othertests.append(chunks[1])
else: # automated
autotests.append(chunks[0])
return dirs, autotests, reftests, othertests, supportfiles
def parseManifestFile(path):
fp = open(path)
dirs, autotests, reftests, othertests, supportfiles = parseManifest(fp)
fp.close()
return dirs, autotests, reftests, othertests, supportfiles