Merge pull request #2942 from Ms2ger/run-wpt-2

Run web-platform-tests on Travis; r=jgraham+larsberg
This commit is contained in:
Ms2ger 2014-07-28 23:22:42 +02:00
commit 32740b3012
43 changed files with 98 additions and 16993 deletions

View file

@ -58,7 +58,7 @@ check-test:
ifeq ($(CFG_OSTYPE),apple-darwin) ifeq ($(CFG_OSTYPE),apple-darwin)
.PHONY: check .PHONY: check
check: $(DEPS_CHECK_TARGETS_FAST) check-servo check-content check-ref tidy check: $(DEPS_CHECK_TARGETS_FAST) check-servo check-wpt check-content check-ref tidy
@$(call E, check: all) @$(call E, check: all)
.PHONY: check-all .PHONY: check-all
@ -99,6 +99,7 @@ check-content: contenttest
.PHONY: check-wpt .PHONY: check-wpt
check-wpt: check-wpt:
@$(call E, check: web-platform-tests)
bash $(S)src/test/wpt/run.sh $(S) $(B) $(WPTARGS) bash $(S)src/test/wpt/run.sh $(S) $(B) $(WPTARGS)
.PHONY: tidy .PHONY: tidy

11
src/test/wpt/config.ini Normal file
View file

@ -0,0 +1,11 @@
[products]
servo =
[web-platform-tests]
remote_url = https://github.com/w3c/web-platform-tests.git
branch = master
sync_path = web-platform-tests
[paths]
tests = web-platform-tests
metadata = metadata

View file

@ -1,20 +1,30 @@
[data-uri-basic.htm] [data-uri-basic.htm]
type: testharness type: testharness
expected: TIMEOUT
[GET responseText] [GET responseText]
expected: FAIL expected: TIMEOUT
[GET Content-Type] [GET Content-Type]
expected: FAIL expected: TIMEOUT
[GET Content-Type with param] [GET Content-Type with param]
expected: FAIL expected: TIMEOUT
[GET getAllResponseHeaders] [GET getAllResponseHeaders]
expected: FAIL expected: TIMEOUT
[POST responseText] [POST responseText]
expected: FAIL expected: TIMEOUT
[POST status] [POST status]
expected: FAIL expected: TIMEOUT
[GET responseText base64]
expected: TIMEOUT
[GET status]
expected: TIMEOUT
[GET statusText]
expected: TIMEOUT

View file

@ -1,29 +1,30 @@
[data-uri.htm] [data-uri.htm]
type: testharness type: testharness
expected: TIMEOUT
[XHR method GET with charset text/plain] [XHR method GET with charset text/plain]
expected: FAIL expected: TIMEOUT
[XHR method GET with charset text/plain (base64)] [XHR method GET with charset text/plain (base64)]
expected: FAIL expected: TIMEOUT
[XHR method GET with charset text/html] [XHR method GET with charset text/html]
expected: FAIL expected: TIMEOUT
[XHR method GET with charset image/png] [XHR method GET with charset image/png]
expected: FAIL expected: TIMEOUT
[XHR method POST with charset text/plain] [XHR method POST with charset text/plain]
expected: FAIL expected: TIMEOUT
[XHR method PUT with charset text/plain] [XHR method PUT with charset text/plain]
expected: FAIL expected: TIMEOUT
[XHR method DELETE with charset text/plain] [XHR method DELETE with charset text/plain]
expected: FAIL expected: TIMEOUT
[XHR method HEAD with charset text/plain] [XHR method HEAD with charset text/plain]
expected: FAIL expected: TIMEOUT
[XHR method UNICORN with charset text/plain] [XHR method UNICORN with charset text/plain]
expected: FAIL expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[open-referer.htm]
type: testharness
[XMLHttpRequest: open() - value of Referer header]
expected: FAIL

View file

@ -1,5 +1,3 @@
[open-url-about-blank-window.htm] [open-url-about-blank-window.htm]
type: testharness type: testharness
[XMLHttpRequest: open() resolving URLs (about:blank iframe)] expected: TIMEOUT
expected: FAIL

View file

@ -1,5 +0,0 @@
[open-url-fragment.htm]
type: testharness
[make sure escaped # is not removed]
expected: FAIL

View file

@ -1,11 +1,6 @@
[responsetext-decoding.htm] [responsetext-decoding.htm]
type: testharness type: testharness
[XMLHttpRequest: responseText decoding (text/plain;charset=windows-1252 %FF)] expected: TIMEOUT
expected: FAIL
[XMLHttpRequest: responseText decoding (text/plain %FF)]
expected: FAIL
[XMLHttpRequest: responseText decoding (text/plain %FE%FF)] [XMLHttpRequest: responseText decoding (text/plain %FE%FF)]
expected: FAIL expected: FAIL
@ -18,9 +13,6 @@
[XMLHttpRequest: responseText decoding (text/plain %EF%BB%BF%EF%BB%BF)] [XMLHttpRequest: responseText decoding (text/plain %EF%BB%BF%EF%BB%BF)]
expected: FAIL expected: FAIL
[XMLHttpRequest: responseText decoding (text/plain %C2)]
expected: FAIL
[XMLHttpRequest: responseText decoding (text/xml %FE%FF)] [XMLHttpRequest: responseText decoding (text/xml %FE%FF)]
expected: FAIL expected: FAIL
@ -33,9 +25,9 @@
[XMLHttpRequest: responseText decoding (text/xml %EF%BB%BF%EF%BB%BF)] [XMLHttpRequest: responseText decoding (text/xml %EF%BB%BF%EF%BB%BF)]
expected: FAIL expected: FAIL
[XMLHttpRequest: responseText decoding (text/plain %E3%81%B2)] [XMLHttpRequest: responseText decoding (application/xml %3C%3Fxml%20version%3D\'1.0\'%20encoding%3D\'windows-1252\'%3F%3E%3Cx%3E%FF%3C%2Fx%3E)]
expected: FAIL expected: FAIL
[XMLHttpRequest: responseText decoding (text/xml %3C%3Fxml%20version%3D\'1.0\'%20encoding%3D\'windows-1252\'%3F%3E%3Cx%3E%E3%81%B2%3C%2Fx%3E)] [XMLHttpRequest: responseText decoding (text/html %3C!doctype%20html%3E%3Cmeta%20charset%3Dwindows-1252%3E%FF)]
expected: FAIL expected: FAIL

View file

@ -1,5 +1,6 @@
[send-network-error-async-events.sub.htm] [send-network-error-async-events.sub.htm]
type: testharness type: testharness
expected: TIMEOUT
[XmlHttpRequest: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset)] [XmlHttpRequest: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset)]
expected: FAIL expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[send-redirect-infinite-sync.htm]
type: testharness
[XMLHttpRequest: send() - Redirects (infinite loop; sync) (301)]
expected: FAIL

View file

@ -0,0 +1,5 @@
[send-redirect-infinite.htm]
type: testharness
[XMLHttpRequest: send() - Redirects (infinite loop)]
expected: FAIL

View file

@ -1,9 +1,3 @@
[exceptions.html] [exceptions.html]
type: testharness type: testharness
expected: TIMEOUT expected: TIMEOUT
[exception.hasOwnProperty("message")]
expected: FAIL
[Object.getOwnPropertyDescriptor(exception, "message")]
expected: FAIL

View file

@ -1,3 +0,0 @@
[Event-constants.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[EventTarget-dispatchEvent.html]
type: testharness
expected: TIMEOUT

View file

@ -1,6 +1,3 @@
[Node-appendChild.html] [Node-appendChild.html]
type: testharness type: testharness
expected: TIMEOUT expected: TIMEOUT
[WebIDL tests]
expected: TIMEOUT

View file

@ -1,3 +1,3 @@
[Node-compareDocumentPosition.html] [Node-compareDocumentPosition.html]
type: testharness type: testharness
expected: TIMEOUT expected: ERROR

View file

@ -1,3 +0,0 @@
[Node-constants.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +1,3 @@
[Node-contains.html] [Node-contains.html]
type: testharness type: testharness
expected: TIMEOUT expected: ERROR

View file

@ -1,3 +1,3 @@
[Node-properties.html] [Node-properties.html]
type: testharness type: testharness
expected: TIMEOUT expected: ERROR

View file

@ -1,5 +1,3 @@
[Range-attributes.html] [Range-attributes.html]
type: testharness type: testharness
[Range attributes] disabled: Range support
expected: FAIL

View file

@ -1,3 +1,3 @@
[Range-cloneContents.html] [Range-cloneContents.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-cloneRange.html] [Range-cloneRange.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-collapse.html] [Range-collapse.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,17 +1,3 @@
[Range-commonAncestorContainer-2.html] [Range-commonAncestorContainer-2.html]
type: testharness type: testharness
[Detached Range] disabled: Range support
expected: FAIL
[Range.commonAncestorContainer]
expected: FAIL
[Range.commonAncestorContainer 1]
expected: FAIL
[Range.commonAncestorContainer 2]
expected: FAIL
[Range.commonAncestorContainer 3]
expected: FAIL

View file

@ -1,3 +1,3 @@
[Range-commonAncestorContainer.html] [Range-commonAncestorContainer.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-compareBoundaryPoints.html] [Range-compareBoundaryPoints.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,11 +1,3 @@
[Range-comparePoint-2.html] [Range-comparePoint-2.html]
type: testharness type: testharness
[Range.comparePoint] disabled: Range support
expected: FAIL
[Range.comparePoint 1]
expected: FAIL
[Range.comparePoint 2]
expected: FAIL

View file

@ -1,3 +1,3 @@
[Range-comparePoint.html] [Range-comparePoint.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-deleteContents.html] [Range-deleteContents.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,5 +1,3 @@
[Range-detach.html] [Range-detach.html]
type: testharness type: testharness
[Range.detach] disabled: Range support
expected: FAIL

View file

@ -1,3 +1,3 @@
[Range-extractContents.html] [Range-extractContents.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-insertNode.html] [Range-insertNode.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,5 +1,3 @@
[Range-intersectsNode-binding.html] [Range-intersectsNode-binding.html]
type: testharness type: testharness
[Calling intersectsNode without an argument or with an invalid argument should throw a TypeError.] disabled: Range support
expected: FAIL

View file

@ -1,3 +1,3 @@
[Range-intersectsNode.html] [Range-intersectsNode.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,5 +1,3 @@
[Range-isPointInRange.html] [Range-isPointInRange.html]
type: testharness type: testharness
[Setup] disabled: Range support
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,3 @@
[Range-selectNode.html] [Range-selectNode.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-set.html] [Range-set.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -1,3 +1,3 @@
[Range-surroundContents.html] [Range-surroundContents.html]
type: testharness type: testharness
expected: TIMEOUT disabled: Range support

View file

@ -29,17 +29,14 @@ def run_tests(**kwargs):
return wptrunner.run_tests(**kwargs) return wptrunner.run_tests(**kwargs)
def set_defaults(args): def set_defaults(args):
args.metadata_root = args.metadata_root if args.metadata_root else wptsubdir("metadata")
args.tests_root = args.tests_root if args.tests_root else wptsubdir("web-platform-tests")
args.include_manifest = args.include_manifest if args.include_manifest else wptsubdir("include.ini") args.include_manifest = args.include_manifest if args.include_manifest else wptsubdir("include.ini")
args.binary = args.binary if args.binary else os.path.join(servo_root, "build", "servo")
args.product = "servo" args.product = "servo"
args.debug_args = None rv = vars(args)
args.interactive = False wptcommandline.check_args(rv)
return vars(args) return rv
def main(): def main():
parser = wptcommandline.create_parser(False) parser = wptcommandline.create_parser()
parser.add_argument('--update-manifest', dest='update_manifest', action='store_true') parser.add_argument('--update-manifest', dest='update_manifest', action='store_true')
args = parser.parse_args() args = parser.parse_args()
if args.update_manifest: if args.update_manifest:

View file

@ -2,6 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -e
servo_root="$1" servo_root="$1"
objdir="$2" objdir="$2"
shift 2 shift 2
@ -14,6 +16,10 @@ source _virtualenv/bin/activate
if [[ $* == *--update-manifest* ]]; then if [[ $* == *--update-manifest* ]]; then
(python -c "import html5lib" &>/dev/null) || pip install html5lib (python -c "import html5lib" &>/dev/null) || pip install html5lib
fi fi
(python -c "import wptrunner" &>/dev/null) || pip install wptrunner (python -c "import wptrunner" &>/dev/null) || pip install 'wptrunner==1.0'
python $servo_root/src/test/wpt/run.py --binary $objdir/../servo "$@" python $servo_root/src/test/wpt/run.py \
--config $servo_root/src/test/wpt/config.ini \
--binary $objdir/../servo \
--log-mach - \
"$@"

View file

@ -1,2 +1,4 @@
brew install https://raw.github.com/Homebrew/homebrew-versions/master/autoconf213.rb brew install https://raw.github.com/Homebrew/homebrew-versions/master/autoconf213.rb
brew install automake libtool pkg-config brew install automake libtool pkg-config
brew install python
pip install virtualenv

View file

@ -1,3 +1,4 @@
cd build cd build
../configure ../configure
make tidy && make -j2 && make check-servo && make check-content && make check-ref-cpu make tidy && make -j2 && make check-servo && make check-content && make check-ref-cpu
WPTARGS="--processes=4" make check-wpt