diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 00000000000..a4028039d42 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,7 @@ +paths = ["support/glfw-rs"] + +[target.arm-linux-androideabi] +ar = "arm-linux-androideabi-ar" +linker = "arm-linux-androideabi-g++" + + diff --git a/.gitignore b/.gitignore index bb153da94e2..e679f107cf4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,21 @@ +/target +/rust +/cargo +/ports/cef/target +/ports/android/bin +/ports/android/libs +/ports/android/local.properties +/ports/android/obj +/components/script/dom/bindings/codegen/*.rs +/components/script/dom/bindings/codegen/_cache +/components/script/dom/bindings/codegen/Bindings +/components/script/dom/bindings/codegen/test/*.rs +/components/script/dom/bindings/codegen/RegisterBindings.cpp +/components/script/dom/bindings/codegen/PrototypeList.h +/components/script/dom/bindings/codegen/UnionTypes.h +/components/script/dom/bindings/codegen/UnionConversions.h +/.servobuild +/_virtualenv *~ *# *.o @@ -14,14 +32,6 @@ servo-test Servo.app .config.mk.last -/build* -objdir parser.out -src/components/script/dom/bindings/codegen/*.rs -src/components/script/dom/bindings/codegen/_cache/ -src/components/script/dom/bindings/codegen/Bindings/ -src/components/script/dom/bindings/codegen/test/*.rs -src/components/script/dom/bindings/codegen/RegisterBindings.cpp -src/components/script/dom/bindings/codegen/PrototypeList.h -src/components/script/dom/bindings/codegen/UnionTypes.h -src/components/script/dom/bindings/codegen/UnionConversions.h +/glfw + diff --git a/.gitmodules b/.gitmodules index 677203bd08a..bb97934e4d8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,122 +1,6 @@ -[submodule "src/support/azure/rust-azure"] - path = src/support/azure/rust-azure - url = https://github.com/servo/rust-azure.git -[submodule "src/platform/macos/rust-cocoa"] - path = src/platform/macos/rust-cocoa - url = https://github.com/servo/rust-cocoa.git -[submodule "src/support/spidermonkey/mozjs"] - path = src/support/spidermonkey/mozjs - url = https://github.com/servo/mozjs.git -[submodule "src/support/spidermonkey/rust-mozjs"] - path = src/support/spidermonkey/rust-mozjs - url = https://github.com/servo/rust-mozjs.git -[submodule "src/support/harfbuzz/rust-harfbuzz"] - path = src/support/harfbuzz/rust-harfbuzz - url = https://github.com/servo/rust-harfbuzz.git -[submodule "src/support/stb-image/rust-stb-image"] - path = src/support/stb-image/rust-stb-image - url = https://github.com/servo/rust-stb-image.git -[submodule "src/support/geom/rust-geom"] - path = src/support/geom/rust-geom - url = https://github.com/servo/rust-geom.git -[submodule "src/support/opengles/rust-opengles"] - path = src/support/opengles/rust-opengles - url = https://github.com/servo/rust-opengles.git -[submodule "src/support/layers/rust-layers"] - path = src/support/layers/rust-layers - url = https://github.com/servo/rust-layers.git -[submodule "src/support/hubbub/libhubbub"] - path = src/support/hubbub/libhubbub - url = https://github.com/servo/libhubbub.git -[submodule "src/support/libparserutils/libparserutils"] - path = src/support/libparserutils/libparserutils - url = https://github.com/servo/libparserutils.git -[submodule "src/support/hubbub/rust-hubbub"] - path = src/support/hubbub/rust-hubbub - url = https://github.com/servo/rust-hubbub.git -[submodule "src/platform/macos/rust-core-foundation"] - path = src/platform/macos/rust-core-foundation - url = https://github.com/servo/rust-core-foundation.git -[submodule "src/platform/macos/rust-io-surface"] - path = src/platform/macos/rust-io-surface - url = https://github.com/servo/rust-io-surface.git -[submodule "src/support/sharegl/sharegl"] - path = src/support/sharegl/sharegl - url = https://github.com/servo/sharegl.git -[submodule "src/platform/macos/rust-core-graphics"] - path = src/platform/macos/rust-core-graphics - url = https://github.com/servo/rust-core-graphics.git -[submodule "src/platform/macos/rust-core-text"] - path = src/platform/macos/rust-core-text - url = https://github.com/servo/rust-core-text.git -[submodule "src/platform/linux/rust-freetype"] - path = src/platform/linux/rust-freetype - url = https://github.com/servo/rust-freetype.git -[submodule "src/platform/linux/rust-fontconfig"] - path = src/platform/linux/rust-fontconfig - url = https://github.com/servo/rust-fontconfig.git -[submodule "src/platform/linux/rust-xlib"] - path = src/platform/linux/rust-xlib - url = https://github.com/servo/rust-xlib.git -[submodule "src/support/skia/skia"] - path = src/support/skia/skia - url = https://github.com/servo/skia.git -[submodule "src/support/alert/rust-alert"] - path = src/support/alert/rust-alert - url = https://github.com/servo/rust-alert.git -[submodule "src/support/glfw/glfw"] - path = src/support/glfw/glfw - url = https://github.com/servo/glfw.git -[submodule "src/support/glfw/glfw-rs"] - path = src/support/glfw/glfw-rs +[submodule "support/glfw-rs"] + path = support/glfw-rs url = https://github.com/servo/glfw-rs.git -[submodule "src/support/css/rust-cssparser"] - path = src/support/css/rust-cssparser - url = https://github.com/servo/rust-cssparser.git -[submodule "src/support/png/rust-png"] - path = src/support/png/rust-png - url = https://github.com/servo/rust-png.git -[submodule "src/support/png/libpng"] - path = src/support/png/libpng - url = https://github.com/servo/libpng.git -[submodule "src/platform/android/libexpat"] - path = src/platform/android/libexpat - url = https://github.com/servo/libexpat.git - ignore = dirty -[submodule "src/platform/android/libfreetype2"] - path = src/platform/android/libfreetype2 - url = https://github.com/servo/libfreetype2.git -[submodule "src/support/glut/rust-glut"] - path = src/support/glut/rust-glut - url = https://github.com/servo/rust-glut.git -[submodule "src/support/http/rust-http"] - path = src/support/http/rust-http - url = https://github.com/servo/rust-http -[submodule "src/support/encoding/rust-encoding"] - path = src/support/encoding/rust-encoding - url = https://github.com/servo/rust-encoding.git - branch = rust-servo -[submodule "src/support/egl/rust-egl"] - path = src/support/egl/rust-egl - url = https://github.com/servo/rust-egl.git -[submodule "src/platform/android/servo-android-glue"] - path = src/platform/android/servo-android-glue - url = https://github.com/servo/servo-android-glue.git -[submodule "src/test/wpt/web-platform-tests"] - path = src/test/wpt/web-platform-tests +[submodule "tests/wpt/web-platform-tests"] + path = tests/wpt/web-platform-tests url = https://github.com/servo/web-platform-tests.git -[submodule "src/support/phf/rust-phf"] - path = src/support/phf/rust-phf - url = https://github.com/servo/rust-phf.git -[submodule "src/support/stringcache/string-cache"] - path = src/support/stringcache/string-cache - url = https://github.com/servo/string-cache.git -[submodule "src/support/url/rust-url"] - path = src/support/url/rust-url - url = https://github.com/servo/rust-url.git -[submodule "src/support/ssl/rust-openssl"] - path = src/support/ssl/rust-openssl - url = https://github.com/servo/rust-openssl.git -[submodule "src/platform/fontconfig/fontconfig"] - path = src/platform/fontconfig/fontconfig - url = https://github.com/servo/fontconfig.git diff --git a/.travis.yml b/.travis.yml index a017922c2e9..e725a80e0ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,23 +4,14 @@ os: - linux - osx -install: -- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./travis.linux.install.deps.sh; fi -- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./travis.osx.install.deps.sh; fi +install: ./etc/ci/travis.install.sh -before_script: -- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./travis.linux.before_script.sh; fi -- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./travis.osx.before_script.sh; fi +before_script: ./etc/ci/travis.before_script.sh -script: -- mkdir -p build -- cd build -- ../mk/build.sh -- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ../travis.linux.script.sh $AFTER_BUILD; fi -- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ../travis.osx.script.sh $AFTER_BUILD; fi +script: ./etc/ci/travis.script.sh git: - submodules: true + submodules: false notifications: irc: @@ -31,18 +22,16 @@ notifications: env: global: + - LD_LIBRARY_PATH: /usr/local/lib - secure: "C/9/o+5KdTY1LZ4qZGE1+gY6mEGamG/VDHP69Om9dklfchJD6C+j8K8dvmE26FeRnLhSL7eGf1b3m6lfgkTZeVFjjiZE0Exvf1yI9Y3QPWR7ViaFxWk1z1I4HaSu4fpBo++e8FW+0EGjIkIrRtAn+bav3eDpAhgSih10KmAx4a8=" matrix: - - AFTER_BUILD=content - - AFTER_BUILD=ref + - TASKS=build,test-content,test-ref matrix: include: - - os: linux - env: AFTER_BUILD=unit-doc - os: osx - env: AFTER_BUILD=unit + env: TASKS=build,test-wpt1 - os: osx - env: AFTER_BUILD=wpt1 + env: TASKS=build,test-wpt2 - os: osx - env: AFTER_BUILD=wpt2 + env: TASKS=build-cef diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000000..8259bd7ba34 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,463 @@ +[root] +name = "servo" +version = "0.0.1" +dependencies = [ + "compositing 0.0.1", + "gfx 0.0.1", + "layout 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "script 0.0.1", + "util 0.0.1", +] + +[[package]] +name = "alert" +version = "0.1.0" +source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" +dependencies = [ + "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", +] + +[[package]] +name = "azure" +version = "0.1.0" +source = "git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)", + "freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#c04029907be1f2242d48235d3b03608b905bbd9f)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "skia-sys 0.0.20130412 (git+https://github.com/servo/skia#6d696712962fd0d41120b7a414a48417da8e6a92)", + "xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)", +] + +[[package]] +name = "canvas" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", +] + +[[package]] +name = "cocoa" +version = "0.1.0" +source = "git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f" + +[[package]] +name = "compositing" +version = "0.0.1" +dependencies = [ + "alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)", + "glut 0.0.1 (git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#c04029907be1f2242d48235d3b03608b905bbd9f)", + "layout_traits 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "script_traits 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "core_foundation" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff" + +[[package]] +name = "core_graphics" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", +] + +[[package]] +name = "core_text" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", +] + +[[package]] +name = "cssparser" +version = "0.1.0" +source = "git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f" +dependencies = [ + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", +] + +[[package]] +name = "egl" +version = "0.1.0" +source = "git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b" + +[[package]] +name = "encoding" +version = "0.1.0" +source = "git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7" + +[[package]] +name = "expat-sys" +version = "2.1.0" +source = "git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1" + +[[package]] +name = "fontconfig" +version = "0.1.0" +source = "git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544" +dependencies = [ + "fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig#1fc43065f581d70133d819070177094434cc3144)", +] + +[[package]] +name = "fontconfig-sys" +version = "2.11.1" +source = "git+https://github.com/servo/libfontconfig#1fc43065f581d70133d819070177094434cc3144" +dependencies = [ + "expat-sys 2.1.0 (git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1)", + "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521)", +] + +[[package]] +name = "freetype" +version = "0.1.0" +source = "git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e" + +[[package]] +name = "freetype-sys" +version = "2.4.11" +source = "git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521" + +[[package]] +name = "geom" +version = "0.1.0" +source = "git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489" + +[[package]] +name = "gfx" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544)", + "freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#f07c6ae3111a94945f0f04b5f0d7c4e7c20958e9)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#c04029907be1f2242d48235d3b03608b905bbd9f)", + "macros 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "glfw" +version = "0.0.1" +source = "git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390" +dependencies = [ + "link_glfw 0.1.0 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)", + "semver 0.0.1 (git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe)", +] + +[[package]] +name = "glut" +version = "0.0.1" +source = "git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1" +dependencies = [ + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", +] + +[[package]] +name = "harfbuzz" +version = "0.1.0" +source = "git+https://github.com/servo/rust-harfbuzz#f07c6ae3111a94945f0f04b5f0d7c4e7c20958e9" + +[[package]] +name = "http" +version = "0.1.0-pre" +source = "git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372" +dependencies = [ + "openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", +] + +[[package]] +name = "hubbub" +version = "0.1.0" +source = "git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b" +dependencies = [ + "hubbub-sys 0.1.2 (git+https://github.com/servo/libhubbub#6d09893991dedc616b264058442a304c03842213)", +] + +[[package]] +name = "hubbub-sys" +version = "0.1.2" +source = "git+https://github.com/servo/libhubbub#6d09893991dedc616b264058442a304c03842213" +dependencies = [ + "parserutils-sys 0.1.1 (git+http://github.com/servo/libparserutils#651b636ba1214bceeb0907adb1eab60efe0d4598)", +] + +[[package]] +name = "io_surface" +version = "0.1.0" +source = "git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", +] + +[[package]] +name = "js" +version = "0.1.0" +source = "git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6" +dependencies = [ + "mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)", +] + +[[package]] +name = "layers" +version = "0.1.0" +source = "git+https://github.com/servo/rust-layers#c04029907be1f2242d48235d3b03608b905bbd9f" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)", +] + +[[package]] +name = "layout" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "layout_traits 0.0.1", + "macros 0.0.1", + "net 0.0.1", + "script 0.0.1", + "script_traits 0.0.1", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "layout_traits" +version = "0.0.1" +dependencies = [ + "gfx 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "script_traits 0.0.1", + "util 0.0.1", +] + +[[package]] +name = "link_glfw" +version = "0.1.0" +source = "git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390" + +[[package]] +name = "macros" +version = "0.0.1" + +[[package]] +name = "mozjs-sys" +version = "0.0.0" +source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88" + +[[package]] +name = "msg" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#c04029907be1f2242d48235d3b03608b905bbd9f)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "net" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "opengles" +version = "0.1.0" +source = "git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a" + +[[package]] +name = "openssl" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a" + +[[package]] +name = "parserutils-sys" +version = "0.1.1" +source = "git+http://github.com/servo/libparserutils#651b636ba1214bceeb0907adb1eab60efe0d4598" + +[[package]] +name = "phf" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b" + +[[package]] +name = "phf_mac" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b" + +[[package]] +name = "png" +version = "0.1.0" +source = "git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16" +dependencies = [ + "png-sys 1.6.3 (git+https://github.com/servo/libpng?ref=servo#d01f32b4eb86904695efe7fc02b574f902e21a98)", +] + +[[package]] +name = "png-sys" +version = "1.6.3" +source = "git+https://github.com/servo/libpng?ref=servo#d01f32b4eb86904695efe7fc02b574f902e21a98" + +[[package]] +name = "script" +version = "0.0.1" +dependencies = [ + "canvas 0.0.1", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)", + "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)", + "js 0.1.0 (git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6)", + "macros 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "script_traits 0.0.1", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "script_traits" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "msg 0.0.1", + "net 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", +] + +[[package]] +name = "semver" +version = "0.0.1" +source = "git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe" + +[[package]] +name = "skia-sys" +version = "0.0.20130412" +source = "git+https://github.com/servo/skia#6d696712962fd0d41120b7a414a48417da8e6a92" +dependencies = [ + "expat-sys 2.1.0 (git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1)", + "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521)", +] + +[[package]] +name = "stb_image" +version = "0.1.0" +source = "git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c" + +[[package]] +name = "string_cache" +version = "0.0.0" +source = "git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1" +dependencies = [ + "phf 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)", + "phf_mac 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)", + "string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1)", +] + +[[package]] +name = "string_cache_macros" +version = "0.0.0" +source = "git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1" + +[[package]] +name = "style" +version = "0.0.1" +dependencies = [ + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "macros 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "task_info" +version = "0.0.1" + +[[package]] +name = "url" +version = "0.1.0" +source = "git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a" +dependencies = [ + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", +] + +[[package]] +name = "util" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "string_cache 0.0.0 (git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1)", + "task_info 0.0.1", +] + +[[package]] +name = "xlib" +version = "0.1.0" +source = "git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8" + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000000..a5cc706c002 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,51 @@ +[package] + +name = "servo" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "servo" +crate-type = ["rlib", "dylib"] + +[[bin]] +name = "servo" +test = false +doc = false +bench = false + +[[test]] +name = "reftest" +path = "tests/reftest.rs" +harness = false + +[[test]] +name = "contenttest" +path = "tests/contenttest.rs" +harness = false + + +[dependencies.compositing] +path = "components/compositing" + +[dependencies.net] +path = "components/net" + +[dependencies.msg] +path = "components/msg" + +[dependencies.util] +path = "components/util" + +[dependencies.script] +path = "components/script" + +[dependencies.layout] +path = "components/layout" + +[dependencies.gfx] +path = "components/gfx" + +[dependencies.png] +git = "https://github.com/servo/rust-png" + diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 30b04675954..00000000000 --- a/Makefile.in +++ /dev/null @@ -1,2 +0,0 @@ -include config.mk -include $(CFG_SRC_DIR)mk/main.mk diff --git a/ORGANIZATION.md b/ORGANIZATION.md new file mode 100644 index 00000000000..9e237010d5c --- /dev/null +++ b/ORGANIZATION.md @@ -0,0 +1,40 @@ +# Servo code organization + +## Servo components + +* `src/bin.rs`: Servo's entry point +* `src/lib.rs`: libservo entry point +* `components/layout`: The layout system. +* `components/style`: The CSS styling system. +* `components/script`: The JavaScript and DOM systems. +* `components/compositing`: The compositor and windowing systems. +* `components/gfx`: Graphics rendering, fonts, and text shaping. +* `components/net`: Networking, caching, image decoding. +* `components/msg`: Message structure definitions for inter-task communication. +* `components/*_traits`: Trait definitions to break crate dependencies. +* `components/macros`: Macros used by the rest of Servo. +* `components/util`: Various utility functions used by other Servo components. + +## Supporting libraries + +These libraries are either internal but used by Servo or external and need +special integration: + +* `support/glfw-rs`: Wrapping for the GLFW library. Will eventually move to + being completely out of tree. +* `support/rust-task_info`: A binding to the task_info library on OS X. + +## Tests + +* `tests/contenttest.rs`: Content (JavaScript) test runner +* `tests/contenttest`: Content tests +* `tests/reftest.rs`: Reference (layout) test runner +* `tests/reftest`: Reference tests +* `tests/html`: Manual test cases and examples +* `tests/power`: Tests for measuring power usage +* `tests/wpt`: Web platform tests and harness + +## Miscellaneous + +* `etc`: Various scripts and files that don't belong anywhere else. +* `etc/patches`: Patches for upstream libraries. diff --git a/README.md b/README.md index 1049b9539e6..357bbb195d8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ On Debian-based Linuxes: ``` sh sudo apt-get install autoconf2.13 curl freeglut3-dev libtool \ libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \ - msttcorefonts gperf g++ automake cmake python-virtualenv + msttcorefonts gperf g++ automake cmake python-virtualenv \ + libssl-dev ``` On Fedora: @@ -35,7 +36,8 @@ On Fedora: ``` sh sudo yum install autoconf213 curl freeglut-devel libtool gcc-c++ libXi-devel \ freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \ - fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel rpm-build + fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel \ + rpm-build openssl-devel pushd . cd /tmp wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec @@ -73,24 +75,21 @@ Servo cannot be built in-tree; you must create a directory in which to run configure and make and place the build artifacts. ``` sh -git clone https://github.com/mozilla/servo.git +git clone https://github.com/servo/servo.git cd servo -mkdir -p build && cd build -../configure -make && make check -./servo ../src/test/html/about-mozilla.html +./mach build +./mach run tests/html/about-mozilla.html ``` -###Building for Android target +### Building for Android target ``` sh -git clone https://github.com/mozilla/servo.git +git clone https://github.com/servo/servo.git cd servo -mkdir -p build && cd build -../configure --target=arm-linux-androideabi --android-cross-path= --android-ndk-path= --android-sdk-path= -make -(or make package) - +ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --target arm-linux-androideabi +cd ports/android +ANDROID_NDK=/path/to/ndk ANDROID_SDK=/path/to/sdk make +ANDROID_SDK=/path/to/sdk make install ``` ## Running @@ -113,15 +112,4 @@ make ## Developing -There are lots of make targets you can use: - -- `make clean` - cleans Servo and its dependencies, but not Rust -- `make clean-rust` - cleans Rust -- `make clean-servo` - only cleans Servo itself (code in `src/components`) -- `make clean-DEP` - cleans the dependency `DEP`. e.g. `make clean-rust-opengles` -- `make bindings` - generate the Rust WebIDL bindings -- `make DEP` - builds only the specified dependency. e.g. `make rust-opengles` -- `make check-DEP` - build and run tests for specified dependency -- `make package` - build and make app package for specific OS. e.g. apk file of Android - -The `make check-*` targets for running tests are listed [here](https://github.com/mozilla/servo/wiki/Testing) +There are lots of mach commands you can use. You can list them with `./mach --help`. diff --git a/bld/linux.py b/bld/linux.py deleted file mode 100644 index e39ecb6314d..00000000000 --- a/bld/linux.py +++ /dev/null @@ -1,11 +0,0 @@ -config = { - 'mock_target': 'mozilla-centos6-x86_64', - 'mock_packages': ['freetype-devel', 'fontconfig-devel', 'glib2-devel', 'autoconf213', 'git', 'make', 'libX11-devel', 'mesa-libGL-devel', 'freeglut-devel', - 'xorg-x11-server-devel', 'libXrandr-devel', 'libXi-devel', 'libpng-devel', 'expat-devel', 'gperf', 'gcc473_0moz1'], - 'mock_files': [('/home/servobld/.ssh', '/home/mock_mozilla/.ssh')], - 'concurrency': 6, - 'add_actions': ['setup-mock'], - 'env': {'PATH': '/tools/gcc-4.7.3-0moz1/bin:%(PATH)s', - 'LIBRARY_PATH': '/tools/gcc-4.7.3-0moz1/lib64', - 'LD_LIBRARY_PATH': '/tools/gcc-4.7.3-0moz1/lib64'}, -} diff --git a/bld/mac.py b/bld/mac.py deleted file mode 100644 index c97f935bce2..00000000000 --- a/bld/mac.py +++ /dev/null @@ -1,3 +0,0 @@ -config = { - 'concurrency': 6, -} diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml new file mode 100644 index 00000000000..7b80f00f12d --- /dev/null +++ b/components/canvas/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "canvas" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "canvas" +path = "lib.rs" + +[dependencies.azure] +git = "https://github.com/servo/rust-azure" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" diff --git a/src/components/canvas/canvas_render_task.rs b/components/canvas/canvas_render_task.rs similarity index 100% rename from src/components/canvas/canvas_render_task.rs rename to components/canvas/canvas_render_task.rs diff --git a/src/components/canvas/canvas.rs b/components/canvas/lib.rs similarity index 84% rename from src/components/canvas/canvas.rs rename to components/canvas/lib.rs index a74c41796c9..0dc2fb7e342 100644 --- a/src/components/canvas/canvas.rs +++ b/components/canvas/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "canvas"] -#![crate_type = "rlib"] - extern crate azure; extern crate geom; diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml new file mode 100644 index 00000000000..d9b6adc57d2 --- /dev/null +++ b/components/compositing/Cargo.toml @@ -0,0 +1,61 @@ +[package] +name = "compositing" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "compositing" +path = "lib.rs" + +[dependencies.gfx] +path = "../gfx" + +[dependencies.layout_traits] +path = "../layout_traits" + +[dependencies.script_traits] +path = "../script_traits" + +[dependencies.msg] +path = "../msg" + +[dependencies.net] +path = "../net" + +[dependencies.util] +path = "../util" + +[dependencies.alert] +git = "https://github.com/servo/rust-alert" + +[dependencies.azure] +git = "https://github.com/servo/rust-azure" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.glfw] +git = "https://github.com/servo/glfw-rs" +branch = "servo" + +[dependencies.layers] +git = "https://github.com/servo/rust-layers" + +[dependencies.opengles] +git = "https://github.com/servo/rust-opengles" + +[dependencies.png] +git = "https://github.com/servo/rust-png" + +[dependencies.url] +git = "https://github.com/servo/rust-url" + +[dependencies.core_graphics] +git = "https://github.com/servo/rust-core-graphics" + +[dependencies.core_text] +git = "https://github.com/servo/rust-core-text" + +[dependencies.glut] +git = "https://github.com/servo/rust-glut" + diff --git a/src/components/compositing/compositor.rs b/components/compositing/compositor.rs similarity index 100% rename from src/components/compositing/compositor.rs rename to components/compositing/compositor.rs diff --git a/src/components/compositing/compositor_data.rs b/components/compositing/compositor_data.rs similarity index 100% rename from src/components/compositing/compositor_data.rs rename to components/compositing/compositor_data.rs diff --git a/src/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs similarity index 100% rename from src/components/compositing/compositor_task.rs rename to components/compositing/compositor_task.rs diff --git a/src/components/compositing/constellation.rs b/components/compositing/constellation.rs similarity index 100% rename from src/components/compositing/constellation.rs rename to components/compositing/constellation.rs diff --git a/src/components/compositing/events.rs b/components/compositing/events.rs similarity index 100% rename from src/components/compositing/events.rs rename to components/compositing/events.rs diff --git a/src/components/compositing/headless.rs b/components/compositing/headless.rs similarity index 100% rename from src/components/compositing/headless.rs rename to components/compositing/headless.rs diff --git a/src/components/compositing/compositing.rs b/components/compositing/lib.rs similarity index 95% rename from src/components/compositing/compositing.rs rename to components/compositing/lib.rs index 314130919a7..a016afd11bd 100644 --- a/src/components/compositing/compositing.rs +++ b/components/compositing/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "compositing"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/src/components/compositing/pipeline.rs b/components/compositing/pipeline.rs similarity index 100% rename from src/components/compositing/pipeline.rs rename to components/compositing/pipeline.rs diff --git a/src/components/compositing/platform/common/glfw_windowing.rs b/components/compositing/platform/common/glfw_windowing.rs similarity index 100% rename from src/components/compositing/platform/common/glfw_windowing.rs rename to components/compositing/platform/common/glfw_windowing.rs diff --git a/src/components/compositing/platform/common/glut_windowing.rs b/components/compositing/platform/common/glut_windowing.rs similarity index 100% rename from src/components/compositing/platform/common/glut_windowing.rs rename to components/compositing/platform/common/glut_windowing.rs diff --git a/src/components/compositing/platform/mod.rs b/components/compositing/platform/mod.rs similarity index 100% rename from src/components/compositing/platform/mod.rs rename to components/compositing/platform/mod.rs diff --git a/src/components/compositing/windowing.rs b/components/compositing/windowing.rs similarity index 100% rename from src/components/compositing/windowing.rs rename to components/compositing/windowing.rs diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml new file mode 100644 index 00000000000..fdac5770f70 --- /dev/null +++ b/components/gfx/Cargo.toml @@ -0,0 +1,62 @@ +[package] + +name = "gfx" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "gfx" +path = "lib.rs" + +[dependencies.macros] +path = "../macros" + +[dependencies.net] +path = "../net" + +[dependencies.util] +path = "../util" + +[dependencies.msg] +path = "../msg" + +[dependencies.style] +path = "../style" + +[dependencies.azure] +git = "https://github.com/servo/rust-azure" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.layers] +git = "https://github.com/servo/rust-layers" + +[dependencies.stb_image] +git = "https://github.com/servo/rust-stb-image" + +[dependencies.png] +git = "https://github.com/servo/rust-png" + +[dependencies.url] +git = "https://github.com/servo/rust-url" + +[dependencies.harfbuzz] +git = "https://github.com/servo/rust-harfbuzz" + +[dependencies.fontconfig] +git = "https://github.com/servo/rust-fontconfig" + +[dependencies.freetype] +git = "https://github.com/servo/rust-freetype" + +[dependencies.core_foundation] +git = "http://github.com/servo/rust-core-foundation" + +[dependencies.core_graphics] +git = "http://github.com/servo/rust-core-graphics" + +[dependencies.core_text] +git = "http://github.com/servo/rust-core-text" + + diff --git a/src/components/gfx/buffer_map.rs b/components/gfx/buffer_map.rs similarity index 100% rename from src/components/gfx/buffer_map.rs rename to components/gfx/buffer_map.rs diff --git a/src/components/gfx/color.rs b/components/gfx/color.rs similarity index 100% rename from src/components/gfx/color.rs rename to components/gfx/color.rs diff --git a/src/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs similarity index 100% rename from src/components/gfx/display_list/mod.rs rename to components/gfx/display_list/mod.rs diff --git a/src/components/gfx/display_list/optimizer.rs b/components/gfx/display_list/optimizer.rs similarity index 100% rename from src/components/gfx/display_list/optimizer.rs rename to components/gfx/display_list/optimizer.rs diff --git a/src/components/gfx/font.rs b/components/gfx/font.rs similarity index 100% rename from src/components/gfx/font.rs rename to components/gfx/font.rs diff --git a/src/components/gfx/font_cache_task.rs b/components/gfx/font_cache_task.rs similarity index 100% rename from src/components/gfx/font_cache_task.rs rename to components/gfx/font_cache_task.rs diff --git a/src/components/gfx/font_context.rs b/components/gfx/font_context.rs similarity index 100% rename from src/components/gfx/font_context.rs rename to components/gfx/font_context.rs diff --git a/src/components/gfx/font_template.rs b/components/gfx/font_template.rs similarity index 100% rename from src/components/gfx/font_template.rs rename to components/gfx/font_template.rs diff --git a/src/components/gfx/gfx.rs b/components/gfx/lib.rs similarity index 97% rename from src/components/gfx/gfx.rs rename to components/gfx/lib.rs index 2cd53af5a67..838b20f71f8 100644 --- a/src/components/gfx/gfx.rs +++ b/components/gfx/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "gfx"] -#![crate_type = "rlib"] - #![feature(globs, macro_rules, phase, unsafe_destructor)] #![feature(phase)] diff --git a/src/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs similarity index 100% rename from src/components/gfx/platform/freetype/font.rs rename to components/gfx/platform/freetype/font.rs diff --git a/src/components/gfx/platform/freetype/font_context.rs b/components/gfx/platform/freetype/font_context.rs similarity index 100% rename from src/components/gfx/platform/freetype/font_context.rs rename to components/gfx/platform/freetype/font_context.rs diff --git a/src/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs similarity index 100% rename from src/components/gfx/platform/freetype/font_list.rs rename to components/gfx/platform/freetype/font_list.rs diff --git a/src/components/gfx/platform/freetype/font_template.rs b/components/gfx/platform/freetype/font_template.rs similarity index 100% rename from src/components/gfx/platform/freetype/font_template.rs rename to components/gfx/platform/freetype/font_template.rs diff --git a/src/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs similarity index 100% rename from src/components/gfx/platform/macos/font.rs rename to components/gfx/platform/macos/font.rs diff --git a/src/components/gfx/platform/macos/font_context.rs b/components/gfx/platform/macos/font_context.rs similarity index 100% rename from src/components/gfx/platform/macos/font_context.rs rename to components/gfx/platform/macos/font_context.rs diff --git a/src/components/gfx/platform/macos/font_list.rs b/components/gfx/platform/macos/font_list.rs similarity index 100% rename from src/components/gfx/platform/macos/font_list.rs rename to components/gfx/platform/macos/font_list.rs diff --git a/src/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs similarity index 100% rename from src/components/gfx/platform/macos/font_template.rs rename to components/gfx/platform/macos/font_template.rs diff --git a/src/components/gfx/platform/mod.rs b/components/gfx/platform/mod.rs similarity index 100% rename from src/components/gfx/platform/mod.rs rename to components/gfx/platform/mod.rs diff --git a/src/components/gfx/render_context.rs b/components/gfx/render_context.rs similarity index 100% rename from src/components/gfx/render_context.rs rename to components/gfx/render_context.rs diff --git a/src/components/gfx/render_task.rs b/components/gfx/render_task.rs similarity index 100% rename from src/components/gfx/render_task.rs rename to components/gfx/render_task.rs diff --git a/src/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs similarity index 100% rename from src/components/gfx/text/glyph.rs rename to components/gfx/text/glyph.rs diff --git a/src/components/gfx/text/mod.rs b/components/gfx/text/mod.rs similarity index 100% rename from src/components/gfx/text/mod.rs rename to components/gfx/text/mod.rs diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs similarity index 100% rename from src/components/gfx/text/shaping/harfbuzz.rs rename to components/gfx/text/shaping/harfbuzz.rs diff --git a/src/components/gfx/text/shaping/mod.rs b/components/gfx/text/shaping/mod.rs similarity index 100% rename from src/components/gfx/text/shaping/mod.rs rename to components/gfx/text/shaping/mod.rs diff --git a/src/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs similarity index 100% rename from src/components/gfx/text/text_run.rs rename to components/gfx/text/text_run.rs diff --git a/src/components/gfx/text/util.rs b/components/gfx/text/util.rs similarity index 100% rename from src/components/gfx/text/util.rs rename to components/gfx/text/util.rs diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml new file mode 100644 index 00000000000..9d8e8abbdaa --- /dev/null +++ b/components/layout/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "layout" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "layout" +path = "lib.rs" + +[dependencies.gfx] +path = "../gfx" + +[dependencies.script] +path = "../script" + +[dependencies.layout_traits] +path = "../layout_traits" + +[dependencies.script_traits] +path = "../script_traits" + +[dependencies.style] +path = "../style" + +[dependencies.macros] +path = "../macros" + +[dependencies.net] +path = "../net" + +[dependencies.util] +path = "../util" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.url] +git = "https://github.com/servo/rust-url" diff --git a/src/components/layout/block.rs b/components/layout/block.rs similarity index 100% rename from src/components/layout/block.rs rename to components/layout/block.rs diff --git a/src/components/layout/construct.rs b/components/layout/construct.rs similarity index 100% rename from src/components/layout/construct.rs rename to components/layout/construct.rs diff --git a/src/components/layout/context.rs b/components/layout/context.rs similarity index 100% rename from src/components/layout/context.rs rename to components/layout/context.rs diff --git a/src/components/layout/css/matching.rs b/components/layout/css/matching.rs similarity index 100% rename from src/components/layout/css/matching.rs rename to components/layout/css/matching.rs diff --git a/src/components/layout/css/node_style.rs b/components/layout/css/node_style.rs similarity index 100% rename from src/components/layout/css/node_style.rs rename to components/layout/css/node_style.rs diff --git a/src/components/layout/css/node_util.rs b/components/layout/css/node_util.rs similarity index 100% rename from src/components/layout/css/node_util.rs rename to components/layout/css/node_util.rs diff --git a/src/components/layout/extra.rs b/components/layout/extra.rs similarity index 100% rename from src/components/layout/extra.rs rename to components/layout/extra.rs diff --git a/src/components/layout/floats.rs b/components/layout/floats.rs similarity index 100% rename from src/components/layout/floats.rs rename to components/layout/floats.rs diff --git a/src/components/layout/flow.rs b/components/layout/flow.rs similarity index 100% rename from src/components/layout/flow.rs rename to components/layout/flow.rs diff --git a/src/components/layout/flow_list.rs b/components/layout/flow_list.rs similarity index 100% rename from src/components/layout/flow_list.rs rename to components/layout/flow_list.rs diff --git a/src/components/layout/flow_ref.rs b/components/layout/flow_ref.rs similarity index 100% rename from src/components/layout/flow_ref.rs rename to components/layout/flow_ref.rs diff --git a/src/components/layout/fragment.rs b/components/layout/fragment.rs similarity index 100% rename from src/components/layout/fragment.rs rename to components/layout/fragment.rs diff --git a/src/components/layout/incremental.rs b/components/layout/incremental.rs similarity index 100% rename from src/components/layout/incremental.rs rename to components/layout/incremental.rs diff --git a/src/components/layout/inline.rs b/components/layout/inline.rs similarity index 100% rename from src/components/layout/inline.rs rename to components/layout/inline.rs diff --git a/src/components/layout/layout_debug.rs b/components/layout/layout_debug.rs similarity index 100% rename from src/components/layout/layout_debug.rs rename to components/layout/layout_debug.rs diff --git a/src/components/layout/layout_task.rs b/components/layout/layout_task.rs similarity index 100% rename from src/components/layout/layout_task.rs rename to components/layout/layout_task.rs diff --git a/src/components/layout/layout.rs b/components/layout/lib.rs similarity index 96% rename from src/components/layout/layout.rs rename to components/layout/lib.rs index a9ee00319f7..a782f4e1355 100644 --- a/src/components/layout/layout.rs +++ b/components/layout/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "layout"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/src/components/layout/model.rs b/components/layout/model.rs similarity index 100% rename from src/components/layout/model.rs rename to components/layout/model.rs diff --git a/src/components/layout/parallel.rs b/components/layout/parallel.rs similarity index 100% rename from src/components/layout/parallel.rs rename to components/layout/parallel.rs diff --git a/src/components/layout/table.rs b/components/layout/table.rs similarity index 100% rename from src/components/layout/table.rs rename to components/layout/table.rs diff --git a/src/components/layout/table_caption.rs b/components/layout/table_caption.rs similarity index 100% rename from src/components/layout/table_caption.rs rename to components/layout/table_caption.rs diff --git a/src/components/layout/table_cell.rs b/components/layout/table_cell.rs similarity index 100% rename from src/components/layout/table_cell.rs rename to components/layout/table_cell.rs diff --git a/src/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs similarity index 100% rename from src/components/layout/table_colgroup.rs rename to components/layout/table_colgroup.rs diff --git a/src/components/layout/table_row.rs b/components/layout/table_row.rs similarity index 100% rename from src/components/layout/table_row.rs rename to components/layout/table_row.rs diff --git a/src/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs similarity index 100% rename from src/components/layout/table_rowgroup.rs rename to components/layout/table_rowgroup.rs diff --git a/src/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs similarity index 100% rename from src/components/layout/table_wrapper.rs rename to components/layout/table_wrapper.rs diff --git a/src/components/layout/text.rs b/components/layout/text.rs similarity index 100% rename from src/components/layout/text.rs rename to components/layout/text.rs diff --git a/src/components/layout/util.rs b/components/layout/util.rs similarity index 100% rename from src/components/layout/util.rs rename to components/layout/util.rs diff --git a/src/components/layout/wrapper.rs b/components/layout/wrapper.rs similarity index 100% rename from src/components/layout/wrapper.rs rename to components/layout/wrapper.rs diff --git a/components/layout_traits/Cargo.toml b/components/layout_traits/Cargo.toml new file mode 100644 index 00000000000..29556f9b975 --- /dev/null +++ b/components/layout_traits/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "layout_traits" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "layout_traits" +path = "lib.rs" + +[dependencies.gfx] +path = "../gfx" + +[dependencies.script_traits] +path = "../script_traits" + +[dependencies.msg] +path = "../msg" + +[dependencies.net] +path = "../net" + +[dependencies.util] +path = "../util" diff --git a/src/components/layout_traits/layout_traits.rs b/components/layout_traits/lib.rs similarity index 97% rename from src/components/layout_traits/layout_traits.rs rename to components/layout_traits/lib.rs index 572721dee24..612ba246e76 100644 --- a/src/components/layout_traits/layout_traits.rs +++ b/components/layout_traits/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "layout_traits"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/components/macros/Cargo.toml b/components/macros/Cargo.toml new file mode 100644 index 00000000000..c187d554829 --- /dev/null +++ b/components/macros/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "macros" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "macros" +path = "lib.rs" +plugin = true diff --git a/src/components/macros/macros.rs b/components/macros/lib.rs similarity index 97% rename from src/components/macros/macros.rs rename to components/macros/lib.rs index fabfc8bb7c0..20304ffe806 100644 --- a/src/components/macros/macros.rs +++ b/components/macros/lib.rs @@ -2,10 +2,7 @@ * 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/. */ -#![crate_name = "macros"] -#![crate_type = "rlib"] - -#![feature(macro_rules)] +#![feature(macro_rules, plugin_registrar, quote, phase)] //! Exports macros for use in other Servo crates. diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml new file mode 100644 index 00000000000..8fc29ca2039 --- /dev/null +++ b/components/msg/Cargo.toml @@ -0,0 +1,30 @@ +[package] + +name = "msg" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "msg" +path = "lib.rs" + +[dependencies.util] +path = "../util" + +[dependencies.azure] +git = "http://github.com/servo/rust-azure" + +[dependencies.geom] +git = "http://github.com/servo/rust-geom" + +[dependencies.layers] +git = "http://github.com/servo/rust-layers" + +[dependencies.core_foundation] +git = "http://github.com/servo/rust-core-foundation" + +[dependencies.io_surface] +git = "http://github.com/servo/rust-io-surface" + +[dependencies.url] +git = "http://github.com/servo/rust-url" diff --git a/src/components/msg/compositor_msg.rs b/components/msg/compositor_msg.rs similarity index 100% rename from src/components/msg/compositor_msg.rs rename to components/msg/compositor_msg.rs diff --git a/src/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs similarity index 100% rename from src/components/msg/constellation_msg.rs rename to components/msg/constellation_msg.rs diff --git a/src/components/msg/msg.rs b/components/msg/lib.rs similarity index 95% rename from src/components/msg/msg.rs rename to components/msg/lib.rs index fc6b7f3dd47..129ce20ca5a 100644 --- a/src/components/msg/msg.rs +++ b/components/msg/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "msg"] -#![crate_type = "rlib"] - extern crate azure; extern crate geom; extern crate layers; diff --git a/src/components/msg/platform/android/surface.rs b/components/msg/platform/android/surface.rs similarity index 100% rename from src/components/msg/platform/android/surface.rs rename to components/msg/platform/android/surface.rs diff --git a/src/components/msg/platform/linux/surface.rs b/components/msg/platform/linux/surface.rs similarity index 100% rename from src/components/msg/platform/linux/surface.rs rename to components/msg/platform/linux/surface.rs diff --git a/src/components/msg/platform/macos/surface.rs b/components/msg/platform/macos/surface.rs similarity index 100% rename from src/components/msg/platform/macos/surface.rs rename to components/msg/platform/macos/surface.rs diff --git a/src/components/msg/platform/surface.rs b/components/msg/platform/surface.rs similarity index 100% rename from src/components/msg/platform/surface.rs rename to components/msg/platform/surface.rs diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml new file mode 100644 index 00000000000..17560f4aa5c --- /dev/null +++ b/components/net/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "net" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "net" +path = "lib.rs" + +[dependencies.util] +path = "../util" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.http] +git = "https://github.com/servo/rust-http" +branch = "servo" + +[dependencies.png] +git = "https://github.com/servo/rust-png" + +[dependencies.stb_image] +git = "https://github.com/servo/rust-stb-image" + +[dependencies.url] +git = "https://github.com/servo/rust-url" diff --git a/src/components/net/data_loader.rs b/components/net/data_loader.rs similarity index 100% rename from src/components/net/data_loader.rs rename to components/net/data_loader.rs diff --git a/src/components/net/fetch/cors_cache.rs b/components/net/fetch/cors_cache.rs similarity index 100% rename from src/components/net/fetch/cors_cache.rs rename to components/net/fetch/cors_cache.rs diff --git a/src/components/net/fetch/request.rs b/components/net/fetch/request.rs similarity index 100% rename from src/components/net/fetch/request.rs rename to components/net/fetch/request.rs diff --git a/src/components/net/fetch/response.rs b/components/net/fetch/response.rs similarity index 100% rename from src/components/net/fetch/response.rs rename to components/net/fetch/response.rs diff --git a/src/components/net/file_loader.rs b/components/net/file_loader.rs similarity index 100% rename from src/components/net/file_loader.rs rename to components/net/file_loader.rs diff --git a/src/components/net/http_loader.rs b/components/net/http_loader.rs similarity index 100% rename from src/components/net/http_loader.rs rename to components/net/http_loader.rs diff --git a/src/components/net/image/base.rs b/components/net/image/base.rs similarity index 100% rename from src/components/net/image/base.rs rename to components/net/image/base.rs diff --git a/src/components/net/image/holder.rs b/components/net/image/holder.rs similarity index 100% rename from src/components/net/image/holder.rs rename to components/net/image/holder.rs diff --git a/src/components/net/image/test.jpeg b/components/net/image/test.jpeg similarity index 100% rename from src/components/net/image/test.jpeg rename to components/net/image/test.jpeg diff --git a/src/components/net/image_cache_task.rs b/components/net/image_cache_task.rs similarity index 100% rename from src/components/net/image_cache_task.rs rename to components/net/image_cache_task.rs diff --git a/src/components/net/net.rs b/components/net/lib.rs similarity index 96% rename from src/components/net/net.rs rename to components/net/lib.rs index 94290bdd7ff..bb1c5d47b1a 100644 --- a/src/components/net/net.rs +++ b/components/net/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "net"] -#![crate_type = "rlib"] - #![feature(default_type_params, globs, managed_boxes, phase)] extern crate debug; diff --git a/src/components/net/local_image_cache.rs b/components/net/local_image_cache.rs similarity index 100% rename from src/components/net/local_image_cache.rs rename to components/net/local_image_cache.rs diff --git a/src/components/net/resource_task.rs b/components/net/resource_task.rs similarity index 100% rename from src/components/net/resource_task.rs rename to components/net/resource_task.rs diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml new file mode 100644 index 00000000000..1748a57956d --- /dev/null +++ b/components/script/Cargo.toml @@ -0,0 +1,56 @@ +[package] +name = "script" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +build = "make -f makefile.cargo" + +[lib] +name = "script" +path = "lib.rs" + +[dependencies.macros] +path = "../macros" + +[dependencies.util] +path = "../util" + +[dependencies.msg] +path = "../msg" + +[dependencies.net] +path = "../net" + +[dependencies.script_traits] +path = "../script_traits" + +[dependencies.style] +path = "../style" + +[dependencies.gfx] +path = "../gfx" + +[dependencies.canvas] +path = "../canvas" + +[dependencies.cssparser] +git = "https://github.com/servo/rust-cssparser" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.hubbub] +git = "https://github.com/servo/rust-hubbub" + +[dependencies.encoding] +git = "https://github.com/lifthrasiir/rust-encoding" + +[dependencies.http] +git = "https://github.com/servo/rust-http" +branch = "servo" + +[dependencies.js] +git = "https://github.com/servo/rust-mozjs" + +[dependencies.url] +git = "https://github.com/servo/rust-url" diff --git a/src/components/script/cors.rs b/components/script/cors.rs similarity index 100% rename from src/components/script/cors.rs rename to components/script/cors.rs diff --git a/src/components/script/dom/attr.rs b/components/script/dom/attr.rs similarity index 100% rename from src/components/script/dom/attr.rs rename to components/script/dom/attr.rs diff --git a/src/components/script/dom/bindings/DESIGN.md b/components/script/dom/bindings/DESIGN.md similarity index 100% rename from src/components/script/dom/bindings/DESIGN.md rename to components/script/dom/bindings/DESIGN.md diff --git a/src/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs similarity index 100% rename from src/components/script/dom/bindings/callback.rs rename to components/script/dom/bindings/callback.rs diff --git a/src/components/script/dom/bindings/codegen/BindingGen.py b/components/script/dom/bindings/codegen/BindingGen.py similarity index 100% rename from src/components/script/dom/bindings/codegen/BindingGen.py rename to components/script/dom/bindings/codegen/BindingGen.py diff --git a/src/components/script/dom/bindings/codegen/BindingUtils.cpp b/components/script/dom/bindings/codegen/BindingUtils.cpp similarity index 100% rename from src/components/script/dom/bindings/codegen/BindingUtils.cpp rename to components/script/dom/bindings/codegen/BindingUtils.cpp diff --git a/src/components/script/dom/bindings/codegen/BindingUtils.h b/components/script/dom/bindings/codegen/BindingUtils.h similarity index 100% rename from src/components/script/dom/bindings/codegen/BindingUtils.h rename to components/script/dom/bindings/codegen/BindingUtils.h diff --git a/src/components/script/dom/bindings/codegen/Bindings.conf b/components/script/dom/bindings/codegen/Bindings.conf similarity index 100% rename from src/components/script/dom/bindings/codegen/Bindings.conf rename to components/script/dom/bindings/codegen/Bindings.conf diff --git a/src/components/script/dom/bindings/codegen/Codegen.py b/components/script/dom/bindings/codegen/Codegen.py similarity index 100% rename from src/components/script/dom/bindings/codegen/Codegen.py rename to components/script/dom/bindings/codegen/Codegen.py diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py similarity index 100% rename from src/components/script/dom/bindings/codegen/CodegenRust.py rename to components/script/dom/bindings/codegen/CodegenRust.py diff --git a/src/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py similarity index 100% rename from src/components/script/dom/bindings/codegen/Configuration.py rename to components/script/dom/bindings/codegen/Configuration.py diff --git a/src/components/script/dom/bindings/codegen/DOMJSClass.h b/components/script/dom/bindings/codegen/DOMJSClass.h similarity index 100% rename from src/components/script/dom/bindings/codegen/DOMJSClass.h rename to components/script/dom/bindings/codegen/DOMJSClass.h diff --git a/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp b/components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp similarity index 100% rename from src/components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp rename to components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp diff --git a/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.h b/components/script/dom/bindings/codegen/DOMJSProxyHandler.h similarity index 100% rename from src/components/script/dom/bindings/codegen/DOMJSProxyHandler.h rename to components/script/dom/bindings/codegen/DOMJSProxyHandler.h diff --git a/src/components/script/dom/bindings/codegen/ErrorResult.h b/components/script/dom/bindings/codegen/ErrorResult.h similarity index 100% rename from src/components/script/dom/bindings/codegen/ErrorResult.h rename to components/script/dom/bindings/codegen/ErrorResult.h diff --git a/src/components/script/dom/bindings/codegen/Errors.msg b/components/script/dom/bindings/codegen/Errors.msg similarity index 100% rename from src/components/script/dom/bindings/codegen/Errors.msg rename to components/script/dom/bindings/codegen/Errors.msg diff --git a/src/components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py b/components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py similarity index 100% rename from src/components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py rename to components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py diff --git a/src/components/script/dom/bindings/codegen/GlobalGen.py b/components/script/dom/bindings/codegen/GlobalGen.py similarity index 100% rename from src/components/script/dom/bindings/codegen/GlobalGen.py rename to components/script/dom/bindings/codegen/GlobalGen.py diff --git a/src/components/script/dom/bindings/codegen/Makefile.in b/components/script/dom/bindings/codegen/Makefile.in similarity index 100% rename from src/components/script/dom/bindings/codegen/Makefile.in rename to components/script/dom/bindings/codegen/Makefile.in diff --git a/src/components/script/dom/bindings/codegen/Nullable.h b/components/script/dom/bindings/codegen/Nullable.h similarity index 100% rename from src/components/script/dom/bindings/codegen/Nullable.h rename to components/script/dom/bindings/codegen/Nullable.h diff --git a/src/components/script/dom/bindings/codegen/PrimitiveConversions.h b/components/script/dom/bindings/codegen/PrimitiveConversions.h similarity index 100% rename from src/components/script/dom/bindings/codegen/PrimitiveConversions.h rename to components/script/dom/bindings/codegen/PrimitiveConversions.h diff --git a/src/components/script/dom/bindings/codegen/RegisterBindings.h b/components/script/dom/bindings/codegen/RegisterBindings.h similarity index 100% rename from src/components/script/dom/bindings/codegen/RegisterBindings.h rename to components/script/dom/bindings/codegen/RegisterBindings.h diff --git a/src/components/script/dom/bindings/codegen/TypedArray.h b/components/script/dom/bindings/codegen/TypedArray.h similarity index 100% rename from src/components/script/dom/bindings/codegen/TypedArray.h rename to components/script/dom/bindings/codegen/TypedArray.h diff --git a/src/components/script/dom/bindings/codegen/crashtests/769464.html b/components/script/dom/bindings/codegen/crashtests/769464.html similarity index 100% rename from src/components/script/dom/bindings/codegen/crashtests/769464.html rename to components/script/dom/bindings/codegen/crashtests/769464.html diff --git a/src/components/script/dom/bindings/codegen/crashtests/crashtests.list b/components/script/dom/bindings/codegen/crashtests/crashtests.list similarity index 100% rename from src/components/script/dom/bindings/codegen/crashtests/crashtests.list rename to components/script/dom/bindings/codegen/crashtests/crashtests.list diff --git a/src/components/script/dom/bindings/codegen/parser/README b/components/script/dom/bindings/codegen/parser/README similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/README rename to components/script/dom/bindings/codegen/parser/README diff --git a/src/components/script/dom/bindings/codegen/parser/UPSTREAM b/components/script/dom/bindings/codegen/parser/UPSTREAM similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/UPSTREAM rename to components/script/dom/bindings/codegen/parser/UPSTREAM diff --git a/src/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/WebIDL.py rename to components/script/dom/bindings/codegen/parser/WebIDL.py diff --git a/src/components/script/dom/bindings/codegen/parser/external.patch b/components/script/dom/bindings/codegen/parser/external.patch similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/external.patch rename to components/script/dom/bindings/codegen/parser/external.patch diff --git a/src/components/script/dom/bindings/codegen/parser/module.patch b/components/script/dom/bindings/codegen/parser/module.patch similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/module.patch rename to components/script/dom/bindings/codegen/parser/module.patch diff --git a/src/components/script/dom/bindings/codegen/parser/runtests.py b/components/script/dom/bindings/codegen/parser/runtests.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/runtests.py rename to components/script/dom/bindings/codegen/parser/runtests.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_any_null.py b/components/script/dom/bindings/codegen/parser/tests/test_any_null.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_any_null.py rename to components/script/dom/bindings/codegen/parser/tests/test_any_null.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py rename to components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py rename to components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py rename to components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py b/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py rename to components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_attr.py b/components/script/dom/bindings/codegen/parser/tests/test_attr.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_attr.py rename to components/script/dom/bindings/codegen/parser/tests/test_attr.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py b/components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py rename to components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py b/components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py rename to components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_builtins.py b/components/script/dom/bindings/codegen/parser/tests/test_builtins.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_builtins.py rename to components/script/dom/bindings/codegen/parser/tests/test_builtins.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_callback.py b/components/script/dom/bindings/codegen/parser/tests/test_callback.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_callback.py rename to components/script/dom/bindings/codegen/parser/tests/test_callback.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py rename to components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_const.py b/components/script/dom/bindings/codegen/parser/tests/test_const.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_const.py rename to components/script/dom/bindings/codegen/parser/tests/test_const.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_constructor.py b/components/script/dom/bindings/codegen/parser/tests/test_constructor.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_constructor.py rename to components/script/dom/bindings/codegen/parser/tests/test_constructor.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py b/components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py rename to components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py b/components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py rename to components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py rename to components/script/dom/bindings/codegen/parser/tests/test_dictionary.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py rename to components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_double_null.py b/components/script/dom/bindings/codegen/parser/tests/test_double_null.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_double_null.py rename to components/script/dom/bindings/codegen/parser/tests/test_double_null.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py b/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py rename to components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py b/components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py rename to components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_enum.py b/components/script/dom/bindings/codegen/parser/tests/test_enum.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_enum.py rename to components/script/dom/bindings/codegen/parser/tests/test_enum.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py b/components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py rename to components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py b/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py rename to components/script/dom/bindings/codegen/parser/tests/test_error_colno.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py b/components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py rename to components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py b/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py rename to components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py b/components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py rename to components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_implements.py b/components/script/dom/bindings/codegen/parser/tests/test_implements.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_implements.py rename to components/script/dom/bindings/codegen/parser/tests/test_implements.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py rename to components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py rename to components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_interface.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_interface.py rename to components/script/dom/bindings/codegen/parser/tests/test_interface.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py b/components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py rename to components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py b/components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py rename to components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_method.py b/components/script/dom/bindings/codegen/parser/tests/test_method.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_method.py rename to components/script/dom/bindings/codegen/parser/tests/test_method.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py b/components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py rename to components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py b/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py rename to components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py rename to components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_overload.py b/components/script/dom/bindings/codegen/parser/tests/test_overload.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_overload.py rename to components/script/dom/bindings/codegen/parser/tests/test_overload.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_sanity.py b/components/script/dom/bindings/codegen/parser/tests/test_sanity.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_sanity.py rename to components/script/dom/bindings/codegen/parser/tests/test_sanity.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py b/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py rename to components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py b/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py rename to components/script/dom/bindings/codegen/parser/tests/test_special_methods.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py b/components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py rename to components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py b/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py rename to components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_typedef.py b/components/script/dom/bindings/codegen/parser/tests/test_typedef.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_typedef.py rename to components/script/dom/bindings/codegen/parser/tests/test_typedef.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_union.py b/components/script/dom/bindings/codegen/parser/tests/test_union.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_union.py rename to components/script/dom/bindings/codegen/parser/tests/test_union.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_union_any.py b/components/script/dom/bindings/codegen/parser/tests/test_union_any.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_union_any.py rename to components/script/dom/bindings/codegen/parser/tests/test_union_any.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py b/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py rename to components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py b/components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py rename to components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py diff --git a/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py rename to components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py diff --git a/src/components/script/dom/bindings/codegen/parser/update.sh b/components/script/dom/bindings/codegen/parser/update.sh similarity index 100% rename from src/components/script/dom/bindings/codegen/parser/update.sh rename to components/script/dom/bindings/codegen/parser/update.sh diff --git a/src/components/script/dom/bindings/codegen/ply/COPYING b/components/script/dom/bindings/codegen/ply/COPYING similarity index 100% rename from src/components/script/dom/bindings/codegen/ply/COPYING rename to components/script/dom/bindings/codegen/ply/COPYING diff --git a/src/components/script/dom/bindings/codegen/ply/README b/components/script/dom/bindings/codegen/ply/README similarity index 100% rename from src/components/script/dom/bindings/codegen/ply/README rename to components/script/dom/bindings/codegen/ply/README diff --git a/src/components/script/dom/bindings/codegen/ply/ply/__init__.py b/components/script/dom/bindings/codegen/ply/ply/__init__.py similarity index 100% rename from src/components/script/dom/bindings/codegen/ply/ply/__init__.py rename to components/script/dom/bindings/codegen/ply/ply/__init__.py diff --git a/src/components/script/dom/bindings/codegen/ply/ply/lex.py b/components/script/dom/bindings/codegen/ply/ply/lex.py similarity index 100% rename from src/components/script/dom/bindings/codegen/ply/ply/lex.py rename to components/script/dom/bindings/codegen/ply/ply/lex.py diff --git a/src/components/script/dom/bindings/codegen/ply/ply/yacc.py b/components/script/dom/bindings/codegen/ply/ply/yacc.py similarity index 100% rename from src/components/script/dom/bindings/codegen/ply/ply/yacc.py rename to components/script/dom/bindings/codegen/ply/ply/yacc.py diff --git a/src/components/script/dom/bindings/codegen/pythonpath.py b/components/script/dom/bindings/codegen/pythonpath.py similarity index 100% rename from src/components/script/dom/bindings/codegen/pythonpath.py rename to components/script/dom/bindings/codegen/pythonpath.py diff --git a/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp b/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp similarity index 100% rename from src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp rename to components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp diff --git a/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h b/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h similarity index 100% rename from src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h rename to components/script/dom/bindings/codegen/stubgenerator/Skeleton.h diff --git a/src/components/script/dom/bindings/codegen/stubgenerator/generate.sh b/components/script/dom/bindings/codegen/stubgenerator/generate.sh similarity index 100% rename from src/components/script/dom/bindings/codegen/stubgenerator/generate.sh rename to components/script/dom/bindings/codegen/stubgenerator/generate.sh diff --git a/src/components/script/dom/bindings/codegen/test/Makefile.in b/components/script/dom/bindings/codegen/test/Makefile.in similarity index 100% rename from src/components/script/dom/bindings/codegen/test/Makefile.in rename to components/script/dom/bindings/codegen/test/Makefile.in diff --git a/src/components/script/dom/bindings/codegen/test/TestBindingHeader.h b/components/script/dom/bindings/codegen/test/TestBindingHeader.h similarity index 100% rename from src/components/script/dom/bindings/codegen/test/TestBindingHeader.h rename to components/script/dom/bindings/codegen/test/TestBindingHeader.h diff --git a/src/components/script/dom/bindings/codegen/test/TestCodeGen.webidl b/components/script/dom/bindings/codegen/test/TestCodeGen.webidl similarity index 100% rename from src/components/script/dom/bindings/codegen/test/TestCodeGen.webidl rename to components/script/dom/bindings/codegen/test/TestCodeGen.webidl diff --git a/src/components/script/dom/bindings/codegen/test/TestDictionary.webidl b/components/script/dom/bindings/codegen/test/TestDictionary.webidl similarity index 100% rename from src/components/script/dom/bindings/codegen/test/TestDictionary.webidl rename to components/script/dom/bindings/codegen/test/TestDictionary.webidl diff --git a/src/components/script/dom/bindings/codegen/test/TestTypedef.webidl b/components/script/dom/bindings/codegen/test/TestTypedef.webidl similarity index 100% rename from src/components/script/dom/bindings/codegen/test/TestTypedef.webidl rename to components/script/dom/bindings/codegen/test/TestTypedef.webidl diff --git a/src/components/script/dom/bindings/codegen/test/file_bug775543.html b/components/script/dom/bindings/codegen/test/file_bug775543.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/file_bug775543.html rename to components/script/dom/bindings/codegen/test/file_bug775543.html diff --git a/src/components/script/dom/bindings/codegen/test/forOf_iframe.html b/components/script/dom/bindings/codegen/test/forOf_iframe.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/forOf_iframe.html rename to components/script/dom/bindings/codegen/test/forOf_iframe.html diff --git a/src/components/script/dom/bindings/codegen/test/test_InstanceOf.html b/components/script/dom/bindings/codegen/test/test_InstanceOf.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_InstanceOf.html rename to components/script/dom/bindings/codegen/test/test_InstanceOf.html diff --git a/src/components/script/dom/bindings/codegen/test/test_bug773326.html b/components/script/dom/bindings/codegen/test/test_bug773326.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_bug773326.html rename to components/script/dom/bindings/codegen/test/test_bug773326.html diff --git a/src/components/script/dom/bindings/codegen/test/test_bug775543.html b/components/script/dom/bindings/codegen/test/test_bug775543.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_bug775543.html rename to components/script/dom/bindings/codegen/test/test_bug775543.html diff --git a/src/components/script/dom/bindings/codegen/test/test_bug788369.html b/components/script/dom/bindings/codegen/test/test_bug788369.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_bug788369.html rename to components/script/dom/bindings/codegen/test/test_bug788369.html diff --git a/src/components/script/dom/bindings/codegen/test/test_enums.html b/components/script/dom/bindings/codegen/test/test_enums.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_enums.html rename to components/script/dom/bindings/codegen/test/test_enums.html diff --git a/src/components/script/dom/bindings/codegen/test/test_forOf.html b/components/script/dom/bindings/codegen/test/test_forOf.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_forOf.html rename to components/script/dom/bindings/codegen/test/test_forOf.html diff --git a/src/components/script/dom/bindings/codegen/test/test_integers.html b/components/script/dom/bindings/codegen/test/test_integers.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_integers.html rename to components/script/dom/bindings/codegen/test/test_integers.html diff --git a/src/components/script/dom/bindings/codegen/test/test_interfaceToString.html b/components/script/dom/bindings/codegen/test/test_interfaceToString.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_interfaceToString.html rename to components/script/dom/bindings/codegen/test/test_interfaceToString.html diff --git a/src/components/script/dom/bindings/codegen/test/test_lookupGetter.html b/components/script/dom/bindings/codegen/test/test_lookupGetter.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_lookupGetter.html rename to components/script/dom/bindings/codegen/test/test_lookupGetter.html diff --git a/src/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html b/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html rename to components/script/dom/bindings/codegen/test/test_sequence_wrapping.html diff --git a/src/components/script/dom/bindings/codegen/test/test_traceProtos.html b/components/script/dom/bindings/codegen/test/test_traceProtos.html similarity index 100% rename from src/components/script/dom/bindings/codegen/test/test_traceProtos.html rename to components/script/dom/bindings/codegen/test/test_traceProtos.html diff --git a/src/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs similarity index 100% rename from src/components/script/dom/bindings/conversions.rs rename to components/script/dom/bindings/conversions.rs diff --git a/src/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs similarity index 100% rename from src/components/script/dom/bindings/error.rs rename to components/script/dom/bindings/error.rs diff --git a/src/components/script/dom/bindings/global.rs b/components/script/dom/bindings/global.rs similarity index 100% rename from src/components/script/dom/bindings/global.rs rename to components/script/dom/bindings/global.rs diff --git a/src/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs similarity index 100% rename from src/components/script/dom/bindings/js.rs rename to components/script/dom/bindings/js.rs diff --git a/src/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs similarity index 100% rename from src/components/script/dom/bindings/proxyhandler.rs rename to components/script/dom/bindings/proxyhandler.rs diff --git a/src/components/script/dom/bindings/str.rs b/components/script/dom/bindings/str.rs similarity index 100% rename from src/components/script/dom/bindings/str.rs rename to components/script/dom/bindings/str.rs diff --git a/src/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs similarity index 100% rename from src/components/script/dom/bindings/trace.rs rename to components/script/dom/bindings/trace.rs diff --git a/src/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs similarity index 100% rename from src/components/script/dom/bindings/utils.rs rename to components/script/dom/bindings/utils.rs diff --git a/src/components/script/dom/blob.rs b/components/script/dom/blob.rs similarity index 100% rename from src/components/script/dom/blob.rs rename to components/script/dom/blob.rs diff --git a/src/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs similarity index 100% rename from src/components/script/dom/browsercontext.rs rename to components/script/dom/browsercontext.rs diff --git a/src/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs similarity index 100% rename from src/components/script/dom/canvasrenderingcontext2d.rs rename to components/script/dom/canvasrenderingcontext2d.rs diff --git a/src/components/script/dom/characterdata.rs b/components/script/dom/characterdata.rs similarity index 100% rename from src/components/script/dom/characterdata.rs rename to components/script/dom/characterdata.rs diff --git a/src/components/script/dom/comment.rs b/components/script/dom/comment.rs similarity index 100% rename from src/components/script/dom/comment.rs rename to components/script/dom/comment.rs diff --git a/src/components/script/dom/console.rs b/components/script/dom/console.rs similarity index 100% rename from src/components/script/dom/console.rs rename to components/script/dom/console.rs diff --git a/src/components/script/dom/customevent.rs b/components/script/dom/customevent.rs similarity index 100% rename from src/components/script/dom/customevent.rs rename to components/script/dom/customevent.rs diff --git a/src/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs similarity index 100% rename from src/components/script/dom/dedicatedworkerglobalscope.rs rename to components/script/dom/dedicatedworkerglobalscope.rs diff --git a/src/components/script/dom/document.rs b/components/script/dom/document.rs similarity index 100% rename from src/components/script/dom/document.rs rename to components/script/dom/document.rs diff --git a/src/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs similarity index 100% rename from src/components/script/dom/documentfragment.rs rename to components/script/dom/documentfragment.rs diff --git a/src/components/script/dom/documenttype.rs b/components/script/dom/documenttype.rs similarity index 100% rename from src/components/script/dom/documenttype.rs rename to components/script/dom/documenttype.rs diff --git a/src/components/script/dom/domexception.rs b/components/script/dom/domexception.rs similarity index 100% rename from src/components/script/dom/domexception.rs rename to components/script/dom/domexception.rs diff --git a/src/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs similarity index 100% rename from src/components/script/dom/domimplementation.rs rename to components/script/dom/domimplementation.rs diff --git a/src/components/script/dom/domparser.rs b/components/script/dom/domparser.rs similarity index 100% rename from src/components/script/dom/domparser.rs rename to components/script/dom/domparser.rs diff --git a/src/components/script/dom/domrect.rs b/components/script/dom/domrect.rs similarity index 100% rename from src/components/script/dom/domrect.rs rename to components/script/dom/domrect.rs diff --git a/src/components/script/dom/domrectlist.rs b/components/script/dom/domrectlist.rs similarity index 100% rename from src/components/script/dom/domrectlist.rs rename to components/script/dom/domrectlist.rs diff --git a/src/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs similarity index 100% rename from src/components/script/dom/domtokenlist.rs rename to components/script/dom/domtokenlist.rs diff --git a/src/components/script/dom/element.rs b/components/script/dom/element.rs similarity index 100% rename from src/components/script/dom/element.rs rename to components/script/dom/element.rs diff --git a/src/components/script/dom/event.rs b/components/script/dom/event.rs similarity index 100% rename from src/components/script/dom/event.rs rename to components/script/dom/event.rs diff --git a/src/components/script/dom/eventdispatcher.rs b/components/script/dom/eventdispatcher.rs similarity index 100% rename from src/components/script/dom/eventdispatcher.rs rename to components/script/dom/eventdispatcher.rs diff --git a/src/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs similarity index 100% rename from src/components/script/dom/eventtarget.rs rename to components/script/dom/eventtarget.rs diff --git a/src/components/script/dom/file.rs b/components/script/dom/file.rs similarity index 100% rename from src/components/script/dom/file.rs rename to components/script/dom/file.rs diff --git a/src/components/script/dom/formdata.rs b/components/script/dom/formdata.rs similarity index 100% rename from src/components/script/dom/formdata.rs rename to components/script/dom/formdata.rs diff --git a/src/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs similarity index 100% rename from src/components/script/dom/htmlanchorelement.rs rename to components/script/dom/htmlanchorelement.rs diff --git a/src/components/script/dom/htmlappletelement.rs b/components/script/dom/htmlappletelement.rs similarity index 100% rename from src/components/script/dom/htmlappletelement.rs rename to components/script/dom/htmlappletelement.rs diff --git a/src/components/script/dom/htmlareaelement.rs b/components/script/dom/htmlareaelement.rs similarity index 100% rename from src/components/script/dom/htmlareaelement.rs rename to components/script/dom/htmlareaelement.rs diff --git a/src/components/script/dom/htmlaudioelement.rs b/components/script/dom/htmlaudioelement.rs similarity index 100% rename from src/components/script/dom/htmlaudioelement.rs rename to components/script/dom/htmlaudioelement.rs diff --git a/src/components/script/dom/htmlbaseelement.rs b/components/script/dom/htmlbaseelement.rs similarity index 100% rename from src/components/script/dom/htmlbaseelement.rs rename to components/script/dom/htmlbaseelement.rs diff --git a/src/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs similarity index 100% rename from src/components/script/dom/htmlbodyelement.rs rename to components/script/dom/htmlbodyelement.rs diff --git a/src/components/script/dom/htmlbrelement.rs b/components/script/dom/htmlbrelement.rs similarity index 100% rename from src/components/script/dom/htmlbrelement.rs rename to components/script/dom/htmlbrelement.rs diff --git a/src/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs similarity index 100% rename from src/components/script/dom/htmlbuttonelement.rs rename to components/script/dom/htmlbuttonelement.rs diff --git a/src/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs similarity index 100% rename from src/components/script/dom/htmlcanvaselement.rs rename to components/script/dom/htmlcanvaselement.rs diff --git a/src/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs similarity index 100% rename from src/components/script/dom/htmlcollection.rs rename to components/script/dom/htmlcollection.rs diff --git a/src/components/script/dom/htmldataelement.rs b/components/script/dom/htmldataelement.rs similarity index 100% rename from src/components/script/dom/htmldataelement.rs rename to components/script/dom/htmldataelement.rs diff --git a/src/components/script/dom/htmldatalistelement.rs b/components/script/dom/htmldatalistelement.rs similarity index 100% rename from src/components/script/dom/htmldatalistelement.rs rename to components/script/dom/htmldatalistelement.rs diff --git a/src/components/script/dom/htmldirectoryelement.rs b/components/script/dom/htmldirectoryelement.rs similarity index 100% rename from src/components/script/dom/htmldirectoryelement.rs rename to components/script/dom/htmldirectoryelement.rs diff --git a/src/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs similarity index 100% rename from src/components/script/dom/htmldivelement.rs rename to components/script/dom/htmldivelement.rs diff --git a/src/components/script/dom/htmldlistelement.rs b/components/script/dom/htmldlistelement.rs similarity index 100% rename from src/components/script/dom/htmldlistelement.rs rename to components/script/dom/htmldlistelement.rs diff --git a/src/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs similarity index 100% rename from src/components/script/dom/htmlelement.rs rename to components/script/dom/htmlelement.rs diff --git a/src/components/script/dom/htmlembedelement.rs b/components/script/dom/htmlembedelement.rs similarity index 100% rename from src/components/script/dom/htmlembedelement.rs rename to components/script/dom/htmlembedelement.rs diff --git a/src/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs similarity index 100% rename from src/components/script/dom/htmlfieldsetelement.rs rename to components/script/dom/htmlfieldsetelement.rs diff --git a/src/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs similarity index 100% rename from src/components/script/dom/htmlfontelement.rs rename to components/script/dom/htmlfontelement.rs diff --git a/src/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs similarity index 100% rename from src/components/script/dom/htmlformelement.rs rename to components/script/dom/htmlformelement.rs diff --git a/src/components/script/dom/htmlframeelement.rs b/components/script/dom/htmlframeelement.rs similarity index 100% rename from src/components/script/dom/htmlframeelement.rs rename to components/script/dom/htmlframeelement.rs diff --git a/src/components/script/dom/htmlframesetelement.rs b/components/script/dom/htmlframesetelement.rs similarity index 100% rename from src/components/script/dom/htmlframesetelement.rs rename to components/script/dom/htmlframesetelement.rs diff --git a/src/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs similarity index 100% rename from src/components/script/dom/htmlheadelement.rs rename to components/script/dom/htmlheadelement.rs diff --git a/src/components/script/dom/htmlheadingelement.rs b/components/script/dom/htmlheadingelement.rs similarity index 100% rename from src/components/script/dom/htmlheadingelement.rs rename to components/script/dom/htmlheadingelement.rs diff --git a/src/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs similarity index 100% rename from src/components/script/dom/htmlhrelement.rs rename to components/script/dom/htmlhrelement.rs diff --git a/src/components/script/dom/htmlhtmlelement.rs b/components/script/dom/htmlhtmlelement.rs similarity index 100% rename from src/components/script/dom/htmlhtmlelement.rs rename to components/script/dom/htmlhtmlelement.rs diff --git a/src/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs similarity index 100% rename from src/components/script/dom/htmliframeelement.rs rename to components/script/dom/htmliframeelement.rs diff --git a/src/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs similarity index 100% rename from src/components/script/dom/htmlimageelement.rs rename to components/script/dom/htmlimageelement.rs diff --git a/src/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs similarity index 100% rename from src/components/script/dom/htmlinputelement.rs rename to components/script/dom/htmlinputelement.rs diff --git a/src/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs similarity index 100% rename from src/components/script/dom/htmllabelelement.rs rename to components/script/dom/htmllabelelement.rs diff --git a/src/components/script/dom/htmllegendelement.rs b/components/script/dom/htmllegendelement.rs similarity index 100% rename from src/components/script/dom/htmllegendelement.rs rename to components/script/dom/htmllegendelement.rs diff --git a/src/components/script/dom/htmllielement.rs b/components/script/dom/htmllielement.rs similarity index 100% rename from src/components/script/dom/htmllielement.rs rename to components/script/dom/htmllielement.rs diff --git a/src/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs similarity index 100% rename from src/components/script/dom/htmllinkelement.rs rename to components/script/dom/htmllinkelement.rs diff --git a/src/components/script/dom/htmlmapelement.rs b/components/script/dom/htmlmapelement.rs similarity index 100% rename from src/components/script/dom/htmlmapelement.rs rename to components/script/dom/htmlmapelement.rs diff --git a/src/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs similarity index 100% rename from src/components/script/dom/htmlmediaelement.rs rename to components/script/dom/htmlmediaelement.rs diff --git a/src/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs similarity index 100% rename from src/components/script/dom/htmlmetaelement.rs rename to components/script/dom/htmlmetaelement.rs diff --git a/src/components/script/dom/htmlmeterelement.rs b/components/script/dom/htmlmeterelement.rs similarity index 100% rename from src/components/script/dom/htmlmeterelement.rs rename to components/script/dom/htmlmeterelement.rs diff --git a/src/components/script/dom/htmlmodelement.rs b/components/script/dom/htmlmodelement.rs similarity index 100% rename from src/components/script/dom/htmlmodelement.rs rename to components/script/dom/htmlmodelement.rs diff --git a/src/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs similarity index 100% rename from src/components/script/dom/htmlobjectelement.rs rename to components/script/dom/htmlobjectelement.rs diff --git a/src/components/script/dom/htmlolistelement.rs b/components/script/dom/htmlolistelement.rs similarity index 100% rename from src/components/script/dom/htmlolistelement.rs rename to components/script/dom/htmlolistelement.rs diff --git a/src/components/script/dom/htmloptgroupelement.rs b/components/script/dom/htmloptgroupelement.rs similarity index 100% rename from src/components/script/dom/htmloptgroupelement.rs rename to components/script/dom/htmloptgroupelement.rs diff --git a/src/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs similarity index 100% rename from src/components/script/dom/htmloptionelement.rs rename to components/script/dom/htmloptionelement.rs diff --git a/src/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs similarity index 100% rename from src/components/script/dom/htmloutputelement.rs rename to components/script/dom/htmloutputelement.rs diff --git a/src/components/script/dom/htmlparagraphelement.rs b/components/script/dom/htmlparagraphelement.rs similarity index 100% rename from src/components/script/dom/htmlparagraphelement.rs rename to components/script/dom/htmlparagraphelement.rs diff --git a/src/components/script/dom/htmlparamelement.rs b/components/script/dom/htmlparamelement.rs similarity index 100% rename from src/components/script/dom/htmlparamelement.rs rename to components/script/dom/htmlparamelement.rs diff --git a/src/components/script/dom/htmlpreelement.rs b/components/script/dom/htmlpreelement.rs similarity index 100% rename from src/components/script/dom/htmlpreelement.rs rename to components/script/dom/htmlpreelement.rs diff --git a/src/components/script/dom/htmlprogresselement.rs b/components/script/dom/htmlprogresselement.rs similarity index 100% rename from src/components/script/dom/htmlprogresselement.rs rename to components/script/dom/htmlprogresselement.rs diff --git a/src/components/script/dom/htmlquoteelement.rs b/components/script/dom/htmlquoteelement.rs similarity index 100% rename from src/components/script/dom/htmlquoteelement.rs rename to components/script/dom/htmlquoteelement.rs diff --git a/src/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs similarity index 100% rename from src/components/script/dom/htmlscriptelement.rs rename to components/script/dom/htmlscriptelement.rs diff --git a/src/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs similarity index 100% rename from src/components/script/dom/htmlselectelement.rs rename to components/script/dom/htmlselectelement.rs diff --git a/src/components/script/dom/htmlserializer.rs b/components/script/dom/htmlserializer.rs similarity index 100% rename from src/components/script/dom/htmlserializer.rs rename to components/script/dom/htmlserializer.rs diff --git a/src/components/script/dom/htmlsourceelement.rs b/components/script/dom/htmlsourceelement.rs similarity index 100% rename from src/components/script/dom/htmlsourceelement.rs rename to components/script/dom/htmlsourceelement.rs diff --git a/src/components/script/dom/htmlspanelement.rs b/components/script/dom/htmlspanelement.rs similarity index 100% rename from src/components/script/dom/htmlspanelement.rs rename to components/script/dom/htmlspanelement.rs diff --git a/src/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs similarity index 100% rename from src/components/script/dom/htmlstyleelement.rs rename to components/script/dom/htmlstyleelement.rs diff --git a/src/components/script/dom/htmltablecaptionelement.rs b/components/script/dom/htmltablecaptionelement.rs similarity index 100% rename from src/components/script/dom/htmltablecaptionelement.rs rename to components/script/dom/htmltablecaptionelement.rs diff --git a/src/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs similarity index 100% rename from src/components/script/dom/htmltablecellelement.rs rename to components/script/dom/htmltablecellelement.rs diff --git a/src/components/script/dom/htmltablecolelement.rs b/components/script/dom/htmltablecolelement.rs similarity index 100% rename from src/components/script/dom/htmltablecolelement.rs rename to components/script/dom/htmltablecolelement.rs diff --git a/src/components/script/dom/htmltabledatacellelement.rs b/components/script/dom/htmltabledatacellelement.rs similarity index 100% rename from src/components/script/dom/htmltabledatacellelement.rs rename to components/script/dom/htmltabledatacellelement.rs diff --git a/src/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs similarity index 100% rename from src/components/script/dom/htmltableelement.rs rename to components/script/dom/htmltableelement.rs diff --git a/src/components/script/dom/htmltableheadercellelement.rs b/components/script/dom/htmltableheadercellelement.rs similarity index 100% rename from src/components/script/dom/htmltableheadercellelement.rs rename to components/script/dom/htmltableheadercellelement.rs diff --git a/src/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs similarity index 100% rename from src/components/script/dom/htmltablerowelement.rs rename to components/script/dom/htmltablerowelement.rs diff --git a/src/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs similarity index 100% rename from src/components/script/dom/htmltablesectionelement.rs rename to components/script/dom/htmltablesectionelement.rs diff --git a/src/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs similarity index 100% rename from src/components/script/dom/htmltemplateelement.rs rename to components/script/dom/htmltemplateelement.rs diff --git a/src/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs similarity index 100% rename from src/components/script/dom/htmltextareaelement.rs rename to components/script/dom/htmltextareaelement.rs diff --git a/src/components/script/dom/htmltimeelement.rs b/components/script/dom/htmltimeelement.rs similarity index 100% rename from src/components/script/dom/htmltimeelement.rs rename to components/script/dom/htmltimeelement.rs diff --git a/src/components/script/dom/htmltitleelement.rs b/components/script/dom/htmltitleelement.rs similarity index 100% rename from src/components/script/dom/htmltitleelement.rs rename to components/script/dom/htmltitleelement.rs diff --git a/src/components/script/dom/htmltrackelement.rs b/components/script/dom/htmltrackelement.rs similarity index 100% rename from src/components/script/dom/htmltrackelement.rs rename to components/script/dom/htmltrackelement.rs diff --git a/src/components/script/dom/htmlulistelement.rs b/components/script/dom/htmlulistelement.rs similarity index 100% rename from src/components/script/dom/htmlulistelement.rs rename to components/script/dom/htmlulistelement.rs diff --git a/src/components/script/dom/htmlunknownelement.rs b/components/script/dom/htmlunknownelement.rs similarity index 100% rename from src/components/script/dom/htmlunknownelement.rs rename to components/script/dom/htmlunknownelement.rs diff --git a/src/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs similarity index 100% rename from src/components/script/dom/htmlvideoelement.rs rename to components/script/dom/htmlvideoelement.rs diff --git a/src/components/script/dom/location.rs b/components/script/dom/location.rs similarity index 100% rename from src/components/script/dom/location.rs rename to components/script/dom/location.rs diff --git a/src/components/script/dom/macros.rs b/components/script/dom/macros.rs similarity index 100% rename from src/components/script/dom/macros.rs rename to components/script/dom/macros.rs diff --git a/src/components/script/dom/messageevent.rs b/components/script/dom/messageevent.rs similarity index 100% rename from src/components/script/dom/messageevent.rs rename to components/script/dom/messageevent.rs diff --git a/src/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs similarity index 100% rename from src/components/script/dom/mouseevent.rs rename to components/script/dom/mouseevent.rs diff --git a/src/components/script/dom/namednodemap.rs b/components/script/dom/namednodemap.rs similarity index 100% rename from src/components/script/dom/namednodemap.rs rename to components/script/dom/namednodemap.rs diff --git a/src/components/script/dom/navigator.rs b/components/script/dom/navigator.rs similarity index 100% rename from src/components/script/dom/navigator.rs rename to components/script/dom/navigator.rs diff --git a/src/components/script/dom/node.rs b/components/script/dom/node.rs similarity index 100% rename from src/components/script/dom/node.rs rename to components/script/dom/node.rs diff --git a/src/components/script/dom/nodeiterator.rs b/components/script/dom/nodeiterator.rs similarity index 100% rename from src/components/script/dom/nodeiterator.rs rename to components/script/dom/nodeiterator.rs diff --git a/src/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs similarity index 100% rename from src/components/script/dom/nodelist.rs rename to components/script/dom/nodelist.rs diff --git a/src/components/script/dom/performance.rs b/components/script/dom/performance.rs similarity index 100% rename from src/components/script/dom/performance.rs rename to components/script/dom/performance.rs diff --git a/src/components/script/dom/performancetiming.rs b/components/script/dom/performancetiming.rs similarity index 100% rename from src/components/script/dom/performancetiming.rs rename to components/script/dom/performancetiming.rs diff --git a/src/components/script/dom/processinginstruction.rs b/components/script/dom/processinginstruction.rs similarity index 100% rename from src/components/script/dom/processinginstruction.rs rename to components/script/dom/processinginstruction.rs diff --git a/src/components/script/dom/progressevent.rs b/components/script/dom/progressevent.rs similarity index 100% rename from src/components/script/dom/progressevent.rs rename to components/script/dom/progressevent.rs diff --git a/src/components/script/dom/range.rs b/components/script/dom/range.rs similarity index 100% rename from src/components/script/dom/range.rs rename to components/script/dom/range.rs diff --git a/src/components/script/dom/screen.rs b/components/script/dom/screen.rs similarity index 100% rename from src/components/script/dom/screen.rs rename to components/script/dom/screen.rs diff --git a/src/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs similarity index 100% rename from src/components/script/dom/testbinding.rs rename to components/script/dom/testbinding.rs diff --git a/src/components/script/dom/text.rs b/components/script/dom/text.rs similarity index 100% rename from src/components/script/dom/text.rs rename to components/script/dom/text.rs diff --git a/src/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs similarity index 100% rename from src/components/script/dom/treewalker.rs rename to components/script/dom/treewalker.rs diff --git a/src/components/script/dom/uievent.rs b/components/script/dom/uievent.rs similarity index 100% rename from src/components/script/dom/uievent.rs rename to components/script/dom/uievent.rs diff --git a/src/components/script/dom/urlsearchparams.rs b/components/script/dom/urlsearchparams.rs similarity index 100% rename from src/components/script/dom/urlsearchparams.rs rename to components/script/dom/urlsearchparams.rs diff --git a/src/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs similarity index 100% rename from src/components/script/dom/validitystate.rs rename to components/script/dom/validitystate.rs diff --git a/src/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs similarity index 100% rename from src/components/script/dom/virtualmethods.rs rename to components/script/dom/virtualmethods.rs diff --git a/src/components/script/dom/webidls/Attr.webidl b/components/script/dom/webidls/Attr.webidl similarity index 100% rename from src/components/script/dom/webidls/Attr.webidl rename to components/script/dom/webidls/Attr.webidl diff --git a/src/components/script/dom/webidls/Blob.webidl b/components/script/dom/webidls/Blob.webidl similarity index 100% rename from src/components/script/dom/webidls/Blob.webidl rename to components/script/dom/webidls/Blob.webidl diff --git a/src/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl similarity index 100% rename from src/components/script/dom/webidls/CanvasRenderingContext2D.webidl rename to components/script/dom/webidls/CanvasRenderingContext2D.webidl diff --git a/src/components/script/dom/webidls/CharacterData.webidl b/components/script/dom/webidls/CharacterData.webidl similarity index 100% rename from src/components/script/dom/webidls/CharacterData.webidl rename to components/script/dom/webidls/CharacterData.webidl diff --git a/src/components/script/dom/webidls/ChildNode.webidl b/components/script/dom/webidls/ChildNode.webidl similarity index 100% rename from src/components/script/dom/webidls/ChildNode.webidl rename to components/script/dom/webidls/ChildNode.webidl diff --git a/src/components/script/dom/webidls/Comment.webidl b/components/script/dom/webidls/Comment.webidl similarity index 100% rename from src/components/script/dom/webidls/Comment.webidl rename to components/script/dom/webidls/Comment.webidl diff --git a/src/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl similarity index 100% rename from src/components/script/dom/webidls/Console.webidl rename to components/script/dom/webidls/Console.webidl diff --git a/src/components/script/dom/webidls/CustomEvent.webidl b/components/script/dom/webidls/CustomEvent.webidl similarity index 100% rename from src/components/script/dom/webidls/CustomEvent.webidl rename to components/script/dom/webidls/CustomEvent.webidl diff --git a/src/components/script/dom/webidls/DOMException.webidl b/components/script/dom/webidls/DOMException.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMException.webidl rename to components/script/dom/webidls/DOMException.webidl diff --git a/src/components/script/dom/webidls/DOMImplementation.webidl b/components/script/dom/webidls/DOMImplementation.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMImplementation.webidl rename to components/script/dom/webidls/DOMImplementation.webidl diff --git a/src/components/script/dom/webidls/DOMParser.webidl b/components/script/dom/webidls/DOMParser.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMParser.webidl rename to components/script/dom/webidls/DOMParser.webidl diff --git a/src/components/script/dom/webidls/DOMRect.webidl b/components/script/dom/webidls/DOMRect.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMRect.webidl rename to components/script/dom/webidls/DOMRect.webidl diff --git a/src/components/script/dom/webidls/DOMRectList.webidl b/components/script/dom/webidls/DOMRectList.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMRectList.webidl rename to components/script/dom/webidls/DOMRectList.webidl diff --git a/src/components/script/dom/webidls/DOMTokenList.webidl b/components/script/dom/webidls/DOMTokenList.webidl similarity index 100% rename from src/components/script/dom/webidls/DOMTokenList.webidl rename to components/script/dom/webidls/DOMTokenList.webidl diff --git a/src/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl similarity index 100% rename from src/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl rename to components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl diff --git a/src/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl similarity index 100% rename from src/components/script/dom/webidls/Document.webidl rename to components/script/dom/webidls/Document.webidl diff --git a/src/components/script/dom/webidls/DocumentFragment.webidl b/components/script/dom/webidls/DocumentFragment.webidl similarity index 100% rename from src/components/script/dom/webidls/DocumentFragment.webidl rename to components/script/dom/webidls/DocumentFragment.webidl diff --git a/src/components/script/dom/webidls/DocumentType.webidl b/components/script/dom/webidls/DocumentType.webidl similarity index 100% rename from src/components/script/dom/webidls/DocumentType.webidl rename to components/script/dom/webidls/DocumentType.webidl diff --git a/src/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl similarity index 100% rename from src/components/script/dom/webidls/Element.webidl rename to components/script/dom/webidls/Element.webidl diff --git a/src/components/script/dom/webidls/Event.webidl b/components/script/dom/webidls/Event.webidl similarity index 100% rename from src/components/script/dom/webidls/Event.webidl rename to components/script/dom/webidls/Event.webidl diff --git a/src/components/script/dom/webidls/EventHandler.webidl b/components/script/dom/webidls/EventHandler.webidl similarity index 100% rename from src/components/script/dom/webidls/EventHandler.webidl rename to components/script/dom/webidls/EventHandler.webidl diff --git a/src/components/script/dom/webidls/EventListener.webidl b/components/script/dom/webidls/EventListener.webidl similarity index 100% rename from src/components/script/dom/webidls/EventListener.webidl rename to components/script/dom/webidls/EventListener.webidl diff --git a/src/components/script/dom/webidls/EventTarget.webidl b/components/script/dom/webidls/EventTarget.webidl similarity index 100% rename from src/components/script/dom/webidls/EventTarget.webidl rename to components/script/dom/webidls/EventTarget.webidl diff --git a/src/components/script/dom/webidls/File.webidl b/components/script/dom/webidls/File.webidl similarity index 100% rename from src/components/script/dom/webidls/File.webidl rename to components/script/dom/webidls/File.webidl diff --git a/src/components/script/dom/webidls/FormData.webidl b/components/script/dom/webidls/FormData.webidl similarity index 100% rename from src/components/script/dom/webidls/FormData.webidl rename to components/script/dom/webidls/FormData.webidl diff --git a/src/components/script/dom/webidls/HTMLAnchorElement.webidl b/components/script/dom/webidls/HTMLAnchorElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLAnchorElement.webidl rename to components/script/dom/webidls/HTMLAnchorElement.webidl diff --git a/src/components/script/dom/webidls/HTMLAppletElement.webidl b/components/script/dom/webidls/HTMLAppletElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLAppletElement.webidl rename to components/script/dom/webidls/HTMLAppletElement.webidl diff --git a/src/components/script/dom/webidls/HTMLAreaElement.webidl b/components/script/dom/webidls/HTMLAreaElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLAreaElement.webidl rename to components/script/dom/webidls/HTMLAreaElement.webidl diff --git a/src/components/script/dom/webidls/HTMLAudioElement.webidl b/components/script/dom/webidls/HTMLAudioElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLAudioElement.webidl rename to components/script/dom/webidls/HTMLAudioElement.webidl diff --git a/src/components/script/dom/webidls/HTMLBRElement.webidl b/components/script/dom/webidls/HTMLBRElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLBRElement.webidl rename to components/script/dom/webidls/HTMLBRElement.webidl diff --git a/src/components/script/dom/webidls/HTMLBaseElement.webidl b/components/script/dom/webidls/HTMLBaseElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLBaseElement.webidl rename to components/script/dom/webidls/HTMLBaseElement.webidl diff --git a/src/components/script/dom/webidls/HTMLBodyElement.webidl b/components/script/dom/webidls/HTMLBodyElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLBodyElement.webidl rename to components/script/dom/webidls/HTMLBodyElement.webidl diff --git a/src/components/script/dom/webidls/HTMLButtonElement.webidl b/components/script/dom/webidls/HTMLButtonElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLButtonElement.webidl rename to components/script/dom/webidls/HTMLButtonElement.webidl diff --git a/src/components/script/dom/webidls/HTMLCanvasElement.webidl b/components/script/dom/webidls/HTMLCanvasElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLCanvasElement.webidl rename to components/script/dom/webidls/HTMLCanvasElement.webidl diff --git a/src/components/script/dom/webidls/HTMLCollection.webidl b/components/script/dom/webidls/HTMLCollection.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLCollection.webidl rename to components/script/dom/webidls/HTMLCollection.webidl diff --git a/src/components/script/dom/webidls/HTMLDListElement.webidl b/components/script/dom/webidls/HTMLDListElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLDListElement.webidl rename to components/script/dom/webidls/HTMLDListElement.webidl diff --git a/src/components/script/dom/webidls/HTMLDataElement.webidl b/components/script/dom/webidls/HTMLDataElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLDataElement.webidl rename to components/script/dom/webidls/HTMLDataElement.webidl diff --git a/src/components/script/dom/webidls/HTMLDataListElement.webidl b/components/script/dom/webidls/HTMLDataListElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLDataListElement.webidl rename to components/script/dom/webidls/HTMLDataListElement.webidl diff --git a/src/components/script/dom/webidls/HTMLDirectoryElement.webidl b/components/script/dom/webidls/HTMLDirectoryElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLDirectoryElement.webidl rename to components/script/dom/webidls/HTMLDirectoryElement.webidl diff --git a/src/components/script/dom/webidls/HTMLDivElement.webidl b/components/script/dom/webidls/HTMLDivElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLDivElement.webidl rename to components/script/dom/webidls/HTMLDivElement.webidl diff --git a/src/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLElement.webidl rename to components/script/dom/webidls/HTMLElement.webidl diff --git a/src/components/script/dom/webidls/HTMLEmbedElement.webidl b/components/script/dom/webidls/HTMLEmbedElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLEmbedElement.webidl rename to components/script/dom/webidls/HTMLEmbedElement.webidl diff --git a/src/components/script/dom/webidls/HTMLFieldSetElement.webidl b/components/script/dom/webidls/HTMLFieldSetElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLFieldSetElement.webidl rename to components/script/dom/webidls/HTMLFieldSetElement.webidl diff --git a/src/components/script/dom/webidls/HTMLFontElement.webidl b/components/script/dom/webidls/HTMLFontElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLFontElement.webidl rename to components/script/dom/webidls/HTMLFontElement.webidl diff --git a/src/components/script/dom/webidls/HTMLFormElement.webidl b/components/script/dom/webidls/HTMLFormElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLFormElement.webidl rename to components/script/dom/webidls/HTMLFormElement.webidl diff --git a/src/components/script/dom/webidls/HTMLFrameElement.webidl b/components/script/dom/webidls/HTMLFrameElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLFrameElement.webidl rename to components/script/dom/webidls/HTMLFrameElement.webidl diff --git a/src/components/script/dom/webidls/HTMLFrameSetElement.webidl b/components/script/dom/webidls/HTMLFrameSetElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLFrameSetElement.webidl rename to components/script/dom/webidls/HTMLFrameSetElement.webidl diff --git a/src/components/script/dom/webidls/HTMLHRElement.webidl b/components/script/dom/webidls/HTMLHRElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLHRElement.webidl rename to components/script/dom/webidls/HTMLHRElement.webidl diff --git a/src/components/script/dom/webidls/HTMLHeadElement.webidl b/components/script/dom/webidls/HTMLHeadElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLHeadElement.webidl rename to components/script/dom/webidls/HTMLHeadElement.webidl diff --git a/src/components/script/dom/webidls/HTMLHeadingElement.webidl b/components/script/dom/webidls/HTMLHeadingElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLHeadingElement.webidl rename to components/script/dom/webidls/HTMLHeadingElement.webidl diff --git a/src/components/script/dom/webidls/HTMLHtmlElement.webidl b/components/script/dom/webidls/HTMLHtmlElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLHtmlElement.webidl rename to components/script/dom/webidls/HTMLHtmlElement.webidl diff --git a/src/components/script/dom/webidls/HTMLIFrameElement.webidl b/components/script/dom/webidls/HTMLIFrameElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLIFrameElement.webidl rename to components/script/dom/webidls/HTMLIFrameElement.webidl diff --git a/src/components/script/dom/webidls/HTMLImageElement.webidl b/components/script/dom/webidls/HTMLImageElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLImageElement.webidl rename to components/script/dom/webidls/HTMLImageElement.webidl diff --git a/src/components/script/dom/webidls/HTMLInputElement.webidl b/components/script/dom/webidls/HTMLInputElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLInputElement.webidl rename to components/script/dom/webidls/HTMLInputElement.webidl diff --git a/src/components/script/dom/webidls/HTMLLIElement.webidl b/components/script/dom/webidls/HTMLLIElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLLIElement.webidl rename to components/script/dom/webidls/HTMLLIElement.webidl diff --git a/src/components/script/dom/webidls/HTMLLabelElement.webidl b/components/script/dom/webidls/HTMLLabelElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLLabelElement.webidl rename to components/script/dom/webidls/HTMLLabelElement.webidl diff --git a/src/components/script/dom/webidls/HTMLLegendElement.webidl b/components/script/dom/webidls/HTMLLegendElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLLegendElement.webidl rename to components/script/dom/webidls/HTMLLegendElement.webidl diff --git a/src/components/script/dom/webidls/HTMLLinkElement.webidl b/components/script/dom/webidls/HTMLLinkElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLLinkElement.webidl rename to components/script/dom/webidls/HTMLLinkElement.webidl diff --git a/src/components/script/dom/webidls/HTMLMapElement.webidl b/components/script/dom/webidls/HTMLMapElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLMapElement.webidl rename to components/script/dom/webidls/HTMLMapElement.webidl diff --git a/src/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLMediaElement.webidl rename to components/script/dom/webidls/HTMLMediaElement.webidl diff --git a/src/components/script/dom/webidls/HTMLMetaElement.webidl b/components/script/dom/webidls/HTMLMetaElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLMetaElement.webidl rename to components/script/dom/webidls/HTMLMetaElement.webidl diff --git a/src/components/script/dom/webidls/HTMLMeterElement.webidl b/components/script/dom/webidls/HTMLMeterElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLMeterElement.webidl rename to components/script/dom/webidls/HTMLMeterElement.webidl diff --git a/src/components/script/dom/webidls/HTMLModElement.webidl b/components/script/dom/webidls/HTMLModElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLModElement.webidl rename to components/script/dom/webidls/HTMLModElement.webidl diff --git a/src/components/script/dom/webidls/HTMLOListElement.webidl b/components/script/dom/webidls/HTMLOListElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLOListElement.webidl rename to components/script/dom/webidls/HTMLOListElement.webidl diff --git a/src/components/script/dom/webidls/HTMLObjectElement.webidl b/components/script/dom/webidls/HTMLObjectElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLObjectElement.webidl rename to components/script/dom/webidls/HTMLObjectElement.webidl diff --git a/src/components/script/dom/webidls/HTMLOptGroupElement.webidl b/components/script/dom/webidls/HTMLOptGroupElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLOptGroupElement.webidl rename to components/script/dom/webidls/HTMLOptGroupElement.webidl diff --git a/src/components/script/dom/webidls/HTMLOptionElement.webidl b/components/script/dom/webidls/HTMLOptionElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLOptionElement.webidl rename to components/script/dom/webidls/HTMLOptionElement.webidl diff --git a/src/components/script/dom/webidls/HTMLOutputElement.webidl b/components/script/dom/webidls/HTMLOutputElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLOutputElement.webidl rename to components/script/dom/webidls/HTMLOutputElement.webidl diff --git a/src/components/script/dom/webidls/HTMLParagraphElement.webidl b/components/script/dom/webidls/HTMLParagraphElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLParagraphElement.webidl rename to components/script/dom/webidls/HTMLParagraphElement.webidl diff --git a/src/components/script/dom/webidls/HTMLParamElement.webidl b/components/script/dom/webidls/HTMLParamElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLParamElement.webidl rename to components/script/dom/webidls/HTMLParamElement.webidl diff --git a/src/components/script/dom/webidls/HTMLPreElement.webidl b/components/script/dom/webidls/HTMLPreElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLPreElement.webidl rename to components/script/dom/webidls/HTMLPreElement.webidl diff --git a/src/components/script/dom/webidls/HTMLProgressElement.webidl b/components/script/dom/webidls/HTMLProgressElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLProgressElement.webidl rename to components/script/dom/webidls/HTMLProgressElement.webidl diff --git a/src/components/script/dom/webidls/HTMLQuoteElement.webidl b/components/script/dom/webidls/HTMLQuoteElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLQuoteElement.webidl rename to components/script/dom/webidls/HTMLQuoteElement.webidl diff --git a/src/components/script/dom/webidls/HTMLScriptElement.webidl b/components/script/dom/webidls/HTMLScriptElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLScriptElement.webidl rename to components/script/dom/webidls/HTMLScriptElement.webidl diff --git a/src/components/script/dom/webidls/HTMLSelectElement.webidl b/components/script/dom/webidls/HTMLSelectElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLSelectElement.webidl rename to components/script/dom/webidls/HTMLSelectElement.webidl diff --git a/src/components/script/dom/webidls/HTMLSourceElement.webidl b/components/script/dom/webidls/HTMLSourceElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLSourceElement.webidl rename to components/script/dom/webidls/HTMLSourceElement.webidl diff --git a/src/components/script/dom/webidls/HTMLSpanElement.webidl b/components/script/dom/webidls/HTMLSpanElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLSpanElement.webidl rename to components/script/dom/webidls/HTMLSpanElement.webidl diff --git a/src/components/script/dom/webidls/HTMLStyleElement.webidl b/components/script/dom/webidls/HTMLStyleElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLStyleElement.webidl rename to components/script/dom/webidls/HTMLStyleElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableCaptionElement.webidl b/components/script/dom/webidls/HTMLTableCaptionElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableCaptionElement.webidl rename to components/script/dom/webidls/HTMLTableCaptionElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableCellElement.webidl b/components/script/dom/webidls/HTMLTableCellElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableCellElement.webidl rename to components/script/dom/webidls/HTMLTableCellElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableColElement.webidl b/components/script/dom/webidls/HTMLTableColElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableColElement.webidl rename to components/script/dom/webidls/HTMLTableColElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableDataCellElement.webidl b/components/script/dom/webidls/HTMLTableDataCellElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableDataCellElement.webidl rename to components/script/dom/webidls/HTMLTableDataCellElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableElement.webidl b/components/script/dom/webidls/HTMLTableElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableElement.webidl rename to components/script/dom/webidls/HTMLTableElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl b/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableHeaderCellElement.webidl rename to components/script/dom/webidls/HTMLTableHeaderCellElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableRowElement.webidl b/components/script/dom/webidls/HTMLTableRowElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableRowElement.webidl rename to components/script/dom/webidls/HTMLTableRowElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTableSectionElement.webidl b/components/script/dom/webidls/HTMLTableSectionElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTableSectionElement.webidl rename to components/script/dom/webidls/HTMLTableSectionElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTemplateElement.webidl b/components/script/dom/webidls/HTMLTemplateElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTemplateElement.webidl rename to components/script/dom/webidls/HTMLTemplateElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTextAreaElement.webidl b/components/script/dom/webidls/HTMLTextAreaElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTextAreaElement.webidl rename to components/script/dom/webidls/HTMLTextAreaElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTimeElement.webidl b/components/script/dom/webidls/HTMLTimeElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTimeElement.webidl rename to components/script/dom/webidls/HTMLTimeElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTitleElement.webidl b/components/script/dom/webidls/HTMLTitleElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTitleElement.webidl rename to components/script/dom/webidls/HTMLTitleElement.webidl diff --git a/src/components/script/dom/webidls/HTMLTrackElement.webidl b/components/script/dom/webidls/HTMLTrackElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLTrackElement.webidl rename to components/script/dom/webidls/HTMLTrackElement.webidl diff --git a/src/components/script/dom/webidls/HTMLUListElement.webidl b/components/script/dom/webidls/HTMLUListElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLUListElement.webidl rename to components/script/dom/webidls/HTMLUListElement.webidl diff --git a/src/components/script/dom/webidls/HTMLUnknownElement.webidl b/components/script/dom/webidls/HTMLUnknownElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLUnknownElement.webidl rename to components/script/dom/webidls/HTMLUnknownElement.webidl diff --git a/src/components/script/dom/webidls/HTMLVideoElement.webidl b/components/script/dom/webidls/HTMLVideoElement.webidl similarity index 100% rename from src/components/script/dom/webidls/HTMLVideoElement.webidl rename to components/script/dom/webidls/HTMLVideoElement.webidl diff --git a/src/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl similarity index 100% rename from src/components/script/dom/webidls/Location.webidl rename to components/script/dom/webidls/Location.webidl diff --git a/src/components/script/dom/webidls/MessageEvent.webidl b/components/script/dom/webidls/MessageEvent.webidl similarity index 100% rename from src/components/script/dom/webidls/MessageEvent.webidl rename to components/script/dom/webidls/MessageEvent.webidl diff --git a/src/components/script/dom/webidls/MouseEvent.webidl b/components/script/dom/webidls/MouseEvent.webidl similarity index 100% rename from src/components/script/dom/webidls/MouseEvent.webidl rename to components/script/dom/webidls/MouseEvent.webidl diff --git a/src/components/script/dom/webidls/NamedNodeMap.webidl b/components/script/dom/webidls/NamedNodeMap.webidl similarity index 100% rename from src/components/script/dom/webidls/NamedNodeMap.webidl rename to components/script/dom/webidls/NamedNodeMap.webidl diff --git a/src/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl similarity index 100% rename from src/components/script/dom/webidls/Navigator.webidl rename to components/script/dom/webidls/Navigator.webidl diff --git a/src/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl similarity index 100% rename from src/components/script/dom/webidls/Node.webidl rename to components/script/dom/webidls/Node.webidl diff --git a/src/components/script/dom/webidls/NodeFilter.webidl b/components/script/dom/webidls/NodeFilter.webidl similarity index 100% rename from src/components/script/dom/webidls/NodeFilter.webidl rename to components/script/dom/webidls/NodeFilter.webidl diff --git a/src/components/script/dom/webidls/NodeIterator.webidl b/components/script/dom/webidls/NodeIterator.webidl similarity index 100% rename from src/components/script/dom/webidls/NodeIterator.webidl rename to components/script/dom/webidls/NodeIterator.webidl diff --git a/src/components/script/dom/webidls/NodeList.webidl b/components/script/dom/webidls/NodeList.webidl similarity index 100% rename from src/components/script/dom/webidls/NodeList.webidl rename to components/script/dom/webidls/NodeList.webidl diff --git a/src/components/script/dom/webidls/ParentNode.webidl b/components/script/dom/webidls/ParentNode.webidl similarity index 100% rename from src/components/script/dom/webidls/ParentNode.webidl rename to components/script/dom/webidls/ParentNode.webidl diff --git a/src/components/script/dom/webidls/Performance.webidl b/components/script/dom/webidls/Performance.webidl similarity index 100% rename from src/components/script/dom/webidls/Performance.webidl rename to components/script/dom/webidls/Performance.webidl diff --git a/src/components/script/dom/webidls/PerformanceTiming.webidl b/components/script/dom/webidls/PerformanceTiming.webidl similarity index 100% rename from src/components/script/dom/webidls/PerformanceTiming.webidl rename to components/script/dom/webidls/PerformanceTiming.webidl diff --git a/src/components/script/dom/webidls/ProcessingInstruction.webidl b/components/script/dom/webidls/ProcessingInstruction.webidl similarity index 100% rename from src/components/script/dom/webidls/ProcessingInstruction.webidl rename to components/script/dom/webidls/ProcessingInstruction.webidl diff --git a/src/components/script/dom/webidls/ProgressEvent.webidl b/components/script/dom/webidls/ProgressEvent.webidl similarity index 100% rename from src/components/script/dom/webidls/ProgressEvent.webidl rename to components/script/dom/webidls/ProgressEvent.webidl diff --git a/src/components/script/dom/webidls/Range.webidl b/components/script/dom/webidls/Range.webidl similarity index 100% rename from src/components/script/dom/webidls/Range.webidl rename to components/script/dom/webidls/Range.webidl diff --git a/src/components/script/dom/webidls/Screen.webidl b/components/script/dom/webidls/Screen.webidl similarity index 100% rename from src/components/script/dom/webidls/Screen.webidl rename to components/script/dom/webidls/Screen.webidl diff --git a/src/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl similarity index 100% rename from src/components/script/dom/webidls/TestBinding.webidl rename to components/script/dom/webidls/TestBinding.webidl diff --git a/src/components/script/dom/webidls/Text.webidl b/components/script/dom/webidls/Text.webidl similarity index 100% rename from src/components/script/dom/webidls/Text.webidl rename to components/script/dom/webidls/Text.webidl diff --git a/src/components/script/dom/webidls/TreeWalker.webidl b/components/script/dom/webidls/TreeWalker.webidl similarity index 100% rename from src/components/script/dom/webidls/TreeWalker.webidl rename to components/script/dom/webidls/TreeWalker.webidl diff --git a/src/components/script/dom/webidls/UIEvent.webidl b/components/script/dom/webidls/UIEvent.webidl similarity index 100% rename from src/components/script/dom/webidls/UIEvent.webidl rename to components/script/dom/webidls/UIEvent.webidl diff --git a/src/components/script/dom/webidls/URLSearchParams.webidl b/components/script/dom/webidls/URLSearchParams.webidl similarity index 100% rename from src/components/script/dom/webidls/URLSearchParams.webidl rename to components/script/dom/webidls/URLSearchParams.webidl diff --git a/src/components/script/dom/webidls/URLUtils.webidl b/components/script/dom/webidls/URLUtils.webidl similarity index 100% rename from src/components/script/dom/webidls/URLUtils.webidl rename to components/script/dom/webidls/URLUtils.webidl diff --git a/src/components/script/dom/webidls/URLUtilsReadOnly.webidl b/components/script/dom/webidls/URLUtilsReadOnly.webidl similarity index 100% rename from src/components/script/dom/webidls/URLUtilsReadOnly.webidl rename to components/script/dom/webidls/URLUtilsReadOnly.webidl diff --git a/src/components/script/dom/webidls/ValidityState.webidl b/components/script/dom/webidls/ValidityState.webidl similarity index 100% rename from src/components/script/dom/webidls/ValidityState.webidl rename to components/script/dom/webidls/ValidityState.webidl diff --git a/src/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl similarity index 100% rename from src/components/script/dom/webidls/Window.webidl rename to components/script/dom/webidls/Window.webidl diff --git a/src/components/script/dom/webidls/Worker.webidl b/components/script/dom/webidls/Worker.webidl similarity index 100% rename from src/components/script/dom/webidls/Worker.webidl rename to components/script/dom/webidls/Worker.webidl diff --git a/src/components/script/dom/webidls/WorkerGlobalScope.webidl b/components/script/dom/webidls/WorkerGlobalScope.webidl similarity index 100% rename from src/components/script/dom/webidls/WorkerGlobalScope.webidl rename to components/script/dom/webidls/WorkerGlobalScope.webidl diff --git a/src/components/script/dom/webidls/WorkerLocation.webidl b/components/script/dom/webidls/WorkerLocation.webidl similarity index 100% rename from src/components/script/dom/webidls/WorkerLocation.webidl rename to components/script/dom/webidls/WorkerLocation.webidl diff --git a/src/components/script/dom/webidls/WorkerNavigator.webidl b/components/script/dom/webidls/WorkerNavigator.webidl similarity index 100% rename from src/components/script/dom/webidls/WorkerNavigator.webidl rename to components/script/dom/webidls/WorkerNavigator.webidl diff --git a/src/components/script/dom/webidls/XMLHttpRequest.webidl b/components/script/dom/webidls/XMLHttpRequest.webidl similarity index 100% rename from src/components/script/dom/webidls/XMLHttpRequest.webidl rename to components/script/dom/webidls/XMLHttpRequest.webidl diff --git a/src/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl b/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl similarity index 100% rename from src/components/script/dom/webidls/XMLHttpRequestEventTarget.webidl rename to components/script/dom/webidls/XMLHttpRequestEventTarget.webidl diff --git a/src/components/script/dom/webidls/XMLHttpRequestUpload.webidl b/components/script/dom/webidls/XMLHttpRequestUpload.webidl similarity index 100% rename from src/components/script/dom/webidls/XMLHttpRequestUpload.webidl rename to components/script/dom/webidls/XMLHttpRequestUpload.webidl diff --git a/src/components/script/dom/window.rs b/components/script/dom/window.rs similarity index 100% rename from src/components/script/dom/window.rs rename to components/script/dom/window.rs diff --git a/src/components/script/dom/worker.rs b/components/script/dom/worker.rs similarity index 100% rename from src/components/script/dom/worker.rs rename to components/script/dom/worker.rs diff --git a/src/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs similarity index 100% rename from src/components/script/dom/workerglobalscope.rs rename to components/script/dom/workerglobalscope.rs diff --git a/src/components/script/dom/workerlocation.rs b/components/script/dom/workerlocation.rs similarity index 100% rename from src/components/script/dom/workerlocation.rs rename to components/script/dom/workerlocation.rs diff --git a/src/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs similarity index 100% rename from src/components/script/dom/workernavigator.rs rename to components/script/dom/workernavigator.rs diff --git a/src/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs similarity index 100% rename from src/components/script/dom/xmlhttprequest.rs rename to components/script/dom/xmlhttprequest.rs diff --git a/src/components/script/dom/xmlhttprequesteventtarget.rs b/components/script/dom/xmlhttprequesteventtarget.rs similarity index 100% rename from src/components/script/dom/xmlhttprequesteventtarget.rs rename to components/script/dom/xmlhttprequesteventtarget.rs diff --git a/src/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs similarity index 100% rename from src/components/script/dom/xmlhttprequestupload.rs rename to components/script/dom/xmlhttprequestupload.rs diff --git a/src/components/script/html/cssparse.rs b/components/script/html/cssparse.rs similarity index 100% rename from src/components/script/html/cssparse.rs rename to components/script/html/cssparse.rs diff --git a/src/components/script/html/hubbub_html_parser.rs b/components/script/html/hubbub_html_parser.rs similarity index 100% rename from src/components/script/html/hubbub_html_parser.rs rename to components/script/html/hubbub_html_parser.rs diff --git a/src/components/script/layout_interface.rs b/components/script/layout_interface.rs similarity index 100% rename from src/components/script/layout_interface.rs rename to components/script/layout_interface.rs diff --git a/src/components/script/script.rs b/components/script/lib.rs similarity index 99% rename from src/components/script/script.rs rename to components/script/lib.rs index 69ffc2fa59b..6e44b295968 100644 --- a/src/components/script/script.rs +++ b/components/script/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "script"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/components/script/makefile.cargo b/components/script/makefile.cargo new file mode 100644 index 00000000000..652bcab9000 --- /dev/null +++ b/components/script/makefile.cargo @@ -0,0 +1,45 @@ +# Recursive wildcard function +# http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html +rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \ + $(filter $(subst *,%,$2),$d)) + +PYTHON = $(shell which python2.7 2>/dev/null || echo python) +BINDINGS_SRC = $(shell pwd)/dom/bindings/codegen +WEBIDLS_SRC = $(shell pwd)/dom/webidls +WEBIDLS = $(call rwildcard,$(WEBIDLS_SRC),*.webidl) +BINDINGS = $(patsubst %.webidl,%Binding.rs,$(WEBIDLS)) +AUTOGEN_SRC = $(foreach var,$(BINDINGS),$(subst $(WEBIDLS_SRC),$(BINDINGS_SRC)/Bindings,$(var))) + +CACHE_DIR = $(BINDINGS_SRC)/_cache + +bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/,BindingGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py ParserResults.pkl Bindings/.done) + +globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/,GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done $(BINDINGS_SRC)/Bindings/.done + +.PHONY: all +all: $(AUTOGEN_SRC) + +$(BINDINGS_SRC)/Bindings/.done: + mkdir -p $(BINDINGS_SRC)/Bindings + touch $@ + +$(CACHE_DIR)/.done: + mkdir -p $(CACHE_DIR) + touch $@ + +$(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) $(WEBIDLS) + $(PYTHON) $(BINDINGS_SRC)/pythonpath.py \ + -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ + -D$(BINDINGS_SRC) \ + $(BINDINGS_SRC)/GlobalGen.py $(BINDINGS_SRC)/Bindings.conf . \ + --cachedir=$(CACHE_DIR) \ + $(WEBIDLS) + +$(AUTOGEN_SRC): $(BINDINGS_SRC)/Bindings/%Binding.rs: $(bindinggen_dependencies) \ + $(addprefix $(WEBIDLS_SRC)/,%.webidl) + $(PYTHON) $(BINDINGS_SRC)/pythonpath.py \ + -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ + -D$(BINDINGS_SRC) \ + $(BINDINGS_SRC)/BindingGen.py \ + $(BINDINGS_SRC)/Bindings.conf Bindings/$*Binding $(addprefix $(WEBIDLS_SRC)/,$*.webidl) + touch $@ diff --git a/src/components/script/page.rs b/components/script/page.rs similarity index 100% rename from src/components/script/page.rs rename to components/script/page.rs diff --git a/src/components/script/script_task.rs b/components/script/script_task.rs similarity index 100% rename from src/components/script/script_task.rs rename to components/script/script_task.rs diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml new file mode 100644 index 00000000000..3bc1beda99f --- /dev/null +++ b/components/script_traits/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "script_traits" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "script_traits" +path = "lib.rs" + +[dependencies.msg] +path = "../msg" + +[dependencies.net] +path = "../net" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.url] +git = "https://github.com/servo/rust-url" diff --git a/src/components/script_traits/script_traits.rs b/components/script_traits/lib.rs similarity index 98% rename from src/components/script_traits/script_traits.rs rename to components/script_traits/lib.rs index 67d37fab7e8..d98c1de0e8b 100644 --- a/src/components/script_traits/script_traits.rs +++ b/components/script_traits/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "script_traits"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/src/components/style/.gitignore b/components/style/.gitignore similarity index 100% rename from src/components/style/.gitignore rename to components/style/.gitignore diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml new file mode 100644 index 00000000000..a8ccfc42e35 --- /dev/null +++ b/components/style/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "style" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +build = "make -f makefile.cargo" + +[lib] +name = "style" +path = "lib.rs" + +doc = false + +[dependencies.macros] +path = "../macros" + +[dependencies.util] +path = "../util" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.url] +git = "https://github.com/servo/rust-url" + +[dependencies.cssparser] +git = "https://github.com/servo/rust-cssparser" + +[dependencies.encoding] +git = "https://github.com/lifthrasiir/rust-encoding" + diff --git a/src/components/style/Mako-0.9.1.zip b/components/style/Mako-0.9.1.zip similarity index 100% rename from src/components/style/Mako-0.9.1.zip rename to components/style/Mako-0.9.1.zip diff --git a/src/components/style/README.md b/components/style/README.md similarity index 100% rename from src/components/style/README.md rename to components/style/README.md diff --git a/src/components/style/errors.rs b/components/style/errors.rs similarity index 100% rename from src/components/style/errors.rs rename to components/style/errors.rs diff --git a/src/components/style/font_face.rs b/components/style/font_face.rs similarity index 100% rename from src/components/style/font_face.rs rename to components/style/font_face.rs diff --git a/src/components/style/style.rs b/components/style/lib.rs similarity index 97% rename from src/components/style/style.rs rename to components/style/lib.rs index 2c544cccb8b..6bf8b79e842 100644 --- a/src/components/style/style.rs +++ b/components/style/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -#![crate_name = "style"] -#![crate_type = "rlib"] - #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] diff --git a/components/style/makefile.cargo b/components/style/makefile.cargo new file mode 100644 index 00000000000..f797dee7237 --- /dev/null +++ b/components/style/makefile.cargo @@ -0,0 +1,8 @@ +MAKO_ZIP = Mako-0.9.1.zip +PYTHON = $(shell which python2.7 2>/dev/null || echo python) + +all: properties/mod.rs + +properties/mod.rs: properties/mod.rs.mako + PYTHONPATH=$(MAKO_ZIP) $(PYTHON) -c "from mako.template import Template; print(Template(filename='$<').render())" > $@.tmp + mv $@.tmp $@ diff --git a/src/components/style/media_queries.rs b/components/style/media_queries.rs similarity index 100% rename from src/components/style/media_queries.rs rename to components/style/media_queries.rs diff --git a/src/components/style/namespaces.rs b/components/style/namespaces.rs similarity index 100% rename from src/components/style/namespaces.rs rename to components/style/namespaces.rs diff --git a/src/components/style/node.rs b/components/style/node.rs similarity index 100% rename from src/components/style/node.rs rename to components/style/node.rs diff --git a/src/components/style/parsing_utils.rs b/components/style/parsing_utils.rs similarity index 100% rename from src/components/style/parsing_utils.rs rename to components/style/parsing_utils.rs diff --git a/src/components/style/properties/common_types.rs b/components/style/properties/common_types.rs similarity index 100% rename from src/components/style/properties/common_types.rs rename to components/style/properties/common_types.rs diff --git a/src/components/style/properties/mod.rs.mako b/components/style/properties/mod.rs.mako similarity index 100% rename from src/components/style/properties/mod.rs.mako rename to components/style/properties/mod.rs.mako diff --git a/src/components/style/selector_matching.rs b/components/style/selector_matching.rs similarity index 100% rename from src/components/style/selector_matching.rs rename to components/style/selector_matching.rs diff --git a/src/components/style/selectors.rs b/components/style/selectors.rs similarity index 100% rename from src/components/style/selectors.rs rename to components/style/selectors.rs diff --git a/src/components/style/stylesheets.rs b/components/style/stylesheets.rs similarity index 100% rename from src/components/style/stylesheets.rs rename to components/style/stylesheets.rs diff --git a/src/components/style/user-agent.css b/components/style/user-agent.css similarity index 100% rename from src/components/style/user-agent.css rename to components/style/user-agent.css diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml new file mode 100644 index 00000000000..be6662b76f6 --- /dev/null +++ b/components/util/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "util" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "util" +path = "lib.rs" + +[dependencies.azure] +git = "https://github.com/servo/rust-azure" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.task_info] +path = "../../support/rust-task_info" + +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" diff --git a/src/components/util/atom.rs b/components/util/atom.rs similarity index 100% rename from src/components/util/atom.rs rename to components/util/atom.rs diff --git a/src/components/util/cache.rs b/components/util/cache.rs similarity index 100% rename from src/components/util/cache.rs rename to components/util/cache.rs diff --git a/src/components/util/debug_utils.rs b/components/util/debug_utils.rs similarity index 100% rename from src/components/util/debug_utils.rs rename to components/util/debug_utils.rs diff --git a/src/components/util/geometry.rs b/components/util/geometry.rs similarity index 100% rename from src/components/util/geometry.rs rename to components/util/geometry.rs diff --git a/src/components/util/util.rs b/components/util/lib.rs similarity index 95% rename from src/components/util/util.rs rename to components/util/lib.rs index b74ed076e75..d05efb735b6 100644 --- a/src/components/util/util.rs +++ b/components/util/lib.rs @@ -2,10 +2,6 @@ * 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/. */ -#![crate_name = "util"] -#![crate_type = "rlib"] - - #![feature(macro_rules,unsafe_destructor)] #![feature(phase)] diff --git a/src/components/util/logical_geometry.rs b/components/util/logical_geometry.rs similarity index 100% rename from src/components/util/logical_geometry.rs rename to components/util/logical_geometry.rs diff --git a/src/components/util/memory.rs b/components/util/memory.rs similarity index 100% rename from src/components/util/memory.rs rename to components/util/memory.rs diff --git a/src/components/util/namespace.rs b/components/util/namespace.rs similarity index 100% rename from src/components/util/namespace.rs rename to components/util/namespace.rs diff --git a/src/components/util/opts.rs b/components/util/opts.rs similarity index 100% rename from src/components/util/opts.rs rename to components/util/opts.rs diff --git a/src/components/util/range.rs b/components/util/range.rs similarity index 100% rename from src/components/util/range.rs rename to components/util/range.rs diff --git a/src/components/util/smallvec.rs b/components/util/smallvec.rs similarity index 100% rename from src/components/util/smallvec.rs rename to components/util/smallvec.rs diff --git a/src/components/util/sort.rs b/components/util/sort.rs similarity index 100% rename from src/components/util/sort.rs rename to components/util/sort.rs diff --git a/src/components/util/str.rs b/components/util/str.rs similarity index 100% rename from src/components/util/str.rs rename to components/util/str.rs diff --git a/src/components/util/task.rs b/components/util/task.rs similarity index 100% rename from src/components/util/task.rs rename to components/util/task.rs diff --git a/src/components/util/time.rs b/components/util/time.rs similarity index 100% rename from src/components/util/time.rs rename to components/util/time.rs diff --git a/src/components/util/vec.rs b/components/util/vec.rs similarity index 100% rename from src/components/util/vec.rs rename to components/util/vec.rs diff --git a/src/components/util/workqueue.rs b/components/util/workqueue.rs similarity index 100% rename from src/components/util/workqueue.rs rename to components/util/workqueue.rs diff --git a/configure b/configure deleted file mode 100755 index 8b97b7e0263..00000000000 --- a/configure +++ /dev/null @@ -1,769 +0,0 @@ -#!/bin/sh - -msg() { - echo "configure: $1" -} - -step_msg() { - msg - msg "$1" - msg -} - -warn() { - echo "configure: WARNING: $1" -} - -err() { - echo "configure: error: $1" - exit 1 -} - -need_ok() { - if [ $? -ne 0 ] - then - err $1 - fi -} - -need_cmd() { - if which $1 >/dev/null 2>&1 - then msg "found $1" - else err "need $1" - fi -} - -make_dir() { - if [ ! -d $1 ] - then - msg "mkdir -p $1" - mkdir -p "$1" - fi -} - -copy_if_changed() { - if cmp -s $1 $2 - then - msg "leaving $2 unchanged" - else - msg "cp $1 $2" - cp -f $1 $2 - chmod u-w $2 # make copied artifact read-only - fi -} - -move_if_changed() { - if cmp -s $1 $2 - then - msg "leaving $2 unchanged" - else - msg "mv $1 $2" - mv -f $1 $2 - chmod u-w $2 # make moved artifact read-only - fi -} - -putvar() { - local T - eval T=\$$1 - eval TLEN=\${#$1} - if [ $TLEN -gt 35 ] - then - printf "configure: %-20s := %.35s ...\n" $1 "$T" - else - printf "configure: %-20s := %s %s\n" $1 "$T" "$2" - fi - printf "%-20s ?= %s\n" $1 "$T" >>${CFG_BUILD_HOME}config.tmp -} - -probe() { - local V=$1 - shift - local P - local T - for P - do - T=$(which $P 2>&1) - if [ $? -eq 0 ] - then - VER0=$($P --version 2>/dev/null | head -1 \ - | sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' ) - if [ $? -eq 0 -a "x${VER0}" != "x" ] - then - VER="($VER0)" - else - VER="" - fi - break - else - VER="" - T="" - fi - done - eval $V=\$T - putvar $V "$VER" -} - -probe_ext() { - local V=$1 - local E=$2 - shift 2 - local P - local T - for P - do - T=$(which $P 2>&1) - if [ $? -eq 0 ] - then - VER0=$($P --version 2>/dev/null | head -1 \ - | sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' ) - if [ $? -eq 0 -a "x${VER0}" != "x" ] - then - VER="($VER0)" - else - VER="" - fi - break - else - VER="" - T="" - fi - done - eval $V="'$T $E'" - putvar $V "$VER" -} - -probe_need() { - local V=$1 - probe $* - eval VV=\$$V - if [ -z "$VV" ] - then - err "needed, but unable to find any of: $*" - fi -} - -valopt() { - local OP=$1 - local DEFAULT=$2 - shift - shift - local DOC="$*" - if [ $HELP -eq 0 ] - then - local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_') - local V="CFG_${UOP}" - eval $V="$DEFAULT" - for arg in $CFG_CONFIGURE_ARGS - do - if echo "$arg" | grep -q -- "--$OP=" - then - val=$(echo "$arg" | cut -f2 -d=) - eval $V=$val - fi - done - putvar $V - else - if [ -z "$DEFAULT" ] - then - DEFAULT="" - fi - OP="${OP}=[${DEFAULT}]" - printf " --%-30s %s\n" "$OP" "$DOC" - fi -} - -opt() { - local OP=$1 - local DEFAULT=$2 - shift - shift - local DOC="$*" - local FLAG="" - - if [ $DEFAULT -eq 0 ] - then - FLAG="enable" - else - FLAG="disable" - DOC="don't $DOC" - fi - - if [ $HELP -eq 0 ] - then - for arg in $CFG_CONFIGURE_ARGS - do - if [ "$arg" = "--${FLAG}-${OP}" ] - then - OP=$(echo $OP | tr 'a-z-' 'A-Z_') - FLAG=$(echo $FLAG | tr 'a-z' 'A-Z') - local V="CFG_${FLAG}_${OP}" - eval $V=1 - putvar $V - fi - done - else - if [ ! -z "$META" ] - then - OP="$OP=<$META>" - fi - printf " --%-30s %s\n" "$FLAG-$OP" "$DOC" - fi -} - -split_triple() { - local TRIPLE=$1 - local ARCH=$2 - local VENDOR=$3 - local OS=$4 - - eval $ARCH=$(echo "$TRIPLE" | cut -d'-' -f1) - eval $VENDOR=$(echo "$TRIPLE" | cut -d'-' -f2) - eval $OS=$(echo "$TRIPLE" | cut -d'-' -f3) - - if [ $(echo "$TRIPLE" | cut -d'-' -f3) = "androideabi" ] - then - eval $OS="android" - fi -} - -os_type() { - # The goal here is to come up with the same triple as LLVM would, - # at least for the subset of platforms we're willing to target. - - local OP=$1 - local OSTYPE=$(echo "$2" | tr '[:upper:]' '[:lower:]') - local V="${OP}" - - case $OSTYPE in - - linux) - eval $V=unknown-linux-gnu - ;; - - freebsd) - eval $V=unknown-freebsd - ;; - - darwin) - eval $V=apple-darwin - ;; - - mingw32*) - eval $V=pc-mingw32 - ;; - - android) - eval $V=linux-androideabi - ;; - - *) - err "unknown OS type: $OSTYPE" - ;; - esac -} - -cpu_type() { - local OP=$1 - local CPUTYPE=$2 - local V="${OP}" - - case $CPUTYPE in - - i386 | i486 | i686 | i786 | x86) - eval $V=i686 - ;; - - xscale | arm) - eval $V=arm - ;; - - x86_64 | x86-64 | x64 | amd64) - eval $V=x86_64 - ;; - - *) - err "unknown CPU type: $CPUTYPE" - esac -} - -if [ -f configure -a -f Makefile.in ]; then - msg "You seem to be running configure within the source tree root." - msg "This is not supported. Instead, make a build directory:" - msg "" - msg " mkdir -p build && cd build && ../configure" - msg "" - msg "See README.md for more information." - exit 1 -fi - -msg "looking for configure programs" -need_cmd cmp -need_cmd mkdir -need_cmd printf -need_cmd cut -need_cmd grep -need_cmd xargs -need_cmd cp -need_cmd find -need_cmd uname -need_cmd date -need_cmd tr -need_cmd sed - -msg "inspecting environment" - -OSTYPE=$(uname -s) -CPUTYPE=$(uname -m) - -if [ $OSTYPE = Darwin -a $CPUTYPE = i386 ] -then - # Darwin's `uname -m` lies and always returns i386. We have to use sysctl - # instead. - if sysctl hw.optional.x86_64 | grep -q ': 1' - then - CPUTYPE=x86_64 - fi -fi - -os_type CFG_BUILD_OSTYPE ${OSTYPE} -cpu_type CFG_BUILD_CPUTYPE ${CPUTYPE} - -DEFAULT_TARGET="${CFG_BUILD_CPUTYPE}-${CFG_BUILD_OSTYPE}" - -CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/" -CFG_BUILD_HOME="$(pwd)/" -CFG_SELF=${CFG_SRC_DIR}$(basename $0) -CFG_CONFIGURE_ARGS="$@" -CFG_PATH=$PATH - -if [ -n "$CFG_DISABLE_MANAGE_SUBMODULES" ] -then - if git status $CFG_SRC_DIR/src/support $CFG_SRC_DIR/src/platform \ - | grep -q 'modified:.*modified content'; then - err "Some submodule has a dirty working tree. See 'git status'." - fi -fi - -OPTIONS="" -HELP=0 -if [ "$1" = "-h" ] || [ "$1" = "--help" ] -then - HELP=1 - shift - echo "" - echo "Usage: $CFG_SELF [options]" - echo "" - echo "Options:" - echo "" -else - msg "recreating config.tmp" - echo '' >${CFG_BUILD_HOME}config.tmp - - step_msg "processing $CFG_SELF args" -fi - -opt optimize 1 "build optimized rust code" -opt optimize-cxx 1 "build optimized C++ code" -opt manage-submodules 1 "let the build manage the git submodules" -opt fast-make 0 "use .gitmodules as timestamp for submodule deps" -opt debug 0 "build with debugging code and symbols" -opt debug-skia 0 "build Skia and Azure for debugging (significant performance hit)" -valopt local-rust-root "" "set prefix for local rust binary" -valopt target "${DEFAULT_TARGET}" "target to be compiled" -valopt android-cross-path "/opt/ndk_standalone" "Android NDK cross compiler path" -valopt android-ndk-path "/opt/android-ndk" "Android NDK path" -valopt android-sdk-path "/opt/android-sdk" "Android SDK path" -valopt android-font-path "/system/fonts" "Android Font path" -valopt android-resource-path "/sdcard/servo" "Android Resource path" - -if [ $HELP -eq 1 ] -then - echo "" - exit 0 -fi - -# Split target triple -split_triple "${CFG_TARGET}" TARGET_CPUTYPE TARGET_VENDOR TARGET_OSTYPE - -# Set target os and cpu type -os_type CFG_OSTYPE ${TARGET_OSTYPE} -cpu_type CFG_CPUTYPE ${TARGET_CPUTYPE} - -# probe before updating PATH so we don't get ndk-toolchain stuff -probe_need CFG_GIT git -probe_need CFG_PYTHON2 python2 python2.7 python -export PYTHON=${CFG_PYTHON2} -echo "exporting python = ${CFG_PYTHON2}" -# Spidermonkey requires autoconf 2.13 exactly -probe_need CFG_AUTOCONF213 autoconf213 \ - autoconf2.13 \ - autoconf-2.13 - -step_msg "looking for build programs" -case ${TARGET_OSTYPE} in - android) - CFG_PATH=$PATH:"${CFG_ANDROID_CROSS_PATH}/bin" - OLD_PATH=$PATH - export PATH=${CFG_PATH} - - probe CFG_CC arm-linux-androideabi-gcc - probe CFG_CXX arm-linux-androideabi-g++ - probe CFG_LD arm-linux-androideabi-ld - probe CFG_AR arm-linux-androideabi-ar - probe CFG_RANLIB arm-linux-androideabi-ranlib - - export PATH=${OLD_PATH} - ;; - *) - CFG_PATH=$PATH - if [ "$CFG_CPUTYPE" = "i686" ]; then - probe_ext CFG_CC -m32 gcc - probe_ext CFG_CXX -m32 g++ - else - probe CFG_CC gcc - probe CFG_CXX g++ - fi - probe CFG_LD ld - probe CFG_AR ar - probe CFG_RANLIB ranlib - CFG_RUSTC_FLAGS="" - ;; -esac - -probe CFG_CLANG clang++ - -CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET}/" -make_dir "${CFG_BUILD_DIR}" - -if [ ! -z "$CFG_LOCAL_RUST_ROOT" ] -then - if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ] - then - if [ $CFG_OSTYPE = "apple-darwin" ]; then - export DYLD_LIBRARY_PATH=${CFG_LOCAL_RUST_ROOT}/lib - else - export LD_LIBRARY_PATH=${CFG_LOCAL_RUST_ROOT}/lib - fi - LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version` - step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV" - CFG_RUST_HOME=${CFG_LOCAL_RUST_ROOT} - CFG_LOCAL_RUSTC=1 - else - err "No rustc found at ${CFG_LOCAL_RUST_ROOT}/bin/rustc" - fi -else - step_msg "Using binary Rust snapshot" - make_dir ${CFG_BUILD_DIR}/rust_snapshot - CFG_SNAPSHOT_RUSTC=1 - SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/rust-snapshot-hash | rev | cut -d/ -f1 | rev) - CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET} - CFG_RUST_HOME=${CFG_LOCAL_RUST_ROOT} -fi - -CFG_RUSTC=${CFG_RUST_HOME}/bin/rustc - -if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_CC" ] -then - err "either clang or gcc is required" -fi - -# Configure submodules -step_msg "configuring submodules" - -# Have to be in the top of src directory for this -if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ] -then - cd ${CFG_SRC_DIR} - - msg "git: submodule sync" - "${CFG_GIT}" submodule --quiet sync --recursive - - # NB: this is just for the sake of getting the submodule SHA1 values - # and status written into the build log. - msg "git: submodule status" - "${CFG_GIT}" submodule status --recursive - - msg "git: submodule update" - "${CFG_GIT}" submodule update --init --recursive - need_ok "git failed" - - msg "git: submodule clobber" - "${CFG_GIT}" submodule foreach --recursive \ - 'if [ -n "$(git status --porcelain)" ] ; then echo "Refusing to clobber $path" ; else git clean -dxf ; git checkout . ; fi' - need_ok "git failed" - - cd ${CFG_BUILD_DIR} -fi - -step_msg "running submodule autoconf scripts" - -msg "configuring src/mozjs" - -AUTOCONF213_M4_MACROS="$(dirname ${CFG_AUTOCONF213})/../share/$(basename ${CFG_AUTOCONF213})/" - -# Run the SpiderMonkey autoconf using autoconf 2.13 -(cd ${CFG_SRC_DIR}src/support/spidermonkey/mozjs/js/src && "${CFG_AUTOCONF213}" -l "${AUTOCONF213_M4_MACROS}") || exit $? - -if [ $CFG_OSTYPE = "linux-androideabi" ] -then - msg "configuring src/libexpat" - (cd ${CFG_SRC_DIR}src/platform/android/libexpat/expat && sh "buildconf.sh") || exit $? - ## expat is missing install-sh and other tools and doesn't use automake - ## which is what creates it. use the ones from spidermonkey - for name in install-sh config.sub config.guess - do - cp ${CFG_SRC_DIR}src/support/spidermonkey/mozjs/js/src/build/autoconf/${name} ${CFG_SRC_DIR}src/platform/android/libexpat/expat/conftools/ - done -fi - -CFG_SUBMODULES="\ - support/alert/rust-alert \ - support/azure/rust-azure \ - support/css/rust-cssparser \ - support/encoding/rust-encoding \ - support/harfbuzz/rust-harfbuzz \ - support/http/rust-http \ - support/hubbub/libhubbub \ - support/hubbub/rust-hubbub \ - support/libparserutils/libparserutils \ - support/skia/skia \ - support/spidermonkey/mozjs \ - support/spidermonkey/rust-mozjs \ - support/stb-image/rust-stb-image \ - support/png/libpng \ - support/png/rust-png \ - support/geom/rust-geom \ - support/layers/rust-layers \ - support/opengles/rust-opengles \ - support/sharegl/sharegl \ - support/phf/rust-phf \ - support/stringcache/string-cache \ - support/url/rust-url" - -if [ $CFG_OSTYPE = "apple-darwin" ] -then -CFG_SUBMODULES="\ - platform/macos/rust-core-foundation \ - platform/macos/rust-core-graphics \ - platform/macos/rust-core-text \ - platform/macos/rust-io-surface \ - support/glfw/glfw \ - support/glfw/glfw-rs \ - platform/macos/rust-cocoa \ - platform/macos/rust-task_info \ - support/ssl/rust-openssl \ - ${CFG_SUBMODULES}" -fi - -if [ $CFG_OSTYPE = "unknown-linux-gnu" ] -then -CFG_SUBMODULES="\ - platform/linux/rust-xlib \ - platform/fontconfig/fontconfig \ - support/glfw/glfw \ - support/glfw/glfw-rs \ - platform/linux/rust-fontconfig \ - platform/linux/rust-freetype \ - support/ssl/rust-openssl \ - ${CFG_SUBMODULES}" -fi - -if [ $CFG_OSTYPE = "linux-androideabi" ] -then -CFG_SUBMODULES="\ - support/glut/rust-glut \ - support/egl/rust-egl \ - platform/android/libexpat \ - platform/android/libfreetype2 \ - platform/fontconfig/fontconfig \ - platform/linux/rust-fontconfig \ - platform/linux/rust-freetype \ - ${CFG_SUBMODULES}" -fi - -step_msg "writing configuration" - -putvar DEFAULT_TARGET -putvar CFG_TARGET -putvar CFG_CPUTYPE -putvar CFG_OSTYPE -putvar CFG_SRC_DIR -putvar CFG_BUILD_HOME -putvar CFG_BUILD_DIR -putvar CFG_CONFIGURE_ARGS -putvar CFG_SUBMODULES -putvar CFG_DISABLE_MANAGE_SUBMODULES -putvar CFG_RUSTC -putvar CFG_RUSTC_FLAGS -putvar CFG_RUST_HOME -putvar CFG_PATH -putvar CFG_SNAPSHOT_RUSTC -putvar CFG_LOCAL_RUSTC -putvar CFG_LOCAL_RUST_ROOT -putvar CFG_ENABLE_DEBUG -putvar CFG_ENABLE_DEBUG_SKIA - -msg -copy_if_changed ${CFG_SRC_DIR}Makefile.in ${CFG_BUILD_HOME}Makefile -move_if_changed ${CFG_BUILD_HOME}config.tmp ${CFG_BUILD_HOME}config.mk -copy_if_changed ${CFG_BUILD_HOME}config.mk ${CFG_SRC_DIR}/.config.mk.last -rm -f ${CFG_BUILD_HOME}config.tmp -touch ${CFG_BUILD_HOME}config.stamp - -export CFG_CONFIG_MK="${CFG_BUILD_HOME}config.mk" - -step_msg "making build directories" - -cd "${CFG_BUILD_DIR}" - -for i in ${CFG_SUBMODULES} -do - make_dir ${CFG_BUILD_DIR}src/${i} -done - -make_dir ${CFG_BUILD_DIR}src/components/macros -make_dir ${CFG_BUILD_DIR}src/components/util -make_dir ${CFG_BUILD_DIR}src/components/compositing -make_dir ${CFG_BUILD_DIR}src/components/embedding -make_dir ${CFG_BUILD_DIR}src/components/msg -make_dir ${CFG_BUILD_DIR}src/components/net -make_dir ${CFG_BUILD_DIR}src/components/canvas -make_dir ${CFG_BUILD_DIR}src/components/gfx -make_dir ${CFG_BUILD_DIR}src/components/layout -make_dir ${CFG_BUILD_DIR}src/components/layout_traits -make_dir ${CFG_BUILD_DIR}src/components/script -make_dir ${CFG_BUILD_DIR}src/components/script_traits -make_dir ${CFG_BUILD_DIR}src/components/style -make_dir ${CFG_BUILD_DIR}src/components/main -make_dir src/test/html/ref - -# TODO: don't run configure on submodules unless necessary. For an example, -# see how Rust's configure script optionally reconfigures the LLVM module. -step_msg "running submodule configure scripts" - -# fontconfig expects to use an installed freetype, but we want to use our version on Android -if [ $CFG_OSTYPE = "linux-androideabi" ] -then - export FREETYPE_CFLAGS="-I${CFG_SRC_DIR}src/platform/android/libfreetype2/include -I${CFG_BUILD_DIR}src/platform/android/libfreetype2/include" - export FREETYPE_LIBS="-L${CFG_BUILD_DIR}src/platform/android/libfreetype2/.libs -lfreetype" -fi - -# PIC all the things -export CFLAGS="${CFLAGS} -fPIC" -export LDFLAGS="${CFLAGS} -fPIC" - -if [ $CFG_BUILD_OSTYPE = "apple-darwin" ] -then - export LIBTOOLIZE=glibtoolize -fi - -# cross compile configurations -EXTRA_CONFIGURE_ARGS="CC=\"${CFG_CC}\" CXX=\"${CFG_CXX}\" LD=${CFG_LD} AR=${CFG_AR} RANLIB=${CFG_RANLIB} CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\"" - -for i in ${CFG_SUBMODULES} -do - if [ -d ${CFG_BUILD_DIR}src/${i} ] - then - cd ${CFG_BUILD_DIR}src/${i} - fi - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/configure" - CONFIGURE_ARGS="" - ENABLE_DEBUG="$CFG_ENABLE_DEBUG" - - case $i in - platform/android/libexpat) - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/expat/configure" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot" - ;; - platform/android/libfreetype2) - CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-zlib" - ;; - platform/fontconfig/fontconfig) - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh" - if [ ${CFG_OSTYPE} = "linux-androideabi" ]; then - CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-arch=arm" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-includes=${CFG_SRC_DIR}src/platform/android/libexpat/expat/lib" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-lib=${CFG_BUILD_DIR}src/platform/android/libexpat/.libs" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-cache-dir=${CFG_ANDROID_RESOURCE_PATH}/.fccache" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-confdir=${CFG_ANDROID_RESOURCE_PATH}/.fcconfig" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-default-fonts=${CFG_ANDROID_FONT_PATH}" - else - CONFIGURE_ARGS="${CONFIGURE_ARGS} --sysconfdir=/etc" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --localstatedir=/var" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-docs" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-shared" # work around Rust #12557 - if [ -f /etc/redhat-release ]; then - # Some RedHat-based distros (including our CentOS 6 build machines) are missing - # pkg-config files for expat: https://bugzilla.redhat.com/show_bug.cgi?id=833338 - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat=/usr" - fi - fi - # --enable-debug isn't supported by fontconfig - ENABLE_DEBUG= - ;; - support/spidermonkey/mozjs) - # needed because Spidermonkey configure is in non-standard location - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/js/src/configure" - if [ ! ${DEFAULT_TARGET} = ${CFG_TARGET} ]; then - # Only pass --target if different from the build host because - # spidermonkey will trigger a cross compile even on minor - # differences here. - CONFIGURE_ARGS="${CONFIGURE_ARGS} --target=${CFG_TARGET}" - fi - if [ ${CFG_OSTYPE} = "linux-androideabi" ]; then - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-android-ndk=${CFG_ANDROID_NDK_PATH}" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-android-toolchain=${CFG_ANDROID_CROSS_PATH}" - fi - CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-gczeal" - ;; - support/skia/skia) - # Right now the skia configure script actually ignores --enable-debug and the - # build looks only at CFG_ENABLE_DEBUG_SKIA exported from our Makefile. But we - # still refrain from passing --enable-debug if we didn't get --enable-debug-skia, - # in order to be more future-proof. - # - # The same applies to rust-azure below. Also note that the two libraries won't - # link if one is built with debugging and the other isn't. - ENABLE_DEBUG="$CFG_ENABLE_DEBUG_SKIA" - ;; - support/azure/rust-azure) - # needed because Azure's configure wants "--enable-skia" - CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-skia" - ENABLE_DEBUG="$CFG_ENABLE_DEBUG_SKIA" - ;; - support/phf/rust-phf) - ENABLE_DEBUG="" - ;; - support/ssl/rust-openssl) - ENABLE_DEBUG="" - ;; - support/encoding/rust-encoding) - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/support/encoding/configure" - ;; - support/url/rust-url) - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/support/url/configure" - ;; - support/http/rust-http) - CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/support/http/rust-http/configure.servo" - ;; - *) - ;; - esac - - - if [ -n "$ENABLE_DEBUG" ]; then - CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-debug" - fi - - if [ -f ${CONFIGURE_SCRIPT} ]; then - (sh -c "${EXTRA_CONFIGURE_ARGS} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}") || exit $? - fi -done - -step_msg "complete" diff --git a/src/test/ci/fontconfig/30-metric-aliases.conf b/etc/ci/fontconfig/30-metric-aliases.conf similarity index 100% rename from src/test/ci/fontconfig/30-metric-aliases.conf rename to etc/ci/fontconfig/30-metric-aliases.conf diff --git a/src/test/ci/fontconfig/40-nonlatin.conf b/etc/ci/fontconfig/40-nonlatin.conf similarity index 100% rename from src/test/ci/fontconfig/40-nonlatin.conf rename to etc/ci/fontconfig/40-nonlatin.conf diff --git a/src/test/ci/fontconfig/45-latin.conf b/etc/ci/fontconfig/45-latin.conf similarity index 100% rename from src/test/ci/fontconfig/45-latin.conf rename to etc/ci/fontconfig/45-latin.conf diff --git a/src/test/ci/fontconfig/53-monospace-lcd-filter.conf b/etc/ci/fontconfig/53-monospace-lcd-filter.conf similarity index 100% rename from src/test/ci/fontconfig/53-monospace-lcd-filter.conf rename to etc/ci/fontconfig/53-monospace-lcd-filter.conf diff --git a/etc/ci/travis.before_script.sh b/etc/ci/travis.before_script.sh new file mode 100755 index 00000000000..f1fa1248a48 --- /dev/null +++ b/etc/ci/travis.before_script.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +case ${TRAVIS_OS_NAME} in + linux) + /usr/bin/Xorg :1 -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config etc/ci/xorg.conf & + + # Patch the broken font config files on ubuntu 12.04 lts - this should be removed when travis moves to ubuntu 14.04 lts + sudo cp etc/ci/fontconfig/* /etc/fonts/conf.avail/ + ;; + + osx) + ;; +esac diff --git a/etc/ci/travis.install.sh b/etc/ci/travis.install.sh new file mode 100755 index 00000000000..3f44ec6a727 --- /dev/null +++ b/etc/ci/travis.install.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +case ${TRAVIS_OS_NAME} in + linux) + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -q + sudo apt-get install -qq --force-yes -y xserver-xorg-input-void xserver-xorg-video-dummy xpra + sudo apt-get install -qq --force-yes -y gperf libXxf86vm-dev libstdc++6-4.7-dev + echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections + sudo apt-get install ttf-mscorefonts-installer > /dev/null + + # install glfw + git clone https://github.com/glfw/glfw.git + cd glfw + git checkout 3.0.3 + cmake -DCMAKE_C_FLAGS=-fPIC -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF . + make + sudo make install + cd .. + ;; + + osx) + brew install pkg-config python glfw3 + pip install virtualenv + ;; +esac diff --git a/etc/ci/travis.script.sh b/etc/ci/travis.script.sh new file mode 100755 index 00000000000..fce94992eb2 --- /dev/null +++ b/etc/ci/travis.script.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -e + +build_docs() { + ./mach doc + cp etc/doc.servo.org/* target/doc/ + cp -R rust/doc/* target/doc/ + + if [ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + echo '' > target/doc/index.html + sudo pip install ghp-import + ghp-import -n target/doc + git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages + fi +} + +build_servo() { + ./mach build -j 2 +} + +build_cef() { + ./mach build-cef -j 2 +} + +IFS="," read -ra tasks <<< "${TASKS}" +for t in "${tasks[@]}"; do + # OS specific setup + case ${TRAVIS_OS_NAME} in + linux) + export DISPLAY=:1.0 + export RUST_TEST_TASKS=1 + ;; + osx) + ;; + esac + + case $t in + build) + ./mach build -j 2 + ;; + build-cef) + ./mach build-cef -j 2 + ;; + test-content) + ./mach test-content + ;; + test-ref) + ./mach test-ref --kind cpu + ;; + test-wpt1) + ./mach test-wpt --processes=2 --total-chunks=2 --this-chunk=1 + ;; + test-wpt1) + ./mach test-wpt --processes=2 --total-chunks=2 --this-chunk=2 + ;; + *) + echo "Task $t not recognized." + ;; + esac +done diff --git a/src/test/ci/xorg.conf b/etc/ci/xorg.conf similarity index 100% rename from src/test/ci/xorg.conf rename to etc/ci/xorg.conf diff --git a/src/etc/doc.servo.org/CNAME b/etc/doc.servo.org/CNAME similarity index 100% rename from src/etc/doc.servo.org/CNAME rename to etc/doc.servo.org/CNAME diff --git a/src/etc/doc.servo.org/LICENSE b/etc/doc.servo.org/LICENSE similarity index 100% rename from src/etc/doc.servo.org/LICENSE rename to etc/doc.servo.org/LICENSE diff --git a/src/etc/doc.servo.org/README.md b/etc/doc.servo.org/README.md similarity index 100% rename from src/etc/doc.servo.org/README.md rename to etc/doc.servo.org/README.md diff --git a/src/etc/doc.servo.org/index.html b/etc/doc.servo.org/index.html similarity index 100% rename from src/etc/doc.servo.org/index.html rename to etc/doc.servo.org/index.html diff --git a/src/etc/jsdefine b/etc/jsdefine similarity index 100% rename from src/etc/jsdefine rename to etc/jsdefine diff --git a/src/etc/patches/README b/etc/patches/README similarity index 100% rename from src/etc/patches/README rename to etc/patches/README diff --git a/src/etc/patches/mozjs-stack-bounds.diff b/etc/patches/mozjs-stack-bounds.diff similarity index 100% rename from src/etc/patches/mozjs-stack-bounds.diff rename to etc/patches/mozjs-stack-bounds.diff diff --git a/src/etc/rustdoc-style.html b/etc/rustdoc-style.html similarity index 100% rename from src/etc/rustdoc-style.html rename to etc/rustdoc-style.html diff --git a/src/etc/servo.sb b/etc/servo.sb similarity index 100% rename from src/etc/servo.sb rename to etc/servo.sb diff --git a/src/etc/servo_gdb.py b/etc/servo_gdb.py similarity index 100% rename from src/etc/servo_gdb.py rename to etc/servo_gdb.py diff --git a/mach b/mach new file mode 100755 index 00000000000..e1a5c940a82 --- /dev/null +++ b/mach @@ -0,0 +1,25 @@ +#!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# The beginning of this script is both valid shell and valid python, +# such that the script starts with the shell and is reexecuted with +# the right python. +'''which' python2.7 > /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@" +''' + +from __future__ import print_function, unicode_literals + +import os +import sys + +def main(args): + topdir = os.path.dirname(sys.argv[0]) + sys.path[0:0] = [os.path.join(topdir, "python")] + import mach_bootstrap + mach = mach_bootstrap.bootstrap(topdir) + sys.exit(mach.run(sys.argv[1:])) + +if __name__ == '__main__': + main(sys.argv) diff --git a/mk/build.sh b/mk/build.sh deleted file mode 100755 index a6fbf3fc296..00000000000 --- a/mk/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -set -e -../configure -make tidy -make -j2 diff --git a/mk/check.mk b/mk/check.mk deleted file mode 100644 index e57ae21ee09..00000000000 --- a/mk/check.mk +++ /dev/null @@ -1,103 +0,0 @@ -define DEF_SUBMODULE_TEST_RULES -# check target -.PHONY: check-$(1) -check-$(1) : $$(DONE_$(1)) - @$$(call E, check: $(1)) - - $$(Q) \ - $$(ENV_CFLAGS_$(1)) \ - $$(ENV_CXXFLAGS_$(1)) \ - $$(ENV_RFLAGS_$(1)) \ - $$(CROSS_COMPILER_CC) \ - $$(CROSS_COMPILER_CXX) \ - $$(CROSS_COMPILER_LD) \ - $$(CROSS_COMPILER_AR) \ - $$(MAKE) -C $$(B)src/$$(PATH_$(1)) check - -DEPS_CHECK_ALL += $(1) -endef - -$(foreach submodule,$(SUBMODULES),\ -$(eval $(call DEF_SUBMODULE_TEST_RULES,$(submodule)))) - - -define DEF_LIB_CRATE_TEST_RULES -servo-test-$(1): $$(DEPS_$(1)) - @$$(call E, compile: servo-test-$(1)) - $$(Q)$$(RUSTC) $(strip $(TARGET_FLAGS) $(CFG_RUSTC_FLAGS)) $$(RFLAGS_$(1)) --test -o $$@ $$< - -.PHONY: check-servo-$(1) -check-servo-$(1): servo-test-$(1) - @$$(call E, check: $(1)) - $$(Q)./servo-test-$(1) $(TESTNAME) -endef - -$(foreach lib_crate,$(SERVO_LIB_CRATES),\ -$(eval $(call DEF_LIB_CRATE_TEST_RULES,$(lib_crate)))) - - -# Testing targets - -servo-test: $(DEPS_servo) - @$(call E, check: servo) - $(Q)$(RUSTC) $(TARGET_FLAGS) $(RFLAGS_servo) --test -o $@ $< - -reftest: $(S)src/test/harness/reftest/reftest.rs servo - @$(call E, compile: $@) - $(Q)$(RUSTC) $(TARGET_FLAGS) -L$(B)/src/support/png/rust-png/ -L$(B)/src/support/png/libpng/ -o $@ $< - -contenttest: $(S)src/test/harness/contenttest/contenttest.rs servo - @$(call E, compile: $@) - $(Q)$(RUSTC) $(TARGET_FLAGS) $(RFLAGS_servo) -o $@ $< -L . - - -DEPS_CHECK_TESTABLE = $(filter-out $(NO_TESTS),$(DEPS_CHECK_ALL)) -DEPS_CHECK_TARGETS_ALL = $(addprefix check-,$(DEPS_CHECK_TESTABLE)) -DEPS_CHECK_TARGETS_FAST = $(addprefix check-,$(filter-out $(SLOW_TESTS),$(DEPS_CHECK_TESTABLE))) -DEPS_CHECK_TARGETS_ADDITIONAL = check-servo check-wpt check-content check-ref tidy - -.PHONY: check-test -check-test: - @$(call E, check:) - @$(call E, " $(DEPS_CHECK_TARGETS_ALL)") - -.PHONY: check -check: $(DEPS_CHECK_TARGETS_FAST) $(DEPS_CHECK_TARGETS_ADDITIONAL) - @$(call E, check: all) - -.PHONY: check-all -check-all: $(DEPS_CHECK_TARGETS_ALL) $(DEPS_CHECK_TARGETS_ADDITIONAL) - @$(call E, check: all) - -.PHONY: check-servo -check-servo: $(foreach lib_crate,$(SERVO_LIB_CRATES),check-servo-$(lib_crate)) servo-test - @$(call E, check: servo) - $(Q)./servo-test - -.PHONY: check-ref-cpu -check-ref-cpu: reftest - @$(call E, check: reftests with CPU rendering) - $(Q)./reftest cpu $(S)src/test/ref $(TESTNAME) - -.PHONY: check-ref-gpu -check-ref-gpu: reftest - @$(call E, check: reftests with GPU rendering) - $(Q)./reftest gpu $(S)src/test/ref $(TESTNAME) - -.PHONY: check-ref -check-ref: check-ref-cpu check-ref-gpu - -.PHONY: check-content -check-content: contenttest - @$(call E, check: contenttests) - $(Q)./contenttest --source-dir=$(S)src/test/content $(TESTNAME) - -.PHONY: check-wpt -check-wpt: - @$(call E, check: web-platform-tests) - bash $(S)src/test/wpt/run.sh $(S) $(B) $(WPTARGS) - -.PHONY: tidy -tidy: - @$(call E, check: tidy) - $(Q)python $(S)src/etc/tidy.py $(S)src diff --git a/mk/clean.mk b/mk/clean.mk deleted file mode 100644 index eae11cb720a..00000000000 --- a/mk/clean.mk +++ /dev/null @@ -1,55 +0,0 @@ -define DEF_SUBMODULE_CLEAN_RULES -# clean target -clean-$(1) : - @$$(call E, make clean: $(1)) - $$(Q)rm -f $$(DONE_$(1)) - $$(Q)$$(MAKE) -C $$(B)src/$$(PATH_$(1)) clean - -# add these targets to meta-targets -DEPS_CLEAN_ALL += $(1) -endef - -$(foreach submodule,$(SUBMODULES),\ -$(eval $(call DEF_SUBMODULE_CLEAN_RULES,$(submodule)))) - -DEPS_CLEAN_TARGETS_ALL = $(addprefix clean-,$(DEPS_CLEAN_ALL)) -DEPS_CLEAN_TARGETS_FAST = $(addprefix clean-,$(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))) - -.PHONY: clean $(DEPS_CLEAN_TARGETS_ALL) - -clean: $(DEPS_CLEAN_TARGETS_ALL) clean-servo - @$(call E, "cleaning:") - @$(call E, " $(DEPS_CLEAN_ALL)") - -clean-fast: $(DEPS_CLEAN_TARGETS_FAST) clean-servo - @$(call E, "cleaning:") - @$(call E, " $(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))") - -clean-embedding: - @$(call E, "cleaning embedding") - $(Q)cd $(B)/src/components/embedding/ && rm -rf libembedding*.dylib libembedding*.dSYM libembedding*.so $(DONE_embedding) - -define DEF_CLEAN_SERVO_RULES - -.PHONY: clean-$(1) -clean-$(1): - @$$(call E, "cleaning $(1)") - $$(Q)cd $$(B)/src/components/$(1)/ && rm -rf lib$(1)*.dylib lib$(1)*.rlib lib$(1)*.dSYM lib$(1)*.so $$(DONE_$(1)) - -endef - -$(foreach lib_crate,$(SERVO_LIB_CRATES),$(eval $(call DEF_CLEAN_SERVO_RULES,$(lib_crate)))) - - -clean-wpt: - $(Q)rm -r _virtualenv - $(Q)rm $(S)/src/test/wpt/metadata/MANIFEST.json - -clean-servo: $(foreach lib_crate,$(SERVO_LIB_CRATES),clean-$(lib_crate)) - @$(call E, "cleaning servo") - $(Q)rm -f servo servo-test $(foreach lib_crate,$(SERVO_LIB_CRATES),servo-test-$(lib_crate)) libservo*.so libservo*.a - $(Q)cd $(BINDINGS_SRC) && rm -f *.pkl *.rs - -clean-rust-snapshot-archives: - @$(call E, "cleaning rust snapshot archives") - $(Q)cd $(B)/rust_snapshot/ && rm -rf *.tgz diff --git a/mk/doc.mk b/mk/doc.mk deleted file mode 100644 index f0325b306eb..00000000000 --- a/mk/doc.mk +++ /dev/null @@ -1,69 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - -RUSTDOC_HTML_IN_HEADER = $(S)/src/etc/rustdoc-style.html -RUSTDOC_FLAGS = --extern url=$(B)/src/support/url/rust-url/liburl.rlib --html-in-header $(RUSTDOC_HTML_IN_HEADER) -RUSTDOC_DEPS = $(RUSTDOC_HTML_IN_HEADER) - -# FIXME(#2924) These crates make rustdoc fail for undetermined reasons. -DOC_BLACKLISTED := style - - -define DEF_SERVO_DOC_RULES -.PHONY: doc-$(1) -doc-$(1): doc/$(1)/index.html - -ifeq (,$(filter $(1),$(DOC_BLACKLISTED))) - -doc/$(1)/index.html: $$(DEPS_$(1)) $$(RUSTDOC_DEPS) - @$$(call E, rustdoc: $$@) - $$(Q)$$(RUSTDOC) $$(RUSTDOC_FLAGS) $$(filter-out -Z time-passes, $$(RFLAGS_$(1))) $$< - -else - -.PHONY: doc/$(1)/index.html -doc/$(1)/index.html: - @echo SKIPPED: blacklisted rustdoc: $$@ - -endif -endef - -$(foreach lib_crate,$(SERVO_LIB_CRATES) servo,\ -$(eval $(call DEF_SERVO_DOC_RULES,$(lib_crate)))) - - -define DEF_SUBMODULES_DOC_RULES - -ifeq (,$(filter $(1),$(DOC_BLACKLISTED))) - -.PHONY: doc-$(1) -doc-$(1): $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(RUSTC_DEP_$(1)) - @$$(call E, rustdoc: $(1)) - $$(Q) \ - RUSTDOC_FLAGS="$$(ENV_RLDFLAGS_$(1)) $$(RUSTDOC_FLAGS)" \ - RUSTDOC_TARGET="$$(CFG_BUILD_HOME)/doc" \ - $$(ENV_EXT_DEPS_$(1)) \ - $$(MAKE) -C $$(B)src/$$(PATH_$(1)) doc - -else - -.PHONY: doc-$(1) -doc-$(1): $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(RUSTC_DEP_$(1)) - @echo SKIPPED: blacklisted rustdoc: $$@ - -endif -endef - -# Only Rust submodules -DOC_SUBMODULES = $(foreach submodule,$(SUBMODULES),\ - $(if $(RUSTC_DEP_$(submodule)), $(submodule))) - - -$(foreach submodule,$(DOC_SUBMODULES),\ -$(eval $(call DEF_SUBMODULES_DOC_RULES,$(submodule)))) - - -.PHONY: doc -doc: $(foreach target,$(DOC_SUBMODULES) $(SERVO_LIB_CRATES) servo,doc-$(target)) diff --git a/mk/main.mk b/mk/main.mk deleted file mode 100644 index 3b97a2f7e5a..00000000000 --- a/mk/main.mk +++ /dev/null @@ -1,495 +0,0 @@ -# Recursive wildcard function -# http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html -rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \ - $(filter $(subst *,%,$2),$d)) - -# Target-and-rule "utility variables" -ifdef VERBOSE - Q := - E = -else - Q := @ - E = echo $(1) -endif - -S := $(CFG_SRC_DIR) -B := $(CFG_BUILD_DIR) - -#VPATH := $(S)src - -# Delete the built-in rules. -.SUFFIXES: -%:: %,v -%:: RCS/%,v -%:: RCS/% -%:: s.% -%:: SCCS/s.% - -MKFILE_DEPS := $(CFG_BUILD_HOME)config.stamp $(call rwildcard,$(S)mk/,*) - -CFG_GCCISH_CFLAGS += -DRUST_DEBUG -CFG_RUSTC_FLAGS += -D unused-imports -D unused-variable - -ifdef CFG_DISABLE_OPTIMIZE - $(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE)) - CFG_RUSTC_FLAGS += -else - CFG_RUSTC_FLAGS += -O -endif - -CFG_RUSTC_FLAGS += -g -ifdef CFG_ENABLE_DEBUG - $(info cfg: enabling more debugging in RUSTC (CFG_ENABLE_DEBUG)) - CFG_RUSTC_SELF_FLAGS += -g -endif - -# FIXME: Remove once we’re on a Rust version without the old url crate -# https://github.com/rust-lang/rust/issues/16140 -CFG_RUSTC_FLAGS += --extern url=$(B)/src/support/url/rust-url/liburl.rlib - -# Handle target -TARGET_FLAGS = --target $(CFG_TARGET) -ifeq ($(CFG_OSTYPE),linux-androideabi) - TARGET_FLAGS += -C linker=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++ -C ar=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar -endif - -export CFG_RUSTC -export CFG_RUSTC_FLAGS -export CFG_LOCAL_RUSTC -export CFG_ENABLE_DEBUG -export CFG_ENABLE_DEBUG_SKIA -export RUSTC=$(CFG_RUSTC) -export RUSTDOC=$(CFG_RUST_HOME)/bin/rustdoc -export RUSTFLAGS=$(CFG_RUSTC_FLAGS) -export RANLIB=$(CFG_RANLIB) -export PYTHON=$(CFG_PYTHON2) -export PATH=$(CFG_PATH) -export CFG_ANDROID_SDK_PATH -export CFG_ANDROID_NDK_PATH -export CFG_OSTYPE -export CFG_CPUTYPE -export CFG_BUILD_HOME - -###################################################################### -# Re-configuration -###################################################################### - -ifndef CFG_DISABLE_MANAGE_SUBMODULES -# This is a pretty expensive operation but I don't see any way to avoid it -NEED_GIT_RECONFIG=$(shell cd "$(S)" && "$(CFG_GIT)" submodule status | grep -c '^\(+\|-\)') -else -NEED_GIT_RECONFIG=0 -endif - -ifeq ($(NEED_GIT_RECONFIG),0) -else -# If the submodules have changed then always execute config.mk -.PHONY: $(CFG_BUILD_HOME)config.stamp -endif - -$(CFG_BUILD_HOME)Makefile $(CFG_BUILD_HOME)config.mk: $(CFG_BUILD_HOME)config.stamp - -$(CFG_BUILD_HOME)config.stamp : $(S)configure $(S)Makefile.in - @$(call E, cfg: reconfiguring) - $(Q)$(S)configure $(CFG_CONFIGURE_ARGS) - - -SNAPSHOT_HASH_FILE=$(S)/rust-snapshot-hash -SNAPSHOT_VERSION=$(shell cat $(SNAPSHOT_HASH_FILE) | rev | cut -d/ -f1 | rev) -SNAPSHOT_HASH=$(shell cat $(SNAPSHOT_HASH_FILE) | cut -d/ -f1) -SNAPSHOT_URL="https://servo-rust.s3.amazonaws.com/$(shell cat $(SNAPSHOT_HASH_FILE))-$(DEFAULT_TARGET).tar.gz" -SNAPSHOT_TARBALL=$(B)/rust_snapshot/snapshot-$(SNAPSHOT_HASH).tgz -SNAPSHOT_HASH_STAMP=$(B)/rust_snapshot/hash-stamp - -snapshot-url: - @echo $(SNAPSHOT_URL) - -$(SNAPSHOT_TARBALL): - $(Q)curl -o $@.tmp $(SNAPSHOT_URL) - $(Q)mv $@.tmp $@ - -clean-rust: - $(Q)rm -rf $(B)/rust_snapshot/$(SNAPSHOT_VERSION)-$(DEFAULT_TARGET) - - -ifeq ($(CFG_SNAPSHOT_RUSTC),1) - -ifeq (identical,$(and $(wildcard $(CFG_RUSTC)), $(wildcard $(SNAPSHOT_HASH_STAMP)), \ - $(if $(shell diff $(SNAPSHOT_HASH_FILE) $(SNAPSHOT_HASH_STAMP)),,identical))) - -$(CFG_RUSTC): - @echo Rust snapshot $(SNAPSHOT_HASH) already up to date. - -else - -$(CFG_RUSTC): $(SNAPSHOT_TARBALL) clean-rust - $(Q)tar -zxf $< -C $(B)/rust_snapshot/ - $(Q)cp -f $(SNAPSHOT_HASH_FILE) $(SNAPSHOT_HASH_STAMP) - -endif - -else # not a snapshot - -$(CFG_RUSTC): - -endif - -rust: $(CFG_RUSTC) - - -# Set up LD_LIBRARY_PATH os the compiler can find libraries -ifeq ($(CFG_OSTYPE),apple-darwin) -export DYLD_LIBRARY_PATH=$(CFG_RUST_HOME)/lib -else -export LD_LIBRARY_PATH=$(CFG_RUST_HOME)/lib -endif - -# Strip off submodule paths to determine "raw" submodule names. -SUBMODULES=$(shell echo $(CFG_SUBMODULES) | perl -p -e 's![A-Za-z0-9_-]+/!!g') - -# Define e.g. PATH_skia = support/skia/skia -$(foreach submodule,$(CFG_SUBMODULES),\ -$(eval PATH_$(shell echo $(submodule) | perl -p -e 's![A-Za-z0-9_-]+/!!g') = $(submodule))) - -define DEF_SUBMODULE_VARS - -#defaults -DEPS_$(1) = -CFLAGS_$(1) = -O2 -CXXFLAGS_$(1) = - -#if global cflags set, inherit that -ifdef CFLAGS - CFLAGS_$(1) = $$(CFLAGS) -endif - -ifdef CXXFLAGS - CXXFLAGS_$(1) = $$(CXXFLAGS) -endif - -# any "done" dummy files must be named libSOMETHING.dummy. -# -# We can't auto-compute this, because some modules have lib* prefix in -# their name already, while others don't. -DONE_$(1) = $$(B)src/$$(PATH_$(1))/lib*.dummy -DEPS_SUBMODULES += $$(PATH_$(1)) -DEPS_SUBMODULES += $$(PATH_$(1))/.libs -DEPS_SUBMODULES += $$(PATH_$(1))/src/.libs -endef - -# these will get populated. -DEPS_SUBMODULES = - -$(foreach submodule,$(SUBMODULES),\ -$(eval $(call DEF_SUBMODULE_VARS,$(submodule)))) - -# Handle rust submodule vars specially -DONE_rust = $(CFG_RUSTC) - -# include submodule dependencies configuration -include $(S)mk/sub.mk - -# Define how to compute approximate submodule dependencies. -# TODO: this may be a bit brutish, but is there a better way? -define DEF_SUBMODULE_DEPS -ROUGH_DEPS_$(1)=$$(call rwildcard,$$(S)src/$$(PATH_$(1)),*h *c *cpp *rs *rc) -DONE_DEPS_$(1)=$$(foreach dep,$$(DEPS_$(1)),$$(DONE_$$(dep))) -# the main target for a submodule -endef - -# Define how to make submodule targets -define DEF_SUBMODULE_RULES - -ENV_RLDFLAGS_$(1) += $$(foreach dep,$$(DEPS_$(1)),-L $$(B)src/$$(PATH_$$(dep)) -L $$(B)src/$$(PATH_$$(dep))/.libs -L $$(B)src/$$(PATH_$$(dep))/src/.libs) - -# variables that depend on dependency definitions from sub.mk! -ENV_CFLAGS_$(1) = CFLAGS="$$(CFLAGS_$(1))" -ENV_CXXFLAGS_$(1) = CXXFLAGS="$$(CXXFLAGS_$(1))" -ENV_EXT_DEPS_$(1) = EXT_DEPS="$$(DONE_DEPS_$(1))" - -# Some submodules should not be cross compiled -ifeq "$$(filter $(1),$$(NO_CROSS_BUILDS))" "$(1)" -ENV_RFLAGS_$(1) = RUSTFLAGS="$$(strip $$(CFG_RUSTC_FLAGS) $$(ENV_RLDFLAGS_$(1)))" -else -ENV_RFLAGS_$(1) = RUSTFLAGS="$$(strip $$(CFG_RUSTC_FLAGS) $$(ENV_RLDFLAGS_$(1)) $$(TARGET_FLAGS))" -endif - -# Native builds do not depend on the rust compiler, so we can build them in parallel with rustc -RUSTC_DEP_$(1)= -ifneq "$$(filter $(1),$$(NATIVE_BUILDS))" "$(1)" -RUSTC_DEP_$(1)=$$(CFG_RUSTC) -endif - -$(eval $(call DEF_SUBMODULE_DEPS,$(1))) - -ifeq ($(CFG_CPUTYPE),i686) -CROSS_COMPILER_CC = CC='$(CFG_CC) -m32' -CROSS_COMPILER_CXX = CXX='$(CFG_CXX) -m32' -else -CROSS_COMPILER_CC = CC=$(CFG_CC) -CROSS_COMPILER_CXX = CXX=$(CFG_CXX) -endif -CROSS_COMPILER_LD = LD=$(CFG_LD) -CROSS_COMPILER_AR = AR=$(CFG_AR) - -$$(DONE_$(1)) : $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(RUSTC_DEP_$(1)) -# @$$(call E, make: $(1)) -# @$$(call E, $(1) deps= $$(DEPS_$(1))) -# @$$(call E, $(1) done_deps= $$(DONE_DEPS_$(1))) -# @$$(call E, $(1) cflags= $$(ENV_CFLAGS_$(1))) -# @$$(call E, $(1) cxxflags= $$(ENV_CXXFLAGS_$(1))) -# @$$(call E, $(1) rflags= $$(ENV_RFLAGS_$(1))) - $$(Q) \ - $$(ENV_CFLAGS_$(1)) \ - $$(ENV_CXXFLAGS_$(1)) \ - $$(ENV_RFLAGS_$(1)) \ - $$(ENV_EXT_DEPS_$(1)) \ - $$(CROSS_COMPILER_CC) \ - $$(CROSS_COMPILER_CXX) \ - $$(CROSS_COMPILER_LD) \ - $$(CROSS_COMPILER_AR) \ - $$(MAKE) -C $$(B)src/$$(PATH_$(1)) && touch $$(DONE_$(1)) - -# main submodule target -$(1) : $$(DONE_$(1)) -.PHONY : $(1) -endef - -$(foreach submodule,$(SUBMODULES),\ -$(eval $(call DEF_SUBMODULE_RULES,$(submodule)))) - -DONE_SUBMODULES = $(foreach submodule,$(SUBMODULES),$(DONE_$(submodule))) - -RFLAGS_macros = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -SRC_macros = $(call rwildcard,$(S)src/components/macros/,*.rs) -CRATE_macros = $(S)src/components/macros/macros.rs -DONE_macros = $(B)src/components/macros/libmacros.dummy - -DEPS_macros = $(CRATE_macros) $(SRC_macros) $(DONE_SUBMODULES) - -RFLAGS_util = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -SRC_util = $(call rwildcard,$(S)src/components/util/,*.rs) -CRATE_util = $(S)src/components/util/util.rs -DONE_util = $(B)src/components/util/libutil.dummy - -DEPS_util = $(CRATE_util) $(SRC_util) $(DONE_SUBMODULES) - -RFLAGS_net = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -SRC_net = $(call rwildcard,$(S)src/components/net/,*.rs) -CRATE_net = $(S)src/components/net/net.rs -DONE_net = $(B)src/components/net/libnet.dummy - -DEPS_net = $(CRATE_net) $(SRC_net) $(DONE_SUBMODULES) $(DONE_util) - -RFLAGS_msg = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -SRC_msg = $(call rwildcard,$(S)src/components/msg/,*.rs) -CRATE_msg = $(S)src/components/msg/msg.rs -DONE_msg = $(B)src/components/msg/libmsg.dummy - -DEPS_msg = $(CRATE_msg) $(SRC_msg) $(DONE_SUBMODULES) $(DONE_util) - -RFLAGS_canvas = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -SRC_canvas = $(call rwildcard,$(S)src/components/canvas/,*.rs) -CRATE_canvas = $(S)src/components/canvas/canvas.rs -DONE_canvas = $(B)src/components/canvas/libcanvas.dummy - -DEPS_canvas = $(CRATE_canvas) $(SRC_canvas) $(DONE_SUBMODULES) - -RFLAGS_gfx = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros -SRC_gfx = $(call rwildcard,$(S)src/components/gfx/,*.rs) -CRATE_gfx = $(S)src/components/gfx/gfx.rs -DONE_gfx = $(B)src/components/gfx/libgfx.dummy - -DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_macros) - -RFLAGS_script_traits = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/msg -L $(B)src/components/net -L $(B)src/components/util - -SRC_script_traits = $(call rwildcard,$(S)src/components/script_traits/,*.rs) -CRATE_script_traits = $(S)src/components/script_traits/script_traits.rs -DONE_script_traits = $(B)src/components/script_traits/libscript_traits.dummy - -DEPS_script_traits = $(CRATE_script_traits) $(SRC_script_traits) $(DONE_msg) $(DONE_net) - -RFLAGS_script = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros -L$(B)src/components/canvas -L$(B)src/components/script_traits - -ifdef TRAVIS -# libscript has a habit of taking over 10 minutes while running on Travis, -# and Travis kills the build if we don't output anything for 10 minutes. -# Note: mk/doc.mk filters this out when calling rustdoc. -RFLAGS_script += -Z time-passes -endif - -BINDINGS_SRC = $(S)src/components/script/dom/bindings/codegen -WEBIDLS_SRC = $(S)src/components/script/dom/webidls - -WEBIDLS_script = $(call rwildcard, $(WEBIDLS_SRC), *.webidl) -BINDINGS_script = $(patsubst %.webidl, %Binding.rs, $(WEBIDLS_script)) -AUTOGEN_SRC_script = $(foreach var, $(BINDINGS_script), $(subst $(WEBIDLS_SRC), $(BINDINGS_SRC)/Bindings, $(var))) - -SRC_script = $(call rwildcard,$(S)src/components/script/,*.rs) $(AUTOGEN_SRC_script) -CRATE_script = $(S)src/components/script/script.rs -DONE_script = $(B)src/components/script/libscript.dummy - -DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_macros) $(DONE_canvas) $(DONE_script_traits) - -RFLAGS_style = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L$(B)src/components/macros -MAKO_ZIP = $(S)src/components/style/Mako-0.9.1.zip -MAKO_style = $(S)src/components/style/properties/mod.rs -MAKO_SRC_style = $(MAKO_style).mako -SRC_style = $(call rwildcard,$(S)src/components/style/,*.rs) $(call rwildcard,$(S)src/compontents/style/properties/*.rs) $(MAKO_style) $(S)src/components/style/user-agent.css -CRATE_style = $(S)src/components/style/style.rs -DONE_style = $(B)src/components/style/libstyle.dummy - -DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util) $(DONE_macros) - -RFLAGS_layout_traits = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script_traits -L $(B)src/components/style -L $(B)src/components/msg - -SRC_layout_traits = $(call rwildcard,$(S)src/components/layout_traits/,*.rs) -CRATE_layout_traits = $(S)src/components/layout_traits/layout_traits.rs -DONE_layout_traits = $(B)src/components/layout_traits/liblayout_traits.dummy - -DEPS_layout_traits = $(CRATE_layout_traits) $(SRC_layout_traits) $(DONE_script_traits) $(DONE_msg) $(DONE_net) $(DONE_gfx) $(DONE_util) - -RFLAGS_layout = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/canvas -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros -L$(B)src/components/layout_traits -L $(B)src/components/script_traits - -SRC_layout = $(call rwildcard,$(S)src/components/layout/,*.rs) -CRATE_layout = $(S)src/components/layout/layout.rs -DONE_layout = $(B)src/components/layout/liblayout.dummy - -DEPS_layout = $(CRATE_layout) $(SRC_layout) $(DONE_script) $(DONE_style) $(DONE_msg) $(DONE_macros) $(DONE_gfx) $(DONE_util) $(DONE_layout_traits) - -RFLAGS_compositing = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/layout_traits -L $(B)src/components/script_traits -L $(B)src/components/style -L $(B)src/components/msg - -SRC_compositing = $(call rwildcard,$(S)src/components/compositing/,*.rs) -CRATE_compositing = $(S)src/components/compositing/compositing.rs -DONE_compositing = $(B)src/components/compositing/libcompositing.dummy - -DEPS_compositing = $(CRATE_compositing) $(SRC_compositing) $(DONE_util) $(DONE_msg) $(DONE_gfx) $(DONE_layout_traits) $(DONE_script_traits) $(DONE_style) - -RFLAGS_servo = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/canvas -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout_traits -L $(B)src/components/script_traits -L $(B)src/components/layout -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros - -SRC_servo = $(call rwildcard,$(S)src/components/main/,*.rs) -CRATE_servo = $(S)src/components/main/servo.rs - -SERVO_LIB_CRATES = macros util net msg canvas gfx script script_traits style layout layout_traits compositing - -DEPS_servo = $(CRATE_servo) $(SRC_servo) $(DONE_SUBMODULES) $(foreach lib_crate,$(SERVO_LIB_CRATES),$(DONE_$(lib_crate))) - -# rules that depend on having correct meta-target vars (DEPS_CLEAN, DEPS_servo, etc) -# and SERVO_LIB_CRATES -include $(S)mk/check.mk -include $(S)mk/clean.mk - -.DEFAULT_GOAL := all -.PHONY: all - -# Servo helper libraries - -define DEF_LIB_CRATE_RULES -$$(DONE_$(1)): $$(DEPS_$(1)) - @$$(call E, compile: $$@) - $$(Q)$$(RUSTC) $(strip $(TARGET_FLAGS) $(CFG_RUSTC_FLAGS)) $$(RFLAGS_$(1)) --out-dir $$(B)src/components/$(1) $$< && touch $$@ -endef - -$(foreach lib_crate,$(SERVO_LIB_CRATES),\ -$(eval $(call DEF_LIB_CRATE_RULES,$(lib_crate)))) - -CACHE_DIR = $(BINDINGS_SRC)/_cache - -bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/, BindingGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py ParserResults.pkl Bindings/.done) - -$(AUTOGEN_SRC_script): $(BINDINGS_SRC)/Bindings/%Binding.rs: $(bindinggen_dependencies) \ - $(addprefix $(WEBIDLS_SRC)/, %.webidl) - @$(call E, "Maybe generating $(shell basename $@)...") - $(Q) $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \ - -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ - -D$(BINDINGS_SRC) \ - $(BINDINGS_SRC)/BindingGen.py \ - $(BINDINGS_SRC)/Bindings.conf Bindings/$*Binding $(addprefix $(WEBIDLS_SRC)/, $*.webidl) - $(Q)touch $@ - -globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done $(BINDINGS_SRC)/Bindings/.done - -$(MAKO_style): $(MAKO_SRC_style) -# Use a temporary file to avoid writing an empty (but more recent) file on failure. - PYTHONPATH=$(MAKO_ZIP) $(CFG_PYTHON2) -c "from mako.template import Template; print(Template(filename='$<').render())" > $@.tmp - mv $@.tmp $@ - -$(BINDINGS_SRC)/Bindings/.done: - mkdir -p $(BINDINGS_SRC)/Bindings - @touch $@ - -$(CACHE_DIR)/.done: - mkdir -p $(CACHE_DIR) - @touch $@ - -$(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \ - $(WEBIDLS_script) - $(Q) $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \ - -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ - -D$(BINDINGS_SRC) \ - $(BINDINGS_SRC)/GlobalGen.py $(BINDINGS_SRC)/Bindings.conf . \ - --cachedir=$(CACHE_DIR) \ - $(WEBIDLS_script) - -# Servo binaries - -ifneq ($(CFG_OSTYPE),linux-androideabi) -all: servo servo-embedding -servo: $(DEPS_servo) - @$(call E, compile: $@) - $(Q)$(RUSTC) $(strip $(TARGET_FLAGS) $(CFG_RUSTC_FLAGS)) $(RFLAGS_servo) -C rpath $< --crate-type bin,dylib,rlib - -RFLAGS_embedding = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/canvas -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout -L $(B)src/components/layout_traits -L $(B)src/components/script_traits -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L $(B).. -L $(B)src/components/main -L $(B)src/components/macros -A non_camel_case_types -A unused_variable - -ifeq ($(CFG_OSTYPE),apple-darwin) -RFLAGS_embedding += -C link-args="-Wl,-U,_tc_new -Wl,-U,_tc_newarray -Wl,-U,_tc_delete -Wl,-U,_tc_deletearray" -endif -SRC_embedding = $(call rwildcard,$(S)src/components/embedding/,*.rs) -CRATE_embedding = $(S)src/components/embedding/embedding.rs - -servo-embedding: servo $(SRC_embedding) $(CRATE_embedding) - @$(call E, compile: $@) - $(Q)$(RUSTC) $(strip $(TARGET_FLAGS) $(CFG_RUSTC_FLAGS)) $(RFLAGS_embedding) $(CRATE_embedding) -C rpath --crate-type dylib,rlib - $(Q)touch servo-embedding -else -all: servo -servo: $(DEPS_servo) - @$(call E, compile: $@) - $(Q)$(RUSTC) $(strip $(TARGET_FLAGS) $(CFG_RUSTC_FLAGS)) $(RFLAGS_servo) $< -o libservo.so --crate-type dylib - $(Q)touch servo -endif - -# Darwin app packaging - -ifeq ($(CFG_OSTYPE),apple-darwin) - -package: servo - mkdir -p Servo.app/Contents/MacOS/src/platform/macos/rust-cocoa - mkdir -p Servo.app/Contents/MacOS/src/platform/macos/rust-task_info - mkdir -p Servo.app/Contents/MacOS/src/support/azure/rust-azure - cp $(S)Info.plist Servo.app/Contents/ - cp servo Servo.app/Contents/MacOS/ - cp $(B)src/platform/macos/rust-cocoa/lib*.dylib Servo.app/Contents/MacOS/src/platform/macos/rust-cocoa/ - cp $(B)src/platform/macos/rust-task_info/lib*.dylib Servo.app/Contents/MacOS/src/platform/macos/rust-task_info/ - cp $(B)src/support/azure/rust-azure/lib*.dylib Servo.app/Contents/MacOS/src/support/azure/rust-azure/ - -else ifeq ($(CFG_OSTYPE),linux-androideabi) -package: servo - mkdir -p sofile - find . ! \( \( -type d -path './sofile' -o -path '*/host' \) -prune \) -name '*.so' -type f | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ - find $(CFG_RUST_HOME)/lib/rustlib/$(CFG_TARGET)/lib/ -name '*.so' -type f -size +1c | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ - cd $(S)src/platform/android/servo-android-glue && make with-libs - cd $(CFG_BUILD_HOME) - cp $(S)src/platform/android/servo-android-glue/bin/ServoAndroid-debug.apk $(CFG_BUILD_HOME) - -else - -.PHONY: package -package: - -endif - -bindings: $(AUTOGEN_SRC_script) - -include $(S)mk/doc.mk diff --git a/mk/sub.mk b/mk/sub.mk deleted file mode 100644 index 16f29add7c9..00000000000 --- a/mk/sub.mk +++ /dev/null @@ -1,259 +0,0 @@ -NULL = - -# Tests for these submodules will not be run by the default `make check` target. -SLOW_TESTS += \ - mozjs \ - $(NULL) - -# Tests for these submodules do not exist. -NO_TESTS += \ - $(NULL) - -# These submodules will not be cleaned by the `make clean-fast` target. -SLOW_BUILDS += \ - libparserutils \ - mozjs \ - sharegl \ - skia \ - $(NULL) - -# Builds that do not require rustc -NATIVE_BUILDS += \ - libhubbub \ - libparserutils \ - mozjs \ - skia \ - glfw \ - fontconfig \ - libpng \ - $(NULL) - -NO_CROSS_BUILDS += \ - $(NULL) - -# NOTE: the make magic can only compute transitive build dependencies, -# not transitive link flags. So, if A -> B -> C, must add A as a dep -# of C so the correct -L/path/to/A flag is generated for building C. - -# NB. This should not be a problem once a real package system exists. - -DEPS_hubbub += \ - libparserutils \ - $(NULL) - -DEPS_rust-azure += \ - rust-opengles \ - rust-layers \ - rust-geom \ - glfw-rs \ - glfw \ - skia \ - rust \ - $(NULL) - -DEPS_rust-cssparser += \ - rust-encoding \ - rust \ - $(NULL) - -DEPS_rust-encoding += \ - rust \ - $(NULL) - -DEPS_glfw-rs += \ - glfw \ - rust \ - $(NULL) - -DEPS_rust-layers += \ - rust-geom \ - rust-opengles \ - rust \ - $(NULL) - -DEPS_sharegl += \ - rust-geom \ - rust-opengles \ - rust \ - $(NULL) - -DEPS_rust-hubbub += \ - libhubbub \ - libparserutils \ - rust \ - $(NULL) - -DEPS_rust-mozjs += \ - mozjs \ - rust \ - $(NULL) - -CFLAGS_rust-mozjs += \ - "-I../mozjs/dist/include" \ - $(NULL) - -DEPS_rust-png += \ - libpng \ - $(NULL) - -DEPS_rust-url += \ - rust-encoding \ - $(NULL) - -DEPS_string-cache += \ - rust-phf \ - rust \ - $(NULL) - -# Platform-specific dependencies -ifeq ($(CFG_OSTYPE),apple-darwin) -DEPS_rust-azure += \ - rust-core-graphics \ - rust-core-text \ - rust-core-foundation \ - rust-cocoa \ - rust-io-surface \ - rust \ - $(NULL) - -DEPS_rust-io-surface += \ - rust-core-foundation \ - rust-geom \ - rust-opengles \ - rust \ - $(NULL) - -DEPS_rust-alert += \ - rust-core-foundation \ - rust-cocoa \ - rust \ - $(NULL) - -DEPS_sharegl += \ - rust-core-foundation \ - rust-io-surface \ - rust \ - $(NULL) - -DEPS_rust-core-graphics += \ - rust-core-foundation \ - rust \ - $(NULL) - -DEPS_rust-core-text += \ - rust-core-foundation \ - rust-core-graphics \ - rust \ - $(NULL) - -DEPS_rust-layers += \ - rust-core-foundation \ - rust-core-graphics \ - rust-core-text \ - rust-io-surface \ - rust-cocoa \ - rust \ - $(NULL) - -DEPS_rust-http += \ - rust-encoding \ - rust-url \ - rust-openssl \ - $(NULL) - -endif - -ifeq ($(CFG_OSTYPE),unknown-linux-gnu) - -DEPS_rust-azure += \ - rust-freetype \ - rust-fontconfig \ - fontconfig \ - rust-xlib \ - rust \ - $(NULL) - -# See note at top of file -DEPS_rust-layers += \ - rust-freetype \ - rust-fontconfig \ - rust-xlib \ - rust \ - $(NULL) - -DEPS_rust-fontconfig += \ - fontconfig \ - rust \ - $(NULL) - -DEPS_rust-http += \ - rust-encoding \ - rust-url \ - rust-openssl \ - $(NULL) - -NATIVE_BUILD += \ - fontconfig \ - $(NULL) -endif - -ifeq ($(CFG_OSTYPE),linux-androideabi) -DEPS_rust-azure += \ - rust-egl \ - rust-freetype \ - rust-fontconfig \ - fontconfig \ - libfreetype2 \ - libexpat \ - rust \ - $(NULL) - -# See note at top of file -DEPS_rust-layers += \ - rust-egl \ - rust-freetype \ - rust-fontconfig \ - rust-xlib \ - rust \ - $(NULL) - -DEPS_rust-fontconfig += \ - fontconfig \ - rust-freetype \ - rust \ - $(NULL) - -DEPS_rust-freetype += \ - libfreetype2 \ - rust \ - $(NULL) - -DEPS_fontconfig += \ - libexpat \ - libfreetype2 \ - $(NULL) - -CFLAGS_fontconfig += \ - "-I$(S)src/platform/android/libexpat/expat/lib" \ - "-I$(S)src/platform/android/libfreetype2/include" \ - $(NULL) - -DEPS_skia += \ - libfreetype2 \ - $(NULL) - -CXXFLAGS_skia += \ - -I$(S)src/platform/android/libfreetype2/include \ - $(NULL) - -DEPS_rust-http += \ - rust-encoding \ - rust-url \ - $(NULL) - -NATIVE_BUILD += \ - libfreetype2 \ - libexpat \ - fontconfig \ - $(NULL) -endif diff --git a/ports/android/AndroidManifest.xml b/ports/android/AndroidManifest.xml new file mode 100644 index 00000000000..8d6c8714199 --- /dev/null +++ b/ports/android/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ports/android/Makefile b/ports/android/Makefile new file mode 100644 index 00000000000..d4fe5eb580f --- /dev/null +++ b/ports/android/Makefile @@ -0,0 +1,20 @@ +.PHONY: all +all: + NDK_DEBUG=1 $(ANDROID_NDK)/ndk-build -B + find ../../target ! \( -type d -name dist -prune \) -name libmozjs.so | \ + xargs -I {} cp -f {} libs/armeabi + find ../../target ! \( -type d -name dist -prune \) -name 'libservo-*.so' | \ + xargs -I {} cp -f {} libs/armeabi/libservo.so + find ../../rust/lib/rustlib/arm-linux-androideabi/lib \ + -name '*.so' -type f -size +1c | \ + xargs -I {} cp -f {} libs/armeabi + cp -a extlibs/* libs/armeabi + $(ANDROID_SDK)/tools/android update project \ + --name ServoAndroid \ + --target "android-18" \ + --path . + ant debug + +.PHONY: install +install: + $(ANDROID_SDK)/platform-tools/adb install -r bin/ServoAndroid-debug.apk diff --git a/ports/android/build.xml b/ports/android/build.xml new file mode 100644 index 00000000000..b9cac14efdd --- /dev/null +++ b/ports/android/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ports/android/include/GL/freeglut.h b/ports/android/include/GL/freeglut.h new file mode 100644 index 00000000000..0e6f8c6ad86 --- /dev/null +++ b/ports/android/include/GL/freeglut.h @@ -0,0 +1,22 @@ +#ifndef __FREEGLUT_H__ +#define __FREEGLUT_H__ + +/* + * freeglut.h + * + * The freeglut library include file + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#include "freeglut_std.h" +#include "freeglut_ext.h" + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_H__ */ diff --git a/ports/android/include/GL/freeglut_ext.h b/ports/android/include/GL/freeglut_ext.h new file mode 100644 index 00000000000..db9c7dbfe58 --- /dev/null +++ b/ports/android/include/GL/freeglut_ext.h @@ -0,0 +1,252 @@ +#ifndef __FREEGLUT_EXT_H__ +#define __FREEGLUT_EXT_H__ + +/* + * freeglut_ext.h + * + * The non-GLUT-compatible extensions to the freeglut library include file + * + * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. + * Written by Pawel W. Olszta, + * Creation date: Thu Dec 2 1999 + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Additional GLUT Key definitions for the Special key function + */ +#define GLUT_KEY_NUM_LOCK 0x006D +#define GLUT_KEY_BEGIN 0x006E +#define GLUT_KEY_DELETE 0x006F +#define GLUT_KEY_SHIFT_L 0x0070 +#define GLUT_KEY_SHIFT_R 0x0071 +#define GLUT_KEY_CTRL_L 0x0072 +#define GLUT_KEY_CTRL_R 0x0073 +#define GLUT_KEY_ALT_L 0x0074 +#define GLUT_KEY_ALT_R 0x0075 + +/* + * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window + */ +#define GLUT_ACTION_EXIT 0 +#define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1 +#define GLUT_ACTION_CONTINUE_EXECUTION 2 + +/* + * Create a new rendering context when the user opens a new window? + */ +#define GLUT_CREATE_NEW_CONTEXT 0 +#define GLUT_USE_CURRENT_CONTEXT 1 + +/* + * Direct/Indirect rendering context options (has meaning only in Unix/X11) + */ +#define GLUT_FORCE_INDIRECT_CONTEXT 0 +#define GLUT_ALLOW_DIRECT_CONTEXT 1 +#define GLUT_TRY_DIRECT_CONTEXT 2 +#define GLUT_FORCE_DIRECT_CONTEXT 3 + +/* + * GLUT API Extension macro definitions -- the glutGet parameters + */ +#define GLUT_INIT_STATE 0x007C + +#define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9 + +#define GLUT_WINDOW_BORDER_WIDTH 0x01FA +#define GLUT_WINDOW_BORDER_HEIGHT 0x01FB +#define GLUT_WINDOW_HEADER_HEIGHT 0x01FB /* Docs say it should always have been GLUT_WINDOW_BORDER_HEIGHT, keep this for backward compatibility */ + +#define GLUT_VERSION 0x01FC + +#define GLUT_RENDERING_CONTEXT 0x01FD +#define GLUT_DIRECT_RENDERING 0x01FE + +#define GLUT_FULL_SCREEN 0x01FF + +#define GLUT_SKIP_STALE_MOTION_EVENTS 0x0204 + +#define GLUT_GEOMETRY_VISUALIZE_NORMALS 0x0205 + +/* + * New tokens for glutInitDisplayMode. + * Only one GLUT_AUXn bit may be used at a time. + * Value 0x0400 is defined in OpenGLUT. + */ +#define GLUT_AUX 0x1000 + +#define GLUT_AUX1 0x1000 +#define GLUT_AUX2 0x2000 +#define GLUT_AUX3 0x4000 +#define GLUT_AUX4 0x8000 + +/* + * Context-related flags, see freeglut_state.c + * Set the requested OpenGL version + */ +#define GLUT_INIT_MAJOR_VERSION 0x0200 +#define GLUT_INIT_MINOR_VERSION 0x0201 +#define GLUT_INIT_FLAGS 0x0202 +#define GLUT_INIT_PROFILE 0x0203 + +/* + * Flags for glutInitContextFlags, see freeglut_init.c + */ +#define GLUT_DEBUG 0x0001 +#define GLUT_FORWARD_COMPATIBLE 0x0002 + + +/* + * Flags for glutInitContextProfile, see freeglut_init.c + */ +#define GLUT_CORE_PROFILE 0x0001 +#define GLUT_COMPATIBILITY_PROFILE 0x0002 + +/* + * Process loop function, see freeglut_main.c + */ +FGAPI void FGAPIENTRY glutMainLoopEvent( void ); +FGAPI void FGAPIENTRY glutLeaveMainLoop( void ); +FGAPI void FGAPIENTRY glutExit ( void ); + +/* + * Window management functions, see freeglut_window.c + */ +FGAPI void FGAPIENTRY glutFullScreenToggle( void ); +FGAPI void FGAPIENTRY glutLeaveFullScreen( void ); + +/* + * Window-specific callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) ); +FGAPI void FGAPIENTRY glutPositionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) ); +/* And also a destruction callback for menus */ +FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) ); + +/* + * State setting and retrieval functions, see freeglut_state.c + */ +FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value ); +FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size); +/* A.Donev: User-data manipulation */ +FGAPI void* FGAPIENTRY glutGetWindowData( void ); +FGAPI void FGAPIENTRY glutSetWindowData(void* data); +FGAPI void* FGAPIENTRY glutGetMenuData( void ); +FGAPI void FGAPIENTRY glutSetMenuData(void* data); + +/* + * Font stuff, see freeglut_font.c + */ +FGAPI int FGAPIENTRY glutBitmapHeight( void* font ); +FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font ); +FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string ); +FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string ); + +/* + * Geometry functions, see freeglut_geometry.c + */ +FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void ); +FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void ); +FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, double offset[3], double scale ); +FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, double offset[3], double scale ); +FGAPI void FGAPIENTRY glutWireCylinder( double radius, double height, GLint slices, GLint stacks); +FGAPI void FGAPIENTRY glutSolidCylinder( double radius, double height, GLint slices, GLint stacks); + +/* + * Extension functions, see freeglut_ext.c + */ +typedef void (*GLUTproc)(); +FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName ); + +/* + * Multi-touch/multi-pointer extensions + */ + +#define GLUT_HAS_MULTI 1 + +/* TODO: add device_id paramater, + cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */ +FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) ); +FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutMultiPassiveFunc( void (* callback)( int, int, int ) ); + +/* + * Joystick functions, see freeglut_joystick.c + */ +/* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */ +/* If you have a serious need for these functions in your application, please either + * contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net, + * switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's + * "js" library. + */ +int glutJoystickGetNumAxes( int ident ); +int glutJoystickGetNumButtons( int ident ); +int glutJoystickNotWorking( int ident ); +float glutJoystickGetDeadBand( int ident, int axis ); +void glutJoystickSetDeadBand( int ident, int axis, float db ); +float glutJoystickGetSaturation( int ident, int axis ); +void glutJoystickSetSaturation( int ident, int axis, float st ); +void glutJoystickSetMinRange( int ident, float *axes ); +void glutJoystickSetMaxRange( int ident, float *axes ); +void glutJoystickSetCenter( int ident, float *axes ); +void glutJoystickGetMinRange( int ident, float *axes ); +void glutJoystickGetMaxRange( int ident, float *axes ); +void glutJoystickGetCenter( int ident, float *axes ); + +/* + * Initialization functions, see freeglut_init.c + */ +/* to get the typedef for va_list */ +#include +FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion ); +FGAPI void FGAPIENTRY glutInitContextFlags( int flags ); +FGAPI void FGAPIENTRY glutInitContextProfile( int profile ); +FGAPI void FGAPIENTRY glutInitErrorFunc( void (* callback)( const char *fmt, va_list ap ) ); +FGAPI void FGAPIENTRY glutInitWarningFunc( void (* callback)( const char *fmt, va_list ap ) ); + +/* OpenGL >= 2.0 support */ +FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib); +FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib); + +/* Mobile platforms lifecycle */ +FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)()); +FGAPI void FGAPIENTRY glutPauseFunc(void (* callback)()); +FGAPI void FGAPIENTRY glutResumeFunc(void (* callback)()); + +/* + * GLUT API macro definitions -- the display mode definitions + */ +#define GLUT_CAPTIONLESS 0x0400 +#define GLUT_BORDERLESS 0x0800 +#define GLUT_SRGB 0x1000 + +#ifdef __cplusplus + } +#endif + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_EXT_H__ */ diff --git a/ports/android/include/GL/freeglut_std.h b/ports/android/include/GL/freeglut_std.h new file mode 100644 index 00000000000..8cac2dc76a1 --- /dev/null +++ b/ports/android/include/GL/freeglut_std.h @@ -0,0 +1,656 @@ +#ifndef __FREEGLUT_STD_H__ +#define __FREEGLUT_STD_H__ + +/* + * freeglut_std.h + * + * The GLUT-compatible part of the freeglut library include file + * + * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. + * Written by Pawel W. Olszta, + * Creation date: Thu Dec 2 1999 + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Under windows, we have to differentiate between static and dynamic libraries + */ +#ifdef _WIN32 +/* #pragma may not be supported by some compilers. + * Discussion by FreeGLUT developers suggests that + * Visual C++ specific code involving pragmas may + * need to move to a separate header. 24th Dec 2003 + */ + +/* Define FREEGLUT_LIB_PRAGMAS to 1 to include library + * pragmas or to 0 to exclude library pragmas. + * The default behavior depends on the compiler/platform. + */ +# ifndef FREEGLUT_LIB_PRAGMAS +# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE) +# define FREEGLUT_LIB_PRAGMAS 1 +# else +# define FREEGLUT_LIB_PRAGMAS 0 +# endif +# endif + +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# ifndef NOMINMAX +# define NOMINMAX +# endif +# include + +/* Windows static library */ +# ifdef FREEGLUT_STATIC + +# define FGAPI +# define FGAPIENTRY + + /* Link with Win32 static freeglut lib */ +# if FREEGLUT_LIB_PRAGMAS +# ifdef NDEBUG +# pragma comment (lib, "freeglut_static.lib") +# else +# pragma comment (lib, "freeglut_staticd.lib") +# endif +# endif + +/* Windows shared library (DLL) */ +# else + +# define FGAPIENTRY __stdcall +# if defined(FREEGLUT_EXPORTS) +# define FGAPI __declspec(dllexport) +# else +# define FGAPI __declspec(dllimport) + + /* Link with Win32 shared freeglut lib */ +# if FREEGLUT_LIB_PRAGMAS +# ifdef NDEBUG +# pragma comment (lib, "freeglut.lib") +# else +# pragma comment (lib, "freeglutd.lib") +# endif +# endif + +# endif + +# endif + +/* Drag in other Windows libraries as required by FreeGLUT */ +# if FREEGLUT_LIB_PRAGMAS +# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */ +# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */ +# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */ +# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */ +# pragma comment (lib, "user32.lib") /* link Windows user lib */ +# endif + +#else + +/* Non-Windows definition of FGAPI and FGAPIENTRY */ +# define FGAPI +# define FGAPIENTRY + +#endif + +/* + * The freeglut and GLUT API versions + */ +#define FREEGLUT 1 +#define GLUT_API_VERSION 4 +#define GLUT_XLIB_IMPLEMENTATION 13 +/* Deprecated: + cf. http://sourceforge.net/mailarchive/forum.php?thread_name=CABcAi1hw7cr4xtigckaGXB5X8wddLfMcbA_rZ3NAuwMrX_zmsw%40mail.gmail.com&forum_name=freeglut-developer */ +#define FREEGLUT_VERSION_2_0 1 + +/* + * Always include OpenGL and GLU headers + */ +/* Note: FREEGLUT_GLES1 and FREEGLUT_GLES2 are only used to cleanly + bootstrap headers inclusion here; use GLES constants directly + (e.g. GL_ES_VERSION_2_0) for all other needs */ +#ifdef FREEGLUT_GLES2 +# include +# include +#elif FREEGLUT_GLES1 +# include +# include +#elif __APPLE__ +# include +# include +#else +# include +# include +#endif + +/* + * GLUT API macro definitions -- the special key codes: + */ +#define GLUT_KEY_F1 0x0001 +#define GLUT_KEY_F2 0x0002 +#define GLUT_KEY_F3 0x0003 +#define GLUT_KEY_F4 0x0004 +#define GLUT_KEY_F5 0x0005 +#define GLUT_KEY_F6 0x0006 +#define GLUT_KEY_F7 0x0007 +#define GLUT_KEY_F8 0x0008 +#define GLUT_KEY_F9 0x0009 +#define GLUT_KEY_F10 0x000A +#define GLUT_KEY_F11 0x000B +#define GLUT_KEY_F12 0x000C +#define GLUT_KEY_LEFT 0x0064 +#define GLUT_KEY_UP 0x0065 +#define GLUT_KEY_RIGHT 0x0066 +#define GLUT_KEY_DOWN 0x0067 +#define GLUT_KEY_PAGE_UP 0x0068 +#define GLUT_KEY_PAGE_DOWN 0x0069 +#define GLUT_KEY_HOME 0x006A +#define GLUT_KEY_END 0x006B +#define GLUT_KEY_INSERT 0x006C + +/* + * GLUT API macro definitions -- mouse state definitions + */ +#define GLUT_LEFT_BUTTON 0x0000 +#define GLUT_MIDDLE_BUTTON 0x0001 +#define GLUT_RIGHT_BUTTON 0x0002 +#define GLUT_DOWN 0x0000 +#define GLUT_UP 0x0001 +#define GLUT_LEFT 0x0000 +#define GLUT_ENTERED 0x0001 + +/* + * GLUT API macro definitions -- the display mode definitions + */ +#define GLUT_RGB 0x0000 +#define GLUT_RGBA 0x0000 +#define GLUT_INDEX 0x0001 +#define GLUT_SINGLE 0x0000 +#define GLUT_DOUBLE 0x0002 +#define GLUT_ACCUM 0x0004 +#define GLUT_ALPHA 0x0008 +#define GLUT_DEPTH 0x0010 +#define GLUT_STENCIL 0x0020 +#define GLUT_MULTISAMPLE 0x0080 +#define GLUT_STEREO 0x0100 +#define GLUT_LUMINANCE 0x0200 + +/* + * GLUT API macro definitions -- windows and menu related definitions + */ +#define GLUT_MENU_NOT_IN_USE 0x0000 +#define GLUT_MENU_IN_USE 0x0001 +#define GLUT_NOT_VISIBLE 0x0000 +#define GLUT_VISIBLE 0x0001 +#define GLUT_HIDDEN 0x0000 +#define GLUT_FULLY_RETAINED 0x0001 +#define GLUT_PARTIALLY_RETAINED 0x0002 +#define GLUT_FULLY_COVERED 0x0003 + +/* + * GLUT API macro definitions -- fonts definitions + * + * Steve Baker suggested to make it binary compatible with GLUT: + */ +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__) +# define GLUT_STROKE_ROMAN ((void *)0x0000) +# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001) +# define GLUT_BITMAP_9_BY_15 ((void *)0x0002) +# define GLUT_BITMAP_8_BY_13 ((void *)0x0003) +# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004) +# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005) +# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006) +# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007) +# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008) +#else + /* + * I don't really know if it's a good idea... But here it goes: + */ + extern void* glutStrokeRoman; + extern void* glutStrokeMonoRoman; + extern void* glutBitmap9By15; + extern void* glutBitmap8By13; + extern void* glutBitmapTimesRoman10; + extern void* glutBitmapTimesRoman24; + extern void* glutBitmapHelvetica10; + extern void* glutBitmapHelvetica12; + extern void* glutBitmapHelvetica18; + + /* + * Those pointers will be used by following definitions: + */ +# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman) +# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman) +# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15) +# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13) +# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10) +# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24) +# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10) +# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12) +# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18) +#endif + +/* + * GLUT API macro definitions -- the glutGet parameters + */ +#define GLUT_WINDOW_X 0x0064 +#define GLUT_WINDOW_Y 0x0065 +#define GLUT_WINDOW_WIDTH 0x0066 +#define GLUT_WINDOW_HEIGHT 0x0067 +#define GLUT_WINDOW_BUFFER_SIZE 0x0068 +#define GLUT_WINDOW_STENCIL_SIZE 0x0069 +#define GLUT_WINDOW_DEPTH_SIZE 0x006A +#define GLUT_WINDOW_RED_SIZE 0x006B +#define GLUT_WINDOW_GREEN_SIZE 0x006C +#define GLUT_WINDOW_BLUE_SIZE 0x006D +#define GLUT_WINDOW_ALPHA_SIZE 0x006E +#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F +#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070 +#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071 +#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072 +#define GLUT_WINDOW_DOUBLEBUFFER 0x0073 +#define GLUT_WINDOW_RGBA 0x0074 +#define GLUT_WINDOW_PARENT 0x0075 +#define GLUT_WINDOW_NUM_CHILDREN 0x0076 +#define GLUT_WINDOW_COLORMAP_SIZE 0x0077 +#define GLUT_WINDOW_NUM_SAMPLES 0x0078 +#define GLUT_WINDOW_STEREO 0x0079 +#define GLUT_WINDOW_CURSOR 0x007A + +#define GLUT_SCREEN_WIDTH 0x00C8 +#define GLUT_SCREEN_HEIGHT 0x00C9 +#define GLUT_SCREEN_WIDTH_MM 0x00CA +#define GLUT_SCREEN_HEIGHT_MM 0x00CB +#define GLUT_MENU_NUM_ITEMS 0x012C +#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190 +#define GLUT_INIT_WINDOW_X 0x01F4 +#define GLUT_INIT_WINDOW_Y 0x01F5 +#define GLUT_INIT_WINDOW_WIDTH 0x01F6 +#define GLUT_INIT_WINDOW_HEIGHT 0x01F7 +#define GLUT_INIT_DISPLAY_MODE 0x01F8 +#define GLUT_ELAPSED_TIME 0x02BC +#define GLUT_WINDOW_FORMAT_ID 0x007B + +/* + * GLUT API macro definitions -- the glutDeviceGet parameters + */ +#define GLUT_HAS_KEYBOARD 0x0258 +#define GLUT_HAS_MOUSE 0x0259 +#define GLUT_HAS_SPACEBALL 0x025A +#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B +#define GLUT_HAS_TABLET 0x025C +#define GLUT_NUM_MOUSE_BUTTONS 0x025D +#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E +#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F +#define GLUT_NUM_DIALS 0x0260 +#define GLUT_NUM_TABLET_BUTTONS 0x0261 +#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262 +#define GLUT_DEVICE_KEY_REPEAT 0x0263 +#define GLUT_HAS_JOYSTICK 0x0264 +#define GLUT_OWNS_JOYSTICK 0x0265 +#define GLUT_JOYSTICK_BUTTONS 0x0266 +#define GLUT_JOYSTICK_AXES 0x0267 +#define GLUT_JOYSTICK_POLL_RATE 0x0268 + +/* + * GLUT API macro definitions -- the glutLayerGet parameters + */ +#define GLUT_OVERLAY_POSSIBLE 0x0320 +#define GLUT_LAYER_IN_USE 0x0321 +#define GLUT_HAS_OVERLAY 0x0322 +#define GLUT_TRANSPARENT_INDEX 0x0323 +#define GLUT_NORMAL_DAMAGED 0x0324 +#define GLUT_OVERLAY_DAMAGED 0x0325 + +/* + * GLUT API macro definitions -- the glutVideoResizeGet parameters + */ +#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384 +#define GLUT_VIDEO_RESIZE_IN_USE 0x0385 +#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386 +#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387 +#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388 +#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389 +#define GLUT_VIDEO_RESIZE_X 0x038A +#define GLUT_VIDEO_RESIZE_Y 0x038B +#define GLUT_VIDEO_RESIZE_WIDTH 0x038C +#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D + +/* + * GLUT API macro definitions -- the glutUseLayer parameters + */ +#define GLUT_NORMAL 0x0000 +#define GLUT_OVERLAY 0x0001 + +/* + * GLUT API macro definitions -- the glutGetModifiers parameters + */ +#define GLUT_ACTIVE_SHIFT 0x0001 +#define GLUT_ACTIVE_CTRL 0x0002 +#define GLUT_ACTIVE_ALT 0x0004 + +/* + * GLUT API macro definitions -- the glutSetCursor parameters + */ +#define GLUT_CURSOR_RIGHT_ARROW 0x0000 +#define GLUT_CURSOR_LEFT_ARROW 0x0001 +#define GLUT_CURSOR_INFO 0x0002 +#define GLUT_CURSOR_DESTROY 0x0003 +#define GLUT_CURSOR_HELP 0x0004 +#define GLUT_CURSOR_CYCLE 0x0005 +#define GLUT_CURSOR_SPRAY 0x0006 +#define GLUT_CURSOR_WAIT 0x0007 +#define GLUT_CURSOR_TEXT 0x0008 +#define GLUT_CURSOR_CROSSHAIR 0x0009 +#define GLUT_CURSOR_UP_DOWN 0x000A +#define GLUT_CURSOR_LEFT_RIGHT 0x000B +#define GLUT_CURSOR_TOP_SIDE 0x000C +#define GLUT_CURSOR_BOTTOM_SIDE 0x000D +#define GLUT_CURSOR_LEFT_SIDE 0x000E +#define GLUT_CURSOR_RIGHT_SIDE 0x000F +#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010 +#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011 +#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012 +#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013 +#define GLUT_CURSOR_INHERIT 0x0064 +#define GLUT_CURSOR_NONE 0x0065 +#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066 + +/* + * GLUT API macro definitions -- RGB color component specification definitions + */ +#define GLUT_RED 0x0000 +#define GLUT_GREEN 0x0001 +#define GLUT_BLUE 0x0002 + +/* + * GLUT API macro definitions -- additional keyboard and joystick definitions + */ +#define GLUT_KEY_REPEAT_OFF 0x0000 +#define GLUT_KEY_REPEAT_ON 0x0001 +#define GLUT_KEY_REPEAT_DEFAULT 0x0002 + +#define GLUT_JOYSTICK_BUTTON_A 0x0001 +#define GLUT_JOYSTICK_BUTTON_B 0x0002 +#define GLUT_JOYSTICK_BUTTON_C 0x0004 +#define GLUT_JOYSTICK_BUTTON_D 0x0008 + +/* + * GLUT API macro definitions -- game mode definitions + */ +#define GLUT_GAME_MODE_ACTIVE 0x0000 +#define GLUT_GAME_MODE_POSSIBLE 0x0001 +#define GLUT_GAME_MODE_WIDTH 0x0002 +#define GLUT_GAME_MODE_HEIGHT 0x0003 +#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004 +#define GLUT_GAME_MODE_REFRESH_RATE 0x0005 +#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006 + +/* + * Initialization functions, see fglut_init.c + */ +FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv ); +FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y ); +FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height ); +FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ); +FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode ); + +/* + * Process loop function, see freeglut_main.c + */ +FGAPI void FGAPIENTRY glutMainLoop( void ); + +/* + * Window management functions, see freeglut_window.c + */ +FGAPI int FGAPIENTRY glutCreateWindow( const char* title ); +FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height ); +FGAPI void FGAPIENTRY glutDestroyWindow( int window ); +FGAPI void FGAPIENTRY glutSetWindow( int window ); +FGAPI int FGAPIENTRY glutGetWindow( void ); +FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title ); +FGAPI void FGAPIENTRY glutSetIconTitle( const char* title ); +FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height ); +FGAPI void FGAPIENTRY glutPositionWindow( int x, int y ); +FGAPI void FGAPIENTRY glutShowWindow( void ); +FGAPI void FGAPIENTRY glutHideWindow( void ); +FGAPI void FGAPIENTRY glutIconifyWindow( void ); +FGAPI void FGAPIENTRY glutPushWindow( void ); +FGAPI void FGAPIENTRY glutPopWindow( void ); +FGAPI void FGAPIENTRY glutFullScreen( void ); + +/* + * Display-connected functions, see freeglut_display.c + */ +FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window ); +FGAPI void FGAPIENTRY glutPostRedisplay( void ); +FGAPI void FGAPIENTRY glutSwapBuffers( void ); + +/* + * Mouse cursor functions, see freeglut_cursor.c + */ +FGAPI void FGAPIENTRY glutWarpPointer( int x, int y ); +FGAPI void FGAPIENTRY glutSetCursor( int cursor ); + +/* + * Overlay stuff, see freeglut_overlay.c + */ +FGAPI void FGAPIENTRY glutEstablishOverlay( void ); +FGAPI void FGAPIENTRY glutRemoveOverlay( void ); +FGAPI void FGAPIENTRY glutUseLayer( GLenum layer ); +FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void ); +FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window ); +FGAPI void FGAPIENTRY glutShowOverlay( void ); +FGAPI void FGAPIENTRY glutHideOverlay( void ); + +/* + * Menu stuff, see freeglut_menu.c + */ +FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) ); +FGAPI void FGAPIENTRY glutDestroyMenu( int menu ); +FGAPI int FGAPIENTRY glutGetMenu( void ); +FGAPI void FGAPIENTRY glutSetMenu( int menu ); +FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value ); +FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu ); +FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value ); +FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value ); +FGAPI void FGAPIENTRY glutRemoveMenuItem( int item ); +FGAPI void FGAPIENTRY glutAttachMenu( int button ); +FGAPI void FGAPIENTRY glutDetachMenu( int button ); + +/* + * Global callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value ); +FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) ); + +/* + * Window-specific callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) ); +FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) ); +FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ); +FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) ); + +FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) ); +FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval ); +FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) ); +FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) ); + +FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) ); + +/* + * State setting and retrieval functions, see freeglut_state.c + */ +FGAPI int FGAPIENTRY glutGet( GLenum query ); +FGAPI int FGAPIENTRY glutDeviceGet( GLenum query ); +FGAPI int FGAPIENTRY glutGetModifiers( void ); +FGAPI int FGAPIENTRY glutLayerGet( GLenum query ); + +/* + * Font stuff, see freeglut_font.c + */ +FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character ); +FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character ); +FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character ); +FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character ); +FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string ); +FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string ); + +/* + * Geometry functions, see freeglut_geometry.c + */ + +FGAPI void FGAPIENTRY glutWireCube( double size ); +FGAPI void FGAPIENTRY glutSolidCube( double size ); +FGAPI void FGAPIENTRY glutWireSphere( double radius, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutSolidSphere( double radius, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutWireCone( double base, double height, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutSolidCone( double base, double height, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutWireTorus( double innerRadius, double outerRadius, GLint sides, GLint rings ); +FGAPI void FGAPIENTRY glutSolidTorus( double innerRadius, double outerRadius, GLint sides, GLint rings ); +FGAPI void FGAPIENTRY glutWireDodecahedron( void ); +FGAPI void FGAPIENTRY glutSolidDodecahedron( void ); +FGAPI void FGAPIENTRY glutWireOctahedron( void ); +FGAPI void FGAPIENTRY glutSolidOctahedron( void ); +FGAPI void FGAPIENTRY glutWireTetrahedron( void ); +FGAPI void FGAPIENTRY glutSolidTetrahedron( void ); +FGAPI void FGAPIENTRY glutWireIcosahedron( void ); +FGAPI void FGAPIENTRY glutSolidIcosahedron( void ); + +/* + * Teapot rendering functions, found in freeglut_teapot.c + * NB: front facing polygons have clockwise winding, not counter clockwise + */ +/* TODO: doesn't work with GLES1 yet */ +#ifndef EGL_VERSION_1_0 +FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size ); +FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size ); +#endif + +/* + * Game mode functions, see freeglut_gamemode.c + */ +FGAPI void FGAPIENTRY glutGameModeString( const char* string ); +FGAPI int FGAPIENTRY glutEnterGameMode( void ); +FGAPI void FGAPIENTRY glutLeaveGameMode( void ); +FGAPI int FGAPIENTRY glutGameModeGet( GLenum query ); + +/* + * Video resize functions, see freeglut_videoresize.c + */ +FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query ); +FGAPI void FGAPIENTRY glutSetupVideoResizing( void ); +FGAPI void FGAPIENTRY glutStopVideoResizing( void ); +FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height ); +FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height ); + +/* + * Colormap functions, see freeglut_misc.c + */ +FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue ); +FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component ); +FGAPI void FGAPIENTRY glutCopyColormap( int window ); + +/* + * Misc keyboard and joystick functions, see freeglut_misc.c + */ +FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore ); +FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode ); +FGAPI void FGAPIENTRY glutForceJoystickFunc( void ); + +/* + * Misc functions, see freeglut_misc.c + */ +FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension ); +FGAPI void FGAPIENTRY glutReportErrors( void ); + +/* Comment from glut.h of classic GLUT: + + Win32 has an annoying issue where there are multiple C run-time + libraries (CRTs). If the executable is linked with a different CRT + from the GLUT DLL, the GLUT DLL will not share the same CRT static + data seen by the executable. In particular, atexit callbacks registered + in the executable will not be called if GLUT calls its (different) + exit routine). GLUT is typically built with the + "/MD" option (the CRT with multithreading DLL support), but the Visual + C++ linker default is "/ML" (the single threaded CRT). + + One workaround to this issue is requiring users to always link with + the same CRT as GLUT is compiled with. That requires users supply a + non-standard option. GLUT 3.7 has its own built-in workaround where + the executable's "exit" function pointer is covertly passed to GLUT. + GLUT then calls the executable's exit function pointer to ensure that + any "atexit" calls registered by the application are called if GLUT + needs to exit. + + Note that the __glut*WithExit routines should NEVER be called directly. + To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ + +/* to get the prototype for exit() */ +#include + +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__) +FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); +FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); +FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int)); +#ifndef FREEGLUT_BUILDING_LIB +#if defined(__GNUC__) +#define FGUNUSED __attribute__((unused)) +#else +#define FGUNUSED +#endif +static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#define glutInit glutInit_ATEXIT_HACK +static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +#define glutCreateWindow glutCreateWindow_ATEXIT_HACK +static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } +#define glutCreateMenu glutCreateMenu_ATEXIT_HACK +#endif +#endif + +#ifdef __cplusplus + } +#endif + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_STD_H__ */ + diff --git a/ports/android/include/GL/glut.h b/ports/android/include/GL/glut.h new file mode 100644 index 00000000000..6191f77b75d --- /dev/null +++ b/ports/android/include/GL/glut.h @@ -0,0 +1,21 @@ +#ifndef __GLUT_H__ +#define __GLUT_H__ + +/* + * glut.h + * + * The freeglut library include file + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#include "freeglut_std.h" + +/*** END OF FILE ***/ + +#endif /* __GLUT_H__ */ diff --git a/ports/android/jni/Android.mk b/ports/android/jni/Android.mk new file mode 100644 index 00000000000..e4f4478916d --- /dev/null +++ b/ports/android/jni/Android.mk @@ -0,0 +1,43 @@ +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := freeglut +LOCAL_SRC_FILES := libfreeglut-gles2.a + +include $(PREBUILT_STATIC_LIBRARY) + + +include $(CLEAR_VARS) + +LOCAL_MODULE := ServoAndroid + +LOCAL_SRC_FILES := common.cpp android-dl.cpp main.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH) \ + $(LOCAL_PATH)/../include + +LOCAL_CXXFLAGS := -DFREEGLUT_GLES2 -gstabs+ + +LOCAL_LDLIBS := -ldl -llog -landroid -lGLESv2 -lGLESv1_CM -lEGL + +LOCAL_STATIC_LIBRARIES := android_native_app_glue freeglut +LOCAL_SHARED_LIBRARIES := libdl + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,android/native_app_glue) diff --git a/ports/android/jni/Application.mk b/ports/android/jni/Application.mk new file mode 100644 index 00000000000..ee34d0278ae --- /dev/null +++ b/ports/android/jni/Application.mk @@ -0,0 +1,3 @@ +APP_PLATFORM := android-18 +APP_STL := stlport_static +APP_CPPFLAGS += -lstdc++ diff --git a/ports/android/jni/android-dl.cpp b/ports/android/jni/android-dl.cpp new file mode 100644 index 00000000000..8a301d3d829 --- /dev/null +++ b/ports/android/jni/android-dl.cpp @@ -0,0 +1,472 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http: *www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Tor Lillqvist (initial developer) + * Copyright (C) 2011 SUSE Linux http://suse.com (initial developer's employer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "android-dl.h" +#include "common.h" + +/* The library paths. */ +const char **library_locations; + +static char last_error[1024] = {0}; + +extern "C" { + +void set_error(const char* format, ...) +{ + va_list args; + va_start(args, format); + + vsnprintf(last_error, sizeof(last_error), format, args); + __android_log_write(ANDROID_LOG_ERROR, LOG_TAG, last_error); + + va_end(args); +} + +#define SET_ERROR(format, ...) set_error("%s: " format, __FUNCTION__, ##__VA_ARGS__) + +static char * +read_section(int fd, + Elf32_Shdr *shdr) +{ + char *result = (char*)malloc(shdr->sh_size); + if (lseek(fd, shdr->sh_offset, SEEK_SET) < 0) { + close(fd); + free(result); + return NULL; + } + if (read(fd, result, shdr->sh_size) < (int) shdr->sh_size) { + close(fd); + free(result); + return NULL; + } + + return result; +} + +__attribute__ ((visibility("default"))) +char ** +android_dlneeds(const char *library) +{ + int i, fd; + int n_needed; + char **result; + char *shstrtab; + char *dynstr = NULL; + Elf32_Ehdr hdr; + Elf32_Shdr shdr; + Elf32_Dyn dyn; + + /* Open library and read ELF header */ + + fd = open(library, O_RDONLY); + + if (fd == -1) { + SET_ERROR("Could not open library %s: %s", library, strerror(errno)); + return NULL; + } + + if (read(fd, &hdr, sizeof(hdr)) < (int) sizeof(hdr)) { + set_error("Could not read ELF header of %s", library); + close(fd); + return NULL; + } + + /* Read in .shstrtab */ + + if (lseek(fd, hdr.e_shoff + hdr.e_shstrndx * sizeof(shdr), SEEK_SET) < 0) { + set_error("Could not seek to .shstrtab section header of %s", library); + close(fd); + return NULL; + } + if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) { + set_error("Could not read section header of %s", library); + close(fd); + return NULL; + } + + shstrtab = read_section(fd, &shdr); + if (shstrtab == NULL) + return NULL; + + /* Read section headers, looking for .dynstr section */ + + if (lseek(fd, hdr.e_shoff, SEEK_SET) < 0) { + set_error("Could not seek to section headers of %s", library); + close(fd); + return NULL; + } + for (i = 0; i < hdr.e_shnum; i++) { + if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) { + set_error("Could not read section header of %s", library); + close(fd); + return NULL; + } + if (shdr.sh_type == SHT_STRTAB && + strcmp(shstrtab + shdr.sh_name, ".dynstr") == 0) { + dynstr = read_section(fd, &shdr); + if (dynstr == NULL) { + free(shstrtab); + return NULL; + } + break; + } + } + + if (i == hdr.e_shnum) { + set_error("No .dynstr section in %s", library); + close(fd); + return NULL; + } + + /* Read section headers, looking for .dynamic section */ + + if (lseek(fd, hdr.e_shoff, SEEK_SET) < 0) { + SET_ERROR("Could not seek to section headers of %s", library); + close(fd); + return NULL; + } + for (i = 0; i < hdr.e_shnum; i++) { + if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) { + SET_ERROR("Could not read section header of %s", library); + close(fd); + return NULL; + } + if (shdr.sh_type == SHT_DYNAMIC) { + size_t dynoff; + + /* Count number of DT_NEEDED entries */ + n_needed = 0; + if (lseek(fd, shdr.sh_offset, SEEK_SET) < 0) { + SET_ERROR("Could not seek to .dynamic section of %s", library); + close(fd); + return NULL; + } + for (dynoff = 0; dynoff < shdr.sh_size; dynoff += sizeof(dyn)) { + if (read(fd, &dyn, sizeof(dyn)) < (int) sizeof(dyn)) { + SET_ERROR("Could not read .dynamic entry of %s", library); + close(fd); + return NULL; + } + if (dyn.d_tag == DT_NEEDED) + n_needed++; + } + + /* LOGI("Found %d DT_NEEDED libs", n_needed); */ + + result = (char**)malloc((n_needed+1) * sizeof(char *)); + + n_needed = 0; + if (lseek(fd, shdr.sh_offset, SEEK_SET) < 0) { + SET_ERROR("Could not seek to .dynamic section of %s", library); + close(fd); + free(result); + return NULL; + } + for (dynoff = 0; dynoff < shdr.sh_size; dynoff += sizeof(dyn)) { + if (read(fd, &dyn, sizeof(dyn)) < (int) sizeof(dyn)) { + SET_ERROR("Could not read .dynamic entry in %s", library); + close(fd); + free(result); + return NULL; + } + if (dyn.d_tag == DT_NEEDED) { + LOGI("needs: %s\n", dynstr + dyn.d_un.d_val); + result[n_needed] = strdup(dynstr + dyn.d_un.d_val); + n_needed++; + } + } + + close(fd); + if (dynstr) + free(dynstr); + free(shstrtab); + result[n_needed] = NULL; + return result; + } + } + + SET_ERROR("Could not find .dynamic section in %s", library); + close(fd); + return NULL; +} + +__attribute__ ((visibility("default"))) +void * +android_dlopen(const char *library) +{ + //added by aydin.kim - parse ld_library_path + char *libraries[256]; + int i1 = 0, icnt = 0; + + char ld_library_path[1024]; + char* library_path = getenv("LD_LIBRARY_PATH"); + strcpy(ld_library_path, library_path); + + // LOGI("LD_LIBRARY_PATH is : %s", ld_library_path); + libraries[i1] = strtok(ld_library_path, ":"); + //LOGI("library : %s", libraries[i1]); + while(libraries[i1]) { + libraries[++i1] = strtok(NULL, ":"); + //LOGI("library : %s", libraries[i1]); + } + icnt = i1; + + library_locations = (const char**)malloc((icnt+2) * sizeof(char *)); + for(int j = 0; j < icnt+2; j++) + library_locations[j] = NULL; + if(library_locations == NULL) { + SET_ERROR("Cannot allocate library locations"); + return 0; + } + library_locations[0] = "/data/data/com.example.ServoAndroid/lib"; + // LOGI("added library path : %s", library_locations[0]); + for(int i = 0; i < icnt; i++ ) { + library_locations[i+1] = strdup(libraries[i]); + // LOGI("added library path : %s", library_locations[i+1]); + } + + /* + * We should *not* try to just dlopen() the bare library name + * first, as the stupid dynamic linker remembers for each library + * basename if loading it has failed. Thus if you try loading it + * once, and it fails because of missing needed libraries, and + * your load those, and then try again, it fails with an + * infuriating message "failed to load previously" in the log. + * + * We *must* first dlopen() all needed libraries, recursively. It + * shouldn't matter if we dlopen() a library that already is + * loaded, dlopen() just returns the same value then. + */ + + struct loadedLib { + const char *name; + void *handle; + struct loadedLib *next; + }; + static struct loadedLib *loaded_libraries = NULL; + + struct loadedLib *rover; + struct loadedLib *new_loaded_lib; + + struct stat st; + void *p; + char *full_name = NULL; + char **needed; + int i; + int found; + + struct timeval tv0, tv1, tvdiff; + + rover = loaded_libraries; + while (rover != NULL && + strcmp(rover->name, library) != 0) + rover = rover->next; + + if (rover != NULL) + return rover->handle; + + /* LOGI("android_dlopen(%s)", library); */ + + found = 0; + if (library[0] == '/') { + full_name = strdup(library); + + if (stat(full_name, &st) == 0 && + S_ISREG(st.st_mode)) { + found = 1; + } else { + free(full_name); + full_name = NULL; + } + } else { + for (i = 0; !found && library_locations[i] != NULL; i++) { + full_name = (char*)malloc(strlen(library_locations[i]) + 1 + strlen(library) + 1); + strcpy(full_name, library_locations[i]); + strcat(full_name, "/"); + strcat(full_name, library); + + if (stat(full_name, &st) == 0 && + S_ISREG(st.st_mode)) { + found = 1; + } else { + free(full_name); + full_name = NULL; + } + } + } + + if (!found) { + SET_ERROR("Library %s not found", library); + assert(full_name == NULL); // full_name was freed above if !found + return NULL; + } + + needed = android_dlneeds(full_name); + if (needed == NULL) { + free(full_name); + return NULL; + } + + for (i = 0; needed[i] != NULL; i++) { + if (android_dlopen(needed[i]) == NULL) { + free_ptrarray((void **) needed); + free(full_name); + return NULL; + } + } + free_ptrarray((void **) needed); + + gettimeofday(&tv0, NULL); + p = dlopen(full_name, RTLD_LOCAL); + gettimeofday(&tv1, NULL); + timersub(&tv1, &tv0, &tvdiff); + LOGI("dlopen(%s) = %p, %ld.%03lds", + full_name, p, + (long) tvdiff.tv_sec, (long) tvdiff.tv_usec / 1000); + if (p == NULL) + SET_ERROR("Error from dlopen(%s): %s", full_name, dlerror()); + free(full_name); + full_name = NULL; + + new_loaded_lib = (struct loadedLib*)malloc(sizeof(*new_loaded_lib)); + new_loaded_lib->name = strdup(library); + new_loaded_lib->handle = p; + + new_loaded_lib->next = loaded_libraries; + loaded_libraries = new_loaded_lib; + + return p; +} + +__attribute__ ((visibility("default"))) +void * +android_dlsym(void *handle, + const char *symbol) +{ + void *p = dlsym(handle, symbol); + if (p == NULL) + set_error("%s(%p,%s): %s", __FUNCTION__, handle, symbol, dlerror()); + return p; +} + +__attribute__ ((visibility("default"))) +int +android_dladdr(void *addr, + Dl_info *info) +{ + FILE *maps; + char line[200]; + int result; + int found; + + result = dladdr(addr, info); + if (result == 0) { + /* LOGI("dladdr(%p) = 0", addr); */ + return 0; + } + + maps = fopen("/proc/self/maps", "r"); + if (maps == NULL) { + SET_ERROR("Could not open /proc/self/maps: %s", strerror(errno)); + return 0; + } + + found = 0; + while (fgets(line, sizeof(line), maps) != NULL && + line[strlen(line)-1] == '\n') { + void *lo, *hi; + char file[sizeof(line)]; + file[0] = '\0'; + if (sscanf(line, "%x-%x %*s %*x %*x:%*x %*d %[^\n]", (unsigned *) &lo, (unsigned *) &hi, file) == 3) { + /* LOGI("got %p-%p: %s", lo, hi, file); */ + if (addr >= lo && addr < hi) { + if (info->dli_fbase != lo) { + SET_ERROR("Base for %s in /proc/self/maps %p doesn't match what dladdr() said", file, lo); + fclose(maps); + return 0; + } + /* LOGI("dladdr(%p) = { %s:%p, %s:%p }: %s", + addr, + info->dli_fname, info->dli_fbase, + info->dli_sname ? info->dli_sname : "(none)", info->dli_saddr, + file); */ + info->dli_fname = strdup(file); + found = 1; + break; + } + } + } + if (!found) + SET_ERROR("Did not find %p in /proc/self/maps", addr); + fclose(maps); + + return result; +} + +__attribute__ ((visibility("default"))) +int +android_dlclose(void *handle) +{ + /* As we don't know when the reference count for a dlopened shared + * object drops to zero, we wouldn't know when to remove it from + * our list, so we can't call dlclose(). + */ + LOGI("ll_dlclose(%p)", handle); + + return 0; +} + +__attribute__ ((visibility("default"))) +const char * +android_dl_get_last_error() +{ + return last_error; +} + +} // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + + diff --git a/ports/android/jni/android-dl.h b/ports/android/jni/android-dl.h new file mode 100644 index 00000000000..7caca6a0544 --- /dev/null +++ b/ports/android/jni/android-dl.h @@ -0,0 +1,29 @@ +#pragma once + +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +__attribute__ ((visibility("default"))) +char ** android_dlneeds(const char *library); + +__attribute__ ((visibility("default"))) +void * android_dlopen(const char *library); + +__attribute__ ((visibility("default"))) +void * android_dlsym(void *handle, const char *symbol); + +__attribute__ ((visibility("default"))) +int android_dladdr(void *addr, Dl_info *info); + +__attribute__ ((visibility("default"))) +int android_dlclose(void *handle); + +__attribute__ ((visibility("default"))) +const char * android_dl_get_last_error(); + +#if defined(__cplusplus) +} // extern "C" +#endif diff --git a/ports/android/jni/common.cpp b/ports/android/jni/common.cpp new file mode 100644 index 00000000000..804c625fd85 --- /dev/null +++ b/ports/android/jni/common.cpp @@ -0,0 +1,14 @@ +#include "common.h" +#include + +void free_ptrarray(void **pa) +{ + void **rover = pa; + + while (*rover != NULL) + free(*rover++); + + free(pa); +} + + diff --git a/ports/android/jni/common.h b/ports/android/jni/common.h new file mode 100644 index 00000000000..5f0e10bf0b8 --- /dev/null +++ b/ports/android/jni/common.h @@ -0,0 +1,18 @@ +#pragma once +#include + +#undef LOGI +#undef LOGW + +#define LOG_TAG "android-dl" +#define LOGI(message, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, "%s: " message, __FUNCTION__, ##__VA_ARGS__) +#define LOGW(message, ...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, "%s: " message, __FUNCTION__, ##__VA_ARGS__) +#define LOGE(message, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, "%s: " message, __FUNCTION__, ##__VA_ARGS__) +#define LOGF(message, ...) __android_log_print(ANDROID_LOG_FATAL, LOG_TAG, "%s: " message, __FUNCTION__, ##__VA_ARGS__) + +/* Defines the signature of the function that's callable through Java dlcall */ +typedef int (*android_dlcall_func_t)(int, const char **); + +void free_ptrarray(void **pa); + + diff --git a/ports/android/jni/libfreeglut-gles2-old.a b/ports/android/jni/libfreeglut-gles2-old.a new file mode 100644 index 00000000000..167349d3867 Binary files /dev/null and b/ports/android/jni/libfreeglut-gles2-old.a differ diff --git a/ports/android/jni/libfreeglut-gles2.a b/ports/android/jni/libfreeglut-gles2.a new file mode 100644 index 00000000000..3023af8b696 Binary files /dev/null and b/ports/android/jni/libfreeglut-gles2.a differ diff --git a/ports/android/jni/main.cpp b/ports/android/jni/main.cpp new file mode 100644 index 00000000000..54158c39cd6 --- /dev/null +++ b/ports/android/jni/main.cpp @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#define LOG(prio, tag, a, args...) __android_log_print(prio, tag, "[%s::%d]"#a"",__FUNCTION__, __LINE__, ##args); +#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "native-activity", __VA_ARGS__)) +#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "native-activity", __VA_ARGS__)) + +typedef void (*fty_glutMainLoopEvent)(); +typedef void (*fty_glutInit)(int*, char**); +typedef void (*fty_glutInitDisplayMode)(unsigned int); +typedef int (*fty_glutCreateWindow)(const char*); +typedef void (*fty_glutDestroyWindow)(int); +typedef void (*fty_glutPostRedisplay)(); +typedef void (*fty_glutSwapBuffers)(); +typedef int (*fty_glutGetWindow)(); +typedef void (*fty_glutSetWindow)(int); +typedef void (*fty_glutReshapeWindow)(int ,int); +typedef void (*fty_glutDisplayFunc)(void (*)()); +typedef void (*fty_glutReshapeFunc)(void (*)(int, int)); +typedef void (*fty_glutTimerFunc)(unsigned int, void (*)(int), int); +typedef int (*fty_glutGet)(unsigned int); +typedef void (*fty_glutKeyboardFunc)(void (*)(unsigned char, int, int)); +typedef void (*fty_glutMouseFunc)(void (*)(int, int, int, int)); +typedef void (*fty_glutMouseWheelFunc)(void (*)(int, int, int, int)); +typedef void (*fty_glutSetWindowTitle)(char const*); +typedef void (*fty_glutIdleFunc)(void(*)()); +typedef void (*fty_glutInitWindowSize)(int, int); +typedef int (*fty_glutGetModifiers)(); + +#define REGISTER_FUNCTION(lib, function)\ + void (*reg_fn_##function)(fty_##function);\ + *(void**)(®_fn_##function) = dlsym(lib, "reg_fn_" #function);\ + if (function == NULL) {\ + LOGW("could not find reg_fn_" #function " from " #lib);\ + return;\ + } else {\ + LOGI("loaded reg_fn_" #function " from " #lib);\ + reg_fn_##function(function);\ + LOGI("registerd "#function);\ + }\ + +static void init_servo() +{ + LOGI("initializing native application for Servo"); + + setenv("RUST_LOG", "servo,gfx,msg,util,layers,js,glut,std,rt,extra", 1); + +// setenv("SERVO_URL", "/mnt/sdcard/html/demo.html", 1); +// setenv("RUST_THREADS", "1", 1); + +// char* size_stack = getenv("RUST_MIN_STACK"); +// char* rust_log = getenv("RUST_LOG"); +// char* servo_url = getenv("SERVO_URL"); + +// LOGI("Stack Size is : %s", size_stack); +// LOGI("RUST_LOG flag is : %s", rust_log); +// LOGI("loading url is : %s", servo_url); + + + LOGI("load servo library"); + void* libservo = android_dlopen("/data/data/com.example.ServoAndroid/lib/libservo.so"); + if (libservo == NULL) { + LOGW("failed to load servo lib: %s", dlerror()); + return; + } + + REGISTER_FUNCTION(libservo, glutMainLoopEvent); + REGISTER_FUNCTION(libservo, glutInit); + REGISTER_FUNCTION(libservo, glutInitDisplayMode); + REGISTER_FUNCTION(libservo, glutCreateWindow); + REGISTER_FUNCTION(libservo, glutDestroyWindow); + REGISTER_FUNCTION(libservo, glutPostRedisplay); + REGISTER_FUNCTION(libservo, glutSwapBuffers); + REGISTER_FUNCTION(libservo, glutGetWindow); + REGISTER_FUNCTION(libservo, glutSetWindow); + REGISTER_FUNCTION(libservo, glutReshapeWindow); + REGISTER_FUNCTION(libservo, glutDisplayFunc); + REGISTER_FUNCTION(libservo, glutReshapeFunc); + REGISTER_FUNCTION(libservo, glutTimerFunc); + REGISTER_FUNCTION(libservo, glutGet); + REGISTER_FUNCTION(libservo, glutKeyboardFunc); + REGISTER_FUNCTION(libservo, glutMouseFunc); + REGISTER_FUNCTION(libservo, glutMouseWheelFunc); + REGISTER_FUNCTION(libservo, glutSetWindowTitle); + REGISTER_FUNCTION(libservo, glutIdleFunc); + REGISTER_FUNCTION(libservo, glutInitWindowSize); + REGISTER_FUNCTION(libservo, glutGetModifiers); + + void (*main)(int, char**); + *(void**)(&main) = dlsym(libservo, "android_start"); + if (main) { + LOGI("go into android_start()"); + static const char* argv[] = {"servo", "/mnt/sdcard/html/about-mozilla.html"}; + (*main)(2, (char **)argv); + return; + } + LOGW("could not find android_start() in the libServo shared library"); +} + +extern "C" void *stderr_thread(void *) { + int pipes[2]; + pipe(pipes); + dup2(pipes[1], STDERR_FILENO); + FILE *inputFile = fdopen(pipes[0], "r"); + char readBuffer[1024]; + while (1) { + fgets(readBuffer, sizeof(readBuffer), inputFile); + __android_log_write(2, "stderr", readBuffer); + } + return NULL; +} + +extern "C" void *stdout_thread(void *) { + int pipes[2]; + pipe(pipes); + dup2(pipes[1], STDOUT_FILENO); + FILE *inputFile = fdopen(pipes[0], "r"); + char readBuffer[1024]; + while (1) { + fgets(readBuffer, sizeof(readBuffer), inputFile); + __android_log_write(2, "stdout", readBuffer); + } + return NULL; +} + +pthread_t stderr_tid = -1; +pthread_t stdout_tid = -1; + +static void init_std_threads() { + pthread_create(&stderr_tid, NULL, stderr_thread, NULL); + pthread_create(&stdout_tid, NULL, stdout_thread, NULL); +} + +static void shutdown_std_threads() { + // FIXME(larsberg): this needs to change to signal the threads + // to exit, as pthread_cancel is not implemented on Android. +} + + +const int W = 2560; +const int H = 1600; + +static int init_display() { + LOGI("initialize GLUT window"); + + glutInitWindowSize(W, H); + return 0; +} + +int main(int argc, char* argv[]) +{ + init_display(); + init_std_threads(); + init_servo(); + shutdown_std_threads(); + + return 0; +} diff --git a/ports/android/proguard-project.txt b/ports/android/proguard-project.txt new file mode 100644 index 00000000000..f2fe1559a21 --- /dev/null +++ b/ports/android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/ports/android/project.properties b/ports/android/project.properties new file mode 100644 index 00000000000..ce39f2d0a06 --- /dev/null +++ b/ports/android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-18 diff --git a/ports/android/res/values/strings.xml b/ports/android/res/values/strings.xml new file mode 100644 index 00000000000..6d76ba353dc --- /dev/null +++ b/ports/android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + ServoAndroid + diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock new file mode 100644 index 00000000000..af3f9ab0cb4 --- /dev/null +++ b/ports/cef/Cargo.lock @@ -0,0 +1,499 @@ +[root] +name = "embedding" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14)", + "glut 0.0.1 (git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1)", + "js 0.1.0 (git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679)", + "macros 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "script 0.0.1", + "servo 0.0.1", + "sharegl 0.1.0 (git+https://github.com/servo/sharegl#3706681b9f8ba3581220c875630118a0961e5ca2)", + "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", + "style 0.0.1", + "util 0.0.1", +] + +[[package]] +name = "alert" +version = "0.1.0" +source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" +dependencies = [ + "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", +] + +[[package]] +name = "azure" +version = "0.1.0" +source = "git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)", + "freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "skia-sys 0.0.20130412 (git+https://github.com/servo/skia#6d696712962fd0d41120b7a414a48417da8e6a92)", + "xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)", +] + +[[package]] +name = "canvas" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", +] + +[[package]] +name = "cocoa" +version = "0.1.0" +source = "git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f" + +[[package]] +name = "compositing" +version = "0.0.1" +dependencies = [ + "alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14)", + "glut 0.0.1 (git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679)", + "layout_traits 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "script_traits 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "core_foundation" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff" + +[[package]] +name = "core_graphics" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", +] + +[[package]] +name = "core_text" +version = "0.1.0" +source = "git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", +] + +[[package]] +name = "cssparser" +version = "0.1.0" +source = "git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f" +dependencies = [ + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", +] + +[[package]] +name = "egl" +version = "0.1.0" +source = "git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b" + +[[package]] +name = "encoding" +version = "0.1.0" +source = "git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7" + +[[package]] +name = "expat-sys" +version = "2.1.0" +source = "git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1" + +[[package]] +name = "fontconfig" +version = "0.1.0" +source = "git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544" +dependencies = [ + "fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig#1fc43065f581d70133d819070177094434cc3144)", +] + +[[package]] +name = "fontconfig-sys" +version = "2.11.1" +source = "git+https://github.com/servo/libfontconfig#1fc43065f581d70133d819070177094434cc3144" +dependencies = [ + "expat-sys 2.1.0 (git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1)", + "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521)", +] + +[[package]] +name = "freetype" +version = "0.1.0" +source = "git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e" + +[[package]] +name = "freetype-sys" +version = "2.4.11" +source = "git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521" + +[[package]] +name = "geom" +version = "0.1.0" +source = "git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489" + +[[package]] +name = "gfx" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)", + "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)", + "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544)", + "freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#f07c6ae3111a94945f0f04b5f0d7c4e7c20958e9)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679)", + "macros 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "glfw" +version = "0.0.1" +source = "git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14" +dependencies = [ + "link_glfw 0.1.0 (git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14)", + "semver 0.0.1 (git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe)", +] + +[[package]] +name = "glut" +version = "0.0.1" +source = "git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1" +dependencies = [ + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", +] + +[[package]] +name = "harfbuzz" +version = "0.1.0" +source = "git+https://github.com/servo/rust-harfbuzz#f07c6ae3111a94945f0f04b5f0d7c4e7c20958e9" + +[[package]] +name = "http" +version = "0.1.0-pre" +source = "git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372" +dependencies = [ + "openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", +] + +[[package]] +name = "hubbub" +version = "0.1.0" +source = "git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b" +dependencies = [ + "hubbub-sys 0.1.2 (git+https://github.com/servo/libhubbub#6d09893991dedc616b264058442a304c03842213)", +] + +[[package]] +name = "hubbub-sys" +version = "0.1.2" +source = "git+https://github.com/servo/libhubbub#6d09893991dedc616b264058442a304c03842213" +dependencies = [ + "parserutils-sys 0.1.1 (git+http://github.com/servo/libparserutils#651b636ba1214bceeb0907adb1eab60efe0d4598)", +] + +[[package]] +name = "io_surface" +version = "0.1.0" +source = "git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", +] + +[[package]] +name = "js" +version = "0.1.0" +source = "git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6" +dependencies = [ + "mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)", +] + +[[package]] +name = "layers" +version = "0.1.0" +source = "git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", + "xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)", +] + +[[package]] +name = "layout" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "layout_traits 0.0.1", + "macros 0.0.1", + "net 0.0.1", + "script 0.0.1", + "script_traits 0.0.1", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "layout_traits" +version = "0.0.1" +dependencies = [ + "gfx 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "script_traits 0.0.1", + "util 0.0.1", +] + +[[package]] +name = "link_glfw" +version = "0.1.0" +source = "git+https://github.com/servo/glfw-rs?ref=servo#a646f0badaccaebd61d0f8aaec5646da0a7c2a14" + +[[package]] +name = "macros" +version = "0.0.1" + +[[package]] +name = "mozjs-sys" +version = "0.0.0" +source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88" + +[[package]] +name = "msg" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)", + "layers 0.1.0 (git+https://github.com/servo/rust-layers#b8a3eaf37cc3569e49fbc35ae891d816aaad7679)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "net" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "opengles" +version = "0.1.0" +source = "git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a" + +[[package]] +name = "openssl" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a" + +[[package]] +name = "parserutils-sys" +version = "0.1.1" +source = "git+http://github.com/servo/libparserutils#651b636ba1214bceeb0907adb1eab60efe0d4598" + +[[package]] +name = "phf" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b" + +[[package]] +name = "phf_mac" +version = "0.0.0" +source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b" + +[[package]] +name = "png" +version = "0.1.0" +source = "git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16" +dependencies = [ + "png-sys 1.6.3 (git+https://github.com/servo/libpng?ref=servo#d01f32b4eb86904695efe7fc02b574f902e21a98)", +] + +[[package]] +name = "png-sys" +version = "1.6.3" +source = "git+https://github.com/servo/libpng?ref=servo#d01f32b4eb86904695efe7fc02b574f902e21a98" + +[[package]] +name = "script" +version = "0.0.1" +dependencies = [ + "canvas 0.0.1", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "gfx 0.0.1", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)", + "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)", + "js 0.1.0 (git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6)", + "macros 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "script_traits 0.0.1", + "style 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "script_traits" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "msg 0.0.1", + "net 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", +] + +[[package]] +name = "semver" +version = "0.0.1" +source = "git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe" + +[[package]] +name = "servo" +version = "0.0.1" +dependencies = [ + "compositing 0.0.1", + "gfx 0.0.1", + "layout 0.0.1", + "msg 0.0.1", + "net 0.0.1", + "png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)", + "script 0.0.1", + "util 0.0.1", +] + +[[package]] +name = "sharegl" +version = "0.1.0" +source = "git+https://github.com/servo/sharegl#3706681b9f8ba3581220c875630118a0961e5ca2" +dependencies = [ + "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)", + "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)", + "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)", +] + +[[package]] +name = "skia-sys" +version = "0.0.20130412" +source = "git+https://github.com/servo/skia#6d696712962fd0d41120b7a414a48417da8e6a92" +dependencies = [ + "expat-sys 2.1.0 (git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1)", + "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b96d07de55521)", +] + +[[package]] +name = "stb_image" +version = "0.1.0" +source = "git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c" + +[[package]] +name = "string_cache" +version = "0.0.0" +source = "git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1" +dependencies = [ + "phf 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)", + "phf_mac 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)", + "string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1)", +] + +[[package]] +name = "string_cache_macros" +version = "0.0.0" +source = "git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1" + +[[package]] +name = "style" +version = "0.0.1" +dependencies = [ + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "macros 0.0.1", + "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)", + "util 0.0.1", +] + +[[package]] +name = "task_info" +version = "0.0.1" + +[[package]] +name = "url" +version = "0.1.0" +source = "git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a" +dependencies = [ + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)", +] + +[[package]] +name = "util" +version = "0.0.1" +dependencies = [ + "azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)", + "string_cache 0.0.0 (git+https://github.com/servo/string-cache#aa4365ac8da8504a82c709f97b6bcace9b0af4a1)", + "task_info 0.0.1", +] + +[[package]] +name = "xlib" +version = "0.1.0" +source = "git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8" + diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml new file mode 100644 index 00000000000..d88ceb24405 --- /dev/null +++ b/ports/cef/Cargo.toml @@ -0,0 +1,70 @@ +[package] +name = "embedding" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "embedding" +path = "lib.rs" +crate-type = ["dylib"] + +[dependencies.servo] +path = "../.." + +[dependencies.macros] +path = "../../components/macros" + +[dependencies.gfx] +path = "../../components/gfx" + +[dependencies.script] +path = "../../components/script" + +[dependencies.net] +path = "../../components/net" + +[dependencies.msg] +path = "../../components/msg" + +[dependencies.util] +path = "../../components/util" + +[dependencies.style] +path = "../../components/style" + +[dependencies.azure] +git = "https://github.com/servo/rust-azure" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.glfw] +git = "https://github.com/servo/glfw-rs" +branch = "servo" + +[dependencies.glut] +git = "https://github.com/servo/rust-glut" + +[dependencies.js] +git = "https://github.com/servo/rust-mozjs" + +[dependencies.layers] +git = "https://github.com/servo/rust-layers" + +[dependencies.opengles] +git = "https://github.com/servo/rust-opengles" + +[dependencies.png] +git = "https://github.com/servo/rust-png" + +[dependencies.sharegl] +git = "https://github.com/servo/sharegl" + +[dependencies.stb_image] +git = "https://github.com/servo/rust-stb-image" + +[dependencies.core_graphics] +git = "https://github.com/servo/rust-core-graphics" + +[dependencies.core_text] +git = "https://github.com/servo/rust-core-text" diff --git a/src/components/embedding/README.md b/ports/cef/README.md similarity index 100% rename from src/components/embedding/README.md rename to ports/cef/README.md diff --git a/src/components/embedding/browser.rs b/ports/cef/browser.rs similarity index 100% rename from src/components/embedding/browser.rs rename to ports/cef/browser.rs diff --git a/src/components/embedding/command_line.rs b/ports/cef/command_line.rs similarity index 100% rename from src/components/embedding/command_line.rs rename to ports/cef/command_line.rs diff --git a/src/components/embedding/core.rs b/ports/cef/core.rs similarity index 100% rename from src/components/embedding/core.rs rename to ports/cef/core.rs diff --git a/src/components/embedding/eutil.rs b/ports/cef/eutil.rs similarity index 100% rename from src/components/embedding/eutil.rs rename to ports/cef/eutil.rs diff --git a/src/components/embedding/embedding.rs b/ports/cef/lib.rs similarity index 86% rename from src/components/embedding/embedding.rs rename to ports/cef/lib.rs index cfe105da7ea..a7ff856d2f4 100644 --- a/src/components/embedding/embedding.rs +++ b/ports/cef/lib.rs @@ -2,14 +2,9 @@ * 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/. */ -#![crate_name = "embedding"] -#![crate_type = "lib"] -#![crate_type = "rlib"] -#![crate_type = "dylib"] +#![feature(globs, macro_rules, phase, thread_local, link_args)] -#![feature(globs, macro_rules, phase, thread_local)] - -#![allow(experimental)] +#![allow(experimental, non_camel_case_types)] #![feature(phase)] #[phase(plugin, link)] diff --git a/src/components/embedding/mem.rs b/ports/cef/mem.rs similarity index 93% rename from src/components/embedding/mem.rs rename to ports/cef/mem.rs index a22d2b8c4de..749a1439df7 100644 --- a/src/components/embedding/mem.rs +++ b/ports/cef/mem.rs @@ -6,6 +6,7 @@ use libc::{c_void, size_t}; use std::mem; use std::ptr::set_memory; +#[link_args="-Wl,-U,_tc_new -Wl,-U,_tc_newarray -Wl,-U,_tc_delete -Wl,-U,_tc_deletearray"] extern "C" { fn tc_new(size: size_t) -> *mut c_void; fn tc_delete(mem: *mut c_void); diff --git a/src/components/embedding/request.rs b/ports/cef/request.rs similarity index 100% rename from src/components/embedding/request.rs rename to ports/cef/request.rs diff --git a/src/components/embedding/string.rs b/ports/cef/string.rs similarity index 100% rename from src/components/embedding/string.rs rename to ports/cef/string.rs diff --git a/src/components/embedding/task.rs b/ports/cef/task.rs similarity index 100% rename from src/components/embedding/task.rs rename to ports/cef/task.rs diff --git a/src/components/embedding/types.rs b/ports/cef/types.rs similarity index 100% rename from src/components/embedding/types.rs rename to ports/cef/types.rs diff --git a/src/components/embedding/urlrequest.rs b/ports/cef/urlrequest.rs similarity index 100% rename from src/components/embedding/urlrequest.rs rename to ports/cef/urlrequest.rs diff --git a/src/etc/licenseck.py b/python/licenseck.py similarity index 91% rename from src/etc/licenseck.py rename to python/licenseck.py index af7ecae9dc7..0e862e35ef4 100644 --- a/src/etc/licenseck.py +++ b/python/licenseck.py @@ -50,10 +50,6 @@ license4 = """\ licenses = [license0, license1, license2, license3, license4] exceptions = [ - "rust-http-client/http_parser.c", # BSD, Joyent - "rust-http-client/http_parser.h", # BSD, Joyent - "rust-opengles/gl2.h", # SGI Free Software B License Version 2.0, Khronos Group - "rust-stb-image/stb_image.c", # Public domain "servo/dom/bindings/codegen/ply/ply/yacc.py", # BSD "servo/dom/bindings/codegen/ply/ply/__init__.py", # BSD "servo/dom/bindings/codegen/ply/ply/lex.py", # BSD diff --git a/python/mach/README.rst b/python/mach/README.rst new file mode 100644 index 00000000000..25e8fd470bc --- /dev/null +++ b/python/mach/README.rst @@ -0,0 +1,328 @@ +==== +mach +==== + +Mach (German for *do*) is a generic command dispatcher for the command +line. + +To use mach, you install the mach core (a Python package), create an +executable *driver* script (named whatever you want), and write mach +commands. When the *driver* is executed, mach dispatches to the +requested command handler automatically. + +Features +======== + +On a high level, mach is similar to using argparse with subparsers (for +command handling). When you dig deeper, mach offers a number of +additional features: + +Distributed command definitions + With optparse/argparse, you have to define your commands on a central + parser instance. With mach, you annotate your command methods with + decorators and mach finds and dispatches to them automatically. + +Command categories + Mach commands can be grouped into categories when displayed in help. + This is currently not possible with argparse. + +Logging management + Mach provides a facility for logging (both classical text and + structured) that is available to any command handler. + +Settings files + Mach provides a facility for reading settings from an ini-like file + format. + +Components +========== + +Mach is conceptually composed of the following components: + +core + The mach core is the core code powering mach. This is a Python package + that contains all the business logic that makes mach work. The mach + core is common to all mach deployments. + +commands + These are what mach dispatches to. Commands are simply Python methods + registered as command names. The set of commands is unique to the + environment mach is deployed in. + +driver + The *driver* is the entry-point to mach. It is simply an executable + script that loads the mach core, tells it where commands can be found, + then asks the mach core to handle the current request. The driver is + unique to the deployed environment. But, it's usually based on an + example from this source tree. + +Project State +============= + +mach was originally written as a command dispatching framework to aid +Firefox development. While the code is mostly generic, there are still +some pieces that closely tie it to Mozilla/Firefox. The goal is for +these to eventually be removed and replaced with generic features so +mach is suitable for anybody to use. Until then, mach may not be the +best fit for you. + +Implementing Commands +--------------------- + +Mach commands are defined via Python decorators. + +All the relevant decorators are defined in the *mach.decorators* module. +The important decorators are as follows: + +CommandProvider + A class decorator that denotes that a class contains mach + commands. The decorator takes no arguments. + +Command + A method decorator that denotes that the method should be called when + the specified command is requested. The decorator takes a command name + as its first argument and a number of additional arguments to + configure the behavior of the command. + +CommandArgument + A method decorator that defines an argument to the command. Its + arguments are essentially proxied to ArgumentParser.add_argument() + +Classes with the *@CommandProvider* decorator *must* have an *__init__* +method that accepts 1 or 2 arguments. If it accepts 2 arguments, the +2nd argument will be a *MachCommandContext* instance. This is just a named +tuple containing references to objects provided by the mach driver. + +Here is a complete example:: + + from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, + ) + + @CommandProvider + class MyClass(object): + @Command('doit', help='Do ALL OF THE THINGS.') + @CommandArgument('--force', '-f', action='store_true', + help='Force doing it.') + def doit(self, force=False): + # Do stuff here. + +When the module is loaded, the decorators tell mach about all handlers. +When mach runs, it takes the assembled metadata from these handlers and +hooks it up to the command line driver. Under the hood, arguments passed +to the decorators are being used to help mach parse command arguments, +formulate arguments to the methods, etc. See the documentation in the +*mach.base* module for more. + +The Python modules defining mach commands do not need to live inside the +main mach source tree. + +Conditionally Filtering Commands +-------------------------------- + +Sometimes it might only make sense to run a command given a certain +context. For example, running tests only makes sense if the product +they are testing has been built, and said build is available. To make +sure a command is only runnable from within a correct context, you can +define a series of conditions on the *Command* decorator. + +A condition is simply a function that takes an instance of the +*CommandProvider* class as an argument, and returns True or False. If +any of the conditions defined on a command return False, the command +will not be runnable. The doc string of a condition function is used in +error messages, to explain why the command cannot currently be run. + +Here is an example: + + from mach.decorators import ( + CommandProvider, + Command, + ) + + def build_available(cls): + """The build needs to be available.""" + return cls.build_path is not None + + @CommandProvider + class MyClass(MachCommandBase): + def __init__(self, build_path=None): + self.build_path = build_path + + @Command('run_tests', conditions=[build_available]) + def run_tests(self): + # Do stuff here. + +It is important to make sure that any state needed by the condition is +available to instances of the command provider. + +By default all commands without any conditions applied will be runnable, +but it is possible to change this behaviour by setting *require_conditions* +to True: + + m = mach.main.Mach() + m.require_conditions = True + +Minimizing Code in Commands +--------------------------- + +Mach command modules, classes, and methods work best when they are +minimal dispatchers. The reason is import bloat. Currently, the mach +core needs to import every Python file potentially containing mach +commands for every command invocation. If you have dozens of commands or +commands in modules that import a lot of Python code, these imports +could slow mach down and waste memory. + +It is thus recommended that mach modules, classes, and methods do as +little work as possible. Ideally the module should only import from +the *mach* package. If you need external modules, you should import them +from within the command method. + +To keep code size small, the body of a command method should be limited +to: + +1. Obtaining user input (parsing arguments, prompting, etc) +2. Calling into some other Python package +3. Formatting output + +Of course, these recommendations can be ignored if you want to risk +slower performance. + +In the future, the mach driver may cache the dispatching information or +have it intelligently loaded to facilitate lazy loading. + +Logging +======= + +Mach configures a built-in logging facility so commands can easily log +data. + +What sets the logging facility apart from most loggers you've seen is +that it encourages structured logging. Instead of conventional logging +where simple strings are logged, the internal logging mechanism logs all +events with the following pieces of information: + +* A string *action* +* A dict of log message fields +* A formatting string + +Essentially, instead of assembling a human-readable string at +logging-time, you create an object holding all the pieces of data that +will constitute your logged event. For each unique type of logged event, +you assign an *action* name. + +Depending on how logging is configured, your logged event could get +written a couple of different ways. + +JSON Logging +------------ + +Where machines are the intended target of the logging data, a JSON +logger is configured. The JSON logger assembles an array consisting of +the following elements: + +* Decimal wall clock time in seconds since UNIX epoch +* String *action* of message +* Object with structured message data + +The JSON-serialized array is written to a configured file handle. +Consumers of this logging stream can just perform a readline() then feed +that into a JSON deserializer to reconstruct the original logged +message. They can key off the *action* element to determine how to +process individual events. There is no need to invent a parser. +Convenient, isn't it? + +Logging for Humans +------------------ + +Where humans are the intended consumer of a log message, the structured +log message are converted to more human-friendly form. This is done by +utilizing the *formatting* string provided at log time. The logger +simply calls the *format* method of the formatting string, passing the +dict containing the message's fields. + +When *mach* is used in a terminal that supports it, the logging facility +also supports terminal features such as colorization. This is done +automatically in the logging layer - there is no need to control this at +logging time. + +In addition, messages intended for humans typically prepends every line +with the time passed since the application started. + +Logging HOWTO +------------- + +Structured logging piggybacks on top of Python's built-in logging +infrastructure provided by the *logging* package. We accomplish this by +taking advantage of *logging.Logger.log()*'s *extra* argument. To this +argument, we pass a dict with the fields *action* and *params*. These +are the string *action* and dict of message fields, respectively. The +formatting string is passed as the *msg* argument, like normal. + +If you were logging to a logger directly, you would do something like: + + logger.log(logging.INFO, 'My name is {name}', + extra={'action': 'my_name', 'params': {'name': 'Gregory'}}) + +The JSON logging would produce something like: + + [1339985554.306338, "my_name", {"name": "Gregory"}] + +Human logging would produce something like: + + 0.52 My name is Gregory + +Since there is a lot of complexity using logger.log directly, it is +recommended to go through a wrapping layer that hides part of the +complexity for you. The easiest way to do this is by utilizing the +LoggingMixin: + + import logging + from mach.mixin.logging import LoggingMixin + + class MyClass(LoggingMixin): + def foo(self): + self.log(logging.INFO, 'foo_start', {'bar': True}, + 'Foo performed. Bar: {bar}') + +Entry Points +============ + +It is possible to use setuptools' entry points to load commands +directly from python packages. A mach entry point is a function which +returns a list of files or directories containing mach command +providers. e.g.:: + + def list_providers(): + providers = [] + here = os.path.abspath(os.path.dirname(__file__)) + for p in os.listdir(here): + if p.endswith('.py'): + providers.append(os.path.join(here, p)) + return providers + +See http://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins +for more information on creating an entry point. To search for entry +point plugins, you can call *load_commands_from_entry_point*. This +takes a single parameter called *group*. This is the name of the entry +point group to load and defaults to ``mach.providers``. e.g.:: + + mach.load_commands_from_entry_point("mach.external.providers") + +Adding Global Arguments +======================= + +Arguments to mach commands are usually command-specific. However, +mach ships with a handful of global arguments that apply to all +commands. + +It is possible to extend the list of global arguments. In your +*mach driver*, simply call ``add_global_argument()`` on your +``mach.main.Mach`` instance. e.g.:: + + mach = mach.main.Mach(os.getcwd()) + + # Will allow --example to be specified on every mach command. + mach.add_global_argument('--example', action='store_true', + help='Demonstrate an example global argument.') diff --git a/python/mach/bash-completion.sh b/python/mach/bash-completion.sh new file mode 100644 index 00000000000..e4b151f24c9 --- /dev/null +++ b/python/mach/bash-completion.sh @@ -0,0 +1,29 @@ +function _mach() +{ + local cur cmds c subcommand + COMPREPLY=() + + # Load the list of commands + cmds=`"${COMP_WORDS[0]}" mach-commands` + + # Look for the subcommand. + cur="${COMP_WORDS[COMP_CWORD]}" + subcommand="" + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + if [[ "$subcommand" == "help" || -z "$subcommand" ]]; then + COMPREPLY=( $(compgen -W "$cmds" -- ${cur}) ) + fi + + return 0 +} +complete -o default -F _mach mach diff --git a/python/mach/mach/__init__.py b/python/mach/mach/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/mach/mach/base.py b/python/mach/mach/base.py new file mode 100644 index 00000000000..3e8e6477357 --- /dev/null +++ b/python/mach/mach/base.py @@ -0,0 +1,110 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + + +class CommandContext(object): + """Holds run-time state so it can easily be passed to command providers.""" + def __init__(self, cwd=None, settings=None, log_manager=None, + commands=None, **kwargs): + self.cwd = cwd + self.settings = settings + self.log_manager = log_manager + self.commands = commands + + for k,v in kwargs.items(): + setattr(self, k, v) + + +class MachError(Exception): + """Base class for all errors raised by mach itself.""" + + +class NoCommandError(MachError): + """No command was passed into mach.""" + + +class UnknownCommandError(MachError): + """Raised when we attempted to execute an unknown command.""" + + def __init__(self, command, verb, suggested_commands=None): + MachError.__init__(self) + + self.command = command + self.verb = verb + self.suggested_commands = suggested_commands or [] + +class UnrecognizedArgumentError(MachError): + """Raised when an unknown argument is passed to mach.""" + + def __init__(self, command, arguments): + MachError.__init__(self) + + self.command = command + self.arguments = arguments + + +class MethodHandler(object): + """Describes a Python method that implements a mach command. + + Instances of these are produced by mach when it processes classes + defining mach commands. + """ + __slots__ = ( + # The Python class providing the command. This is the class type not + # an instance of the class. Mach will instantiate a new instance of + # the class if the command is executed. + 'cls', + + # Whether the __init__ method of the class should receive a mach + # context instance. This should only affect the mach driver and how + # it instantiates classes. + 'pass_context', + + # The name of the method providing the command. In other words, this + # is the str name of the attribute on the class type corresponding to + # the name of the function. + 'method', + + # The name of the command. + 'name', + + # String category this command belongs to. + 'category', + + # Description of the purpose of this command. + 'description', + + # Whether to allow all arguments from the parser. + 'allow_all_arguments', + + # Functions used to 'skip' commands if they don't meet the conditions + # in a given context. + 'conditions', + + # argparse.ArgumentParser instance to use as the basis for command + # arguments. + 'parser', + + # Arguments added to this command's parser. This is a 2-tuple of + # positional and named arguments, respectively. + 'arguments', + ) + + def __init__(self, cls, method, name, category=None, description=None, + allow_all_arguments=False, conditions=None, parser=None, arguments=None, + pass_context=False): + + self.cls = cls + self.method = method + self.name = name + self.category = category + self.description = description + self.allow_all_arguments = allow_all_arguments + self.conditions = conditions or [] + self.parser = parser + self.arguments = arguments or [] + self.pass_context = pass_context + diff --git a/python/mach/mach/commands/__init__.py b/python/mach/mach/commands/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/mach/mach/commands/commandinfo.py b/python/mach/mach/commands/commandinfo.py new file mode 100644 index 00000000000..3cca0af202e --- /dev/null +++ b/python/mach/mach/commands/commandinfo.py @@ -0,0 +1,41 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import print_function, unicode_literals + +from mach.decorators import ( + CommandProvider, + Command, +) + + +@CommandProvider +class BuiltinCommands(object): + def __init__(self, context): + self.context = context + + @Command('mach-commands', category='misc', + description='List all mach commands.') + def commands(self): + print("\n".join(self.context.commands.command_handlers.keys())) + + @Command('mach-debug-commands', category='misc', + description='Show info about available mach commands.') + def debug_commands(self): + import inspect + + handlers = self.context.commands.command_handlers + for command in sorted(handlers.keys()): + handler = handlers[command] + cls = handler.cls + method = getattr(cls, getattr(handler, 'method')) + + print(command) + print('=' * len(command)) + print('') + print('File: %s' % inspect.getsourcefile(method)) + print('Class: %s' % cls.__name__) + print('Method: %s' % handler.method) + print('') + diff --git a/python/mach/mach/commands/settings.py b/python/mach/mach/commands/settings.py new file mode 100644 index 00000000000..7223f241fb2 --- /dev/null +++ b/python/mach/mach/commands/settings.py @@ -0,0 +1,50 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import print_function, unicode_literals + +from textwrap import TextWrapper + +from mach.decorators import ( + CommandProvider, + Command, +) + + +#@CommandProvider +class Settings(object): + """Interact with settings for mach. + + Currently, we only provide functionality to view what settings are + available. In the future, this module will be used to modify settings, help + people create configs via a wizard, etc. + """ + def __init__(self, context): + self.settings = context.settings + + @Command('settings-list', category='devenv', + description='Show available config settings.') + def list_settings(self): + """List available settings in a concise list.""" + for section in sorted(self.settings): + for option in sorted(self.settings[section]): + short, full = self.settings.option_help(section, option) + print('%s.%s -- %s' % (section, option, short)) + + @Command('settings-create', category='devenv', + description='Print a new settings file with usage info.') + def create(self): + """Create an empty settings file with full documentation.""" + wrapper = TextWrapper(initial_indent='# ', subsequent_indent='# ') + + for section in sorted(self.settings): + print('[%s]' % section) + print('') + + for option in sorted(self.settings[section]): + short, full = self.settings.option_help(section, option) + + print(wrapper.fill(full)) + print(';%s =' % option) + print('') diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py new file mode 100644 index 00000000000..89824d554d0 --- /dev/null +++ b/python/mach/mach/config.py @@ -0,0 +1,488 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +r""" +This file defines classes for representing config data/settings. + +Config data is modeled as key-value pairs. Keys are grouped together into named +sections. Individual config settings (options) have metadata associated with +them. This metadata includes type, default value, valid values, etc. + +The main interface to config data is the ConfigSettings class. 1 or more +ConfigProvider classes are associated with ConfigSettings and define what +settings are available. + +Descriptions of individual config options can be translated to multiple +languages using gettext. Each option has associated with it a domain and locale +directory. By default, the domain is the section the option is in and the +locale directory is the "locale" directory beneath the directory containing the +module that defines it. + +People implementing ConfigProvider instances are expected to define a complete +gettext .po and .mo file for the en-US locale. You can use the gettext-provided +msgfmt binary to perform this conversion. Generation of the original .po file +can be done via the write_pot() of ConfigSettings. +""" + +from __future__ import unicode_literals + +import collections +import gettext +import os +import sys + +if sys.version_info[0] == 3: + from configparser import RawConfigParser + str_type = str +else: + from ConfigParser import RawConfigParser + str_type = basestring + + +class ConfigType(object): + """Abstract base class for config values.""" + + @staticmethod + def validate(value): + """Validates a Python value conforms to this type. + + Raises a TypeError or ValueError if it doesn't conform. Does not do + anything if the value is valid. + """ + + @staticmethod + def from_config(config, section, option): + """Obtain the value of this type from a RawConfigParser. + + Receives a RawConfigParser instance, a str section name, and the str + option in that section to retrieve. + + The implementation may assume the option exists in the RawConfigParser + instance. + + Implementations are not expected to validate the value. But, they + should return the appropriate Python type. + """ + + @staticmethod + def to_config(value): + return value + + +class StringType(ConfigType): + @staticmethod + def validate(value): + if not isinstance(value, str_type): + raise TypeError() + + @staticmethod + def from_config(config, section, option): + return config.get(section, option) + + +class BooleanType(ConfigType): + @staticmethod + def validate(value): + if not isinstance(value, bool): + raise TypeError() + + @staticmethod + def from_config(config, section, option): + return config.getboolean(section, option) + + @staticmethod + def to_config(value): + return 'true' if value else 'false' + + +class IntegerType(ConfigType): + @staticmethod + def validate(value): + if not isinstance(value, int): + raise TypeError() + + @staticmethod + def from_config(config, section, option): + return config.getint(section, option) + + +class PositiveIntegerType(IntegerType): + @staticmethod + def validate(value): + if not isinstance(value, int): + raise TypeError() + + if value < 0: + raise ValueError() + + +class PathType(StringType): + @staticmethod + def validate(value): + if not isinstance(value, str_type): + raise TypeError() + + @staticmethod + def from_config(config, section, option): + return config.get(section, option) + + +class AbsolutePathType(PathType): + @staticmethod + def validate(value): + if not isinstance(value, str_type): + raise TypeError() + + if not os.path.isabs(value): + raise ValueError() + + +class RelativePathType(PathType): + @staticmethod + def validate(value): + if not isinstance(value, str_type): + raise TypeError() + + if os.path.isabs(value): + raise ValueError() + + +class DefaultValue(object): + pass + + +class ConfigProvider(object): + """Abstract base class for an object providing config settings. + + Classes implementing this interface expose configurable settings. Settings + are typically only relevant to that component itself. But, nothing says + settings can't be shared by multiple components. + """ + + @classmethod + def register_settings(cls): + """Registers config settings. + + This is called automatically. Child classes should likely not touch it. + See _register_settings() instead. + """ + if hasattr(cls, '_settings_registered'): + return + + cls._settings_registered = True + + cls.config_settings = {} + + ourdir = os.path.dirname(__file__) + cls.config_settings_locale_directory = os.path.join(ourdir, 'locale') + + cls._register_settings() + + @classmethod + def _register_settings(cls): + """The actual implementation of register_settings(). + + This is what child classes should implement. They should not touch + register_settings(). + + Implementations typically make 1 or more calls to _register_setting(). + """ + raise NotImplemented('%s must implement _register_settings.' % + __name__) + + @classmethod + def register_setting(cls, section, option, type_cls, default=DefaultValue, + choices=None, domain=None): + """Register a config setting with this type. + + This is a convenience method to populate available settings. It is + typically called in the class's _register_settings() implementation. + + Each setting must have: + + section -- str section to which the setting belongs. This is how + settings are grouped. + + option -- str id for the setting. This must be unique within the + section it appears. + + type -- a ConfigType-derived type defining the type of the setting. + + Each setting has the following optional parameters: + + default -- The default value for the setting. If None (the default) + there is no default. + + choices -- A set of values this setting can hold. Values not in + this set are invalid. + + domain -- Translation domain for this setting. By default, the + domain is the same as the section name. + """ + if not section in cls.config_settings: + cls.config_settings[section] = {} + + if option in cls.config_settings[section]: + raise Exception('Setting has already been registered: %s.%s' % ( + section, option)) + + domain = domain if domain is not None else section + + meta = { + 'short': '%s.short' % option, + 'full': '%s.full' % option, + 'type_cls': type_cls, + 'domain': domain, + 'localedir': cls.config_settings_locale_directory, + } + + if default != DefaultValue: + meta['default'] = default + + if choices is not None: + meta['choices'] = choices + + cls.config_settings[section][option] = meta + + +class ConfigSettings(collections.Mapping): + """Interface for configuration settings. + + This is the main interface to the configuration. + + A configuration is a collection of sections. Each section contains + key-value pairs. + + When an instance is created, the caller first registers ConfigProvider + instances with it. This tells the ConfigSettings what individual settings + are available and defines extra metadata associated with those settings. + This is used for validation, etc. + + Once ConfigProvider instances are registered, a config is populated. It can + be loaded from files or populated by hand. + + ConfigSettings instances are accessed like dictionaries or by using + attributes. e.g. the section "foo" is accessed through either + settings.foo or settings['foo']. + + Sections are modeled by the ConfigSection class which is defined inside + this one. They look just like dicts or classes with attributes. To access + the "bar" option in the "foo" section: + + value = settings.foo.bar + value = settings['foo']['bar'] + value = settings.foo['bar'] + + Assignment is similar: + + settings.foo.bar = value + settings['foo']['bar'] = value + settings['foo'].bar = value + + You can even delete user-assigned values: + + del settings.foo.bar + del settings['foo']['bar'] + + If there is a default, it will be returned. + + When settings are mutated, they are validated against the registered + providers. Setting unknown settings or setting values to illegal values + will result in exceptions being raised. + """ + + class ConfigSection(collections.MutableMapping, object): + """Represents an individual config section.""" + def __init__(self, config, name, settings): + object.__setattr__(self, '_config', config) + object.__setattr__(self, '_name', name) + object.__setattr__(self, '_settings', settings) + + # MutableMapping interface + def __len__(self): + return len(self._settings) + + def __iter__(self): + return iter(self._settings.keys()) + + def __contains__(self, k): + return k in self._settings + + def __getitem__(self, k): + if k not in self._settings: + raise KeyError('Option not registered with provider: %s' % k) + + meta = self._settings[k] + + if self._config.has_option(self._name, k): + return meta['type_cls'].from_config(self._config, self._name, k) + + if not 'default' in meta: + raise KeyError('No default value registered: %s' % k) + + return meta['default'] + + def __setitem__(self, k, v): + if k not in self._settings: + raise KeyError('Option not registered with provider: %s' % k) + + meta = self._settings[k] + + meta['type_cls'].validate(v) + + if not self._config.has_section(self._name): + self._config.add_section(self._name) + + self._config.set(self._name, k, meta['type_cls'].to_config(v)) + + def __delitem__(self, k): + self._config.remove_option(self._name, k) + + # Prune empty sections. + if not len(self._config.options(self._name)): + self._config.remove_section(self._name) + + def __getattr__(self, k): + return self.__getitem__(k) + + def __setattr__(self, k, v): + self.__setitem__(k, v) + + def __delattr__(self, k): + self.__delitem__(k) + + + def __init__(self): + self._config = RawConfigParser() + + self._settings = {} + self._sections = {} + self._finalized = False + self._loaded_filenames = set() + + def load_file(self, filename): + self.load_files([filename]) + + def load_files(self, filenames): + """Load a config from files specified by their paths. + + Files are loaded in the order given. Subsequent files will overwrite + values from previous files. If a file does not exist, it will be + ignored. + """ + filtered = [f for f in filenames if os.path.exists(f)] + + fps = [open(f, 'rt') for f in filtered] + self.load_fps(fps) + self._loaded_filenames.update(set(filtered)) + for fp in fps: + fp.close() + + def load_fps(self, fps): + """Load config data by reading file objects.""" + + for fp in fps: + self._config.readfp(fp) + + def loaded_files(self): + return self._loaded_filenames + + def write(self, fh): + """Write the config to a file object.""" + self._config.write(fh) + + def validate(self): + """Ensure that the current config passes validation. + + This is a generator of tuples describing any validation errors. The + elements of the tuple are: + + (bool) True if error is fatal. False if just a warning. + (str) Type of validation issue. Can be one of ('unknown-section', + 'missing-required', 'type-error') + """ + + def register_provider(self, provider): + """Register a ConfigProvider with this settings interface.""" + + if self._finalized: + raise Exception('Providers cannot be registered after finalized.') + + provider.register_settings() + + for section_name, settings in provider.config_settings.items(): + section = self._settings.get(section_name, {}) + + for k, v in settings.items(): + if k in section: + raise Exception('Setting already registered: %s.%s' % + section_name, k) + + section[k] = v + + self._settings[section_name] = section + + def write_pot(self, fh): + """Write a pot gettext translation file.""" + + for section in sorted(self): + fh.write('# Section %s\n\n' % section) + for option in sorted(self[section]): + fh.write('msgid "%s.%s.short"\n' % (section, option)) + fh.write('msgstr ""\n\n') + + fh.write('msgid "%s.%s.full"\n' % (section, option)) + fh.write('msgstr ""\n\n') + + fh.write('# End of section %s\n\n' % section) + + def option_help(self, section, option): + """Obtain the translated help messages for an option.""" + + meta = self[section]._settings[option] + + # Providers should always have an en-US translation. If they don't, + # they are coded wrong and this will raise. + default = gettext.translation(meta['domain'], meta['localedir'], + ['en-US']) + + t = gettext.translation(meta['domain'], meta['localedir'], + fallback=True) + t.add_fallback(default) + + short = t.ugettext('%s.%s.short' % (section, option)) + full = t.ugettext('%s.%s.full' % (section, option)) + + return (short, full) + + def _finalize(self): + if self._finalized: + return + + for section, settings in self._settings.items(): + s = ConfigSettings.ConfigSection(self._config, section, settings) + self._sections[section] = s + + self._finalized = True + + # Mapping interface. + def __len__(self): + return len(self._settings) + + def __iter__(self): + self._finalize() + + return iter(self._sections.keys()) + + def __contains__(self, k): + return k in self._settings + + def __getitem__(self, k): + self._finalize() + + return self._sections[k] + + # Allow attribute access because it looks nice. + def __getattr__(self, k): + return self.__getitem__(k) diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py new file mode 100644 index 00000000000..cb9a67428e7 --- /dev/null +++ b/python/mach/mach/decorators.py @@ -0,0 +1,176 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +import collections +import inspect +import types + +from .base import ( + MachError, + MethodHandler +) + +from .config import ConfigProvider +from .registrar import Registrar + + +def CommandProvider(cls): + """Class decorator to denote that it provides subcommands for Mach. + + When this decorator is present, mach looks for commands being defined by + methods inside the class. + """ + + # The implementation of this decorator relies on the parse-time behavior of + # decorators. When the module is imported, the method decorators (like + # @Command and @CommandArgument) are called *before* this class decorator. + # The side-effect of the method decorators is to store specifically-named + # attributes on the function types. We just scan over all functions in the + # class looking for the side-effects of the method decorators. + + # Tell mach driver whether to pass context argument to __init__. + pass_context = False + + if inspect.ismethod(cls.__init__): + spec = inspect.getargspec(cls.__init__) + + if len(spec.args) > 2: + msg = 'Mach @CommandProvider class %s implemented incorrectly. ' + \ + '__init__() must take 1 or 2 arguments. From %s' + msg = msg % (cls.__name__, inspect.getsourcefile(cls)) + raise MachError(msg) + + if len(spec.args) == 2: + pass_context = True + + # We scan __dict__ because we only care about the classes own attributes, + # not inherited ones. If we did inherited attributes, we could potentially + # define commands multiple times. We also sort keys so commands defined in + # the same class are grouped in a sane order. + for attr in sorted(cls.__dict__.keys()): + value = cls.__dict__[attr] + + if not isinstance(value, types.FunctionType): + continue + + command_name, category, description, allow_all, conditions, parser = getattr( + value, '_mach_command', (None, None, None, None, None, None)) + + if command_name is None: + continue + + if conditions is None and Registrar.require_conditions: + continue + + msg = 'Mach command \'%s\' implemented incorrectly. ' + \ + 'Conditions argument must take a list ' + \ + 'of functions. Found %s instead.' + + conditions = conditions or [] + if not isinstance(conditions, collections.Iterable): + msg = msg % (command_name, type(conditions)) + raise MachError(msg) + + for c in conditions: + if not hasattr(c, '__call__'): + msg = msg % (command_name, type(c)) + raise MachError(msg) + + arguments = getattr(value, '_mach_command_args', None) + + handler = MethodHandler(cls, attr, command_name, category=category, + description=description, allow_all_arguments=allow_all, + conditions=conditions, parser=parser, arguments=arguments, + pass_context=pass_context) + + Registrar.register_command_handler(handler) + + return cls + + +class Command(object): + """Decorator for functions or methods that provide a mach subcommand. + + The decorator accepts arguments that define basic attributes of the + command. The following arguments are recognized: + + category -- The string category to which this command belongs. Mach's + help will group commands by category. + + description -- A brief description of what the command does. + + allow_all_args -- Bool indicating whether to allow unknown arguments + through to the command. + + parser -- an optional argparse.ArgumentParser instance to use as + the basis for the command arguments. + + For example: + + @Command('foo', category='misc', description='Run the foo action') + def foo(self): + pass + """ + def __init__(self, name, category=None, description=None, + allow_all_args=False, conditions=None, parser=None): + self._name = name + self._category = category + self._description = description + self._allow_all_args = allow_all_args + self._conditions = conditions + self._parser = parser + + def __call__(self, func): + func._mach_command = (self._name, self._category, self._description, + self._allow_all_args, self._conditions, self._parser) + + return func + + +class CommandArgument(object): + """Decorator for additional arguments to mach subcommands. + + This decorator should be used to add arguments to mach commands. Arguments + to the decorator are proxied to ArgumentParser.add_argument(). + + For example: + + @Command('foo', help='Run the foo action') + @CommandArgument('-b', '--bar', action='store_true', default=False, + help='Enable bar mode.') + def foo(self): + pass + """ + def __init__(self, *args, **kwargs): + self._command_args = (args, kwargs) + + def __call__(self, func): + command_args = getattr(func, '_mach_command_args', []) + + command_args.insert(0, self._command_args) + + func._mach_command_args = command_args + + return func + + +def SettingsProvider(cls): + """Class decorator to denote that this class provides Mach settings. + + When this decorator is encountered, the underlying class will automatically + be registered with the Mach registrar and will (likely) be hooked up to the + mach driver. + + This decorator is only allowed on mach.config.ConfigProvider classes. + """ + if not issubclass(cls, ConfigProvider): + raise MachError('@SettingsProvider encountered on class that does ' + + 'not derived from mach.config.ConfigProvider.') + + Registrar.register_settings_provider(cls) + + return cls + diff --git a/python/mach/mach/dispatcher.py b/python/mach/mach/dispatcher.py new file mode 100644 index 00000000000..11e58cb9e2f --- /dev/null +++ b/python/mach/mach/dispatcher.py @@ -0,0 +1,277 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +import argparse +import difflib +import sys + +from operator import itemgetter + +from .base import ( + NoCommandError, + UnknownCommandError, + UnrecognizedArgumentError, +) + + +class CommandFormatter(argparse.HelpFormatter): + """Custom formatter to format just a subcommand.""" + + def add_usage(self, *args): + pass + + +class CommandAction(argparse.Action): + """An argparse action that handles mach commands. + + This class is essentially a reimplementation of argparse's sub-parsers + feature. We first tried to use sub-parsers. However, they were missing + features like grouping of commands (http://bugs.python.org/issue14037). + + The way this works involves light magic and a partial understanding of how + argparse works. + + Arguments registered with an argparse.ArgumentParser have an action + associated with them. An action is essentially a class that when called + does something with the encountered argument(s). This class is one of those + action classes. + + An instance of this class is created doing something like: + + parser.add_argument('command', action=CommandAction, registrar=r) + + Note that a mach.registrar.Registrar instance is passed in. The Registrar + holds information on all the mach commands that have been registered. + + When this argument is registered with the ArgumentParser, an instance of + this class is instantiated. One of the subtle but important things it does + is tell the argument parser that it's interested in *all* of the remaining + program arguments. So, when the ArgumentParser calls this action, we will + receive the command name plus all of its arguments. + + For more, read the docs in __call__. + """ + def __init__(self, option_strings, dest, required=True, default=None, + registrar=None, context=None): + # A proper API would have **kwargs here. However, since we are a little + # hacky, we intentionally omit it as a way of detecting potentially + # breaking changes with argparse's implementation. + # + # In a similar vein, default is passed in but is not needed, so we drop + # it. + argparse.Action.__init__(self, option_strings, dest, required=required, + help=argparse.SUPPRESS, nargs=argparse.REMAINDER) + + self._mach_registrar = registrar + self._context = context + + def __call__(self, parser, namespace, values, option_string=None): + """This is called when the ArgumentParser has reached our arguments. + + Since we always register ourselves with nargs=argparse.REMAINDER, + values should be a list of remaining arguments to parse. The first + argument should be the name of the command to invoke and all remaining + arguments are arguments for that command. + + The gist of the flow is that we look at the command being invoked. If + it's *help*, we handle that specially (because argparse's default help + handler isn't satisfactory). Else, we create a new, independent + ArgumentParser instance for just the invoked command (based on the + information contained in the command registrar) and feed the arguments + into that parser. We then merge the results with the main + ArgumentParser. + """ + if namespace.help: + # -h or --help is in the global arguments. + self._handle_main_help(parser, namespace.verbose) + sys.exit(0) + elif values: + command = values[0].lower() + args = values[1:] + + if command == 'help': + if args and args[0] not in ['-h', '--help']: + # Make sure args[0] is indeed a command. + self._handle_subcommand_help(parser, args[0]) + else: + self._handle_main_help(parser, namespace.verbose) + sys.exit(0) + elif '-h' in args or '--help' in args: + # -h or --help is in the command arguments. + self._handle_subcommand_help(parser, command) + sys.exit(0) + else: + raise NoCommandError() + + # Command suggestion + if command not in self._mach_registrar.command_handlers: + # We first try to look for a valid command that is very similar to the given command. + suggested_commands = difflib.get_close_matches(command, self._mach_registrar.command_handlers.keys(), cutoff=0.8) + # If we find more than one matching command, or no command at all, we give command suggestions instead + # (with a lower matching threshold). All commands that start with the given command (for instance: 'mochitest-plain', + # 'mochitest-chrome', etc. for 'mochitest-') are also included. + if len(suggested_commands) != 1: + suggested_commands = set(difflib.get_close_matches(command, self._mach_registrar.command_handlers.keys(), cutoff=0.5)) + suggested_commands |= {cmd for cmd in self._mach_registrar.command_handlers if cmd.startswith(command)} + raise UnknownCommandError(command, 'run', suggested_commands) + sys.stderr.write("We're assuming the '%s' command is '%s' and we're executing it for you.\n\n" % (command, suggested_commands[0])) + command = suggested_commands[0] + + handler = self._mach_registrar.command_handlers.get(command) + + # FUTURE + # If we wanted to conditionally enable commands based on whether + # it's possible to run them given the current state of system, here + # would be a good place to hook that up. + + # We create a new parser, populate it with the command's arguments, + # then feed all remaining arguments to it, merging the results + # with ourselves. This is essentially what argparse subparsers + # do. + + parser_args = { + 'add_help': False, + 'usage': '%(prog)s [global arguments] ' + command + + ' command arguments]', + } + + if handler.allow_all_arguments: + parser_args['prefix_chars'] = '+' + + if handler.parser: + subparser = handler.parser + else: + subparser = argparse.ArgumentParser(**parser_args) + + for arg in handler.arguments: + subparser.add_argument(*arg[0], **arg[1]) + + # We define the command information on the main parser result so as to + # not interfere with arguments passed to the command. + setattr(namespace, 'mach_handler', handler) + setattr(namespace, 'command', command) + + command_namespace, extra = subparser.parse_known_args(args) + setattr(namespace, 'command_args', command_namespace) + if extra: + raise UnrecognizedArgumentError(command, extra) + + def _handle_main_help(self, parser, verbose): + # Since we don't need full sub-parser support for the main help output, + # we create groups in the ArgumentParser and populate each group with + # arguments corresponding to command names. This has the side-effect + # that argparse renders it nicely. + r = self._mach_registrar + disabled_commands = [] + + cats = [(k, v[2]) for k, v in r.categories.items()] + sorted_cats = sorted(cats, key=itemgetter(1), reverse=True) + for category, priority in sorted_cats: + group = None + + for command in sorted(r.commands_by_category[category]): + handler = r.command_handlers[command] + + # Instantiate a handler class to see if it should be filtered + # out for the current context or not. Condition functions can be + # applied to the command's decorator. + if handler.conditions: + if handler.pass_context: + instance = handler.cls(self._context) + else: + instance = handler.cls() + + is_filtered = False + for c in handler.conditions: + if not c(instance): + is_filtered = True + break + if is_filtered: + description = handler.description + disabled_command = {'command': command, 'description': description} + disabled_commands.append(disabled_command) + continue + + if group is None: + title, description, _priority = r.categories[category] + group = parser.add_argument_group(title, description) + + description = handler.description + group.add_argument(command, help=description, + action='store_true') + + if disabled_commands and 'disabled' in r.categories: + title, description, _priority = r.categories['disabled'] + group = parser.add_argument_group(title, description) + if verbose == True: + for c in disabled_commands: + group.add_argument(c['command'], help=c['description'], + action='store_true') + + parser.print_help() + + def _handle_subcommand_help(self, parser, command): + handler = self._mach_registrar.command_handlers.get(command) + + if not handler: + raise UnknownCommandError(command, 'query') + + # This code is worth explaining. Because we are doing funky things with + # argument registration to allow the same option in both global and + # command arguments, we can't simply put all arguments on the same + # parser instance because argparse would complain. We can't register an + # argparse subparser here because it won't properly show help for + # global arguments. So, we employ a strategy similar to command + # execution where we construct a 2nd, independent ArgumentParser for + # just the command data then supplement the main help's output with + # this 2nd parser's. We use a custom formatter class to ignore some of + # the help output. + parser_args = { + 'formatter_class': CommandFormatter, + 'add_help': False, + } + + if handler.allow_all_arguments: + parser_args['prefix_chars'] = '+' + + if handler.parser: + c_parser = handler.parser + c_parser.formatter_class = NoUsageFormatter + # Accessing _action_groups is a bit shady. We are highly dependent + # on the argparse implementation not changing. We fail fast to + # detect upstream changes so we can intelligently react to them. + group = c_parser._action_groups[1] + + # By default argparse adds two groups called "positional arguments" + # and "optional arguments". We want to rename these to reflect standard + # mach terminology. + c_parser._action_groups[0].title = 'Command Parameters' + c_parser._action_groups[1].title = 'Command Arguments' + + if not handler.description: + handler.description = c_parser.description + c_parser.description = None + else: + c_parser = argparse.ArgumentParser(**parser_args) + group = c_parser.add_argument_group('Command Arguments') + + for arg in handler.arguments: + group.add_argument(*arg[0], **arg[1]) + + # This will print the description of the command below the usage. + description = handler.description + if description: + parser.description = description + + parser.usage = '%(prog)s [global arguments] ' + command + \ + ' [command arguments]' + parser.print_help() + print('') + c_parser.print_help() + +class NoUsageFormatter(argparse.HelpFormatter): + def _format_usage(self, *args, **kwargs): + return "" diff --git a/python/mach/mach/logging.py b/python/mach/mach/logging.py new file mode 100644 index 00000000000..729e6cb3d93 --- /dev/null +++ b/python/mach/mach/logging.py @@ -0,0 +1,256 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# This file contains logging functionality for mach. It essentially provides +# support for a structured logging framework built on top of Python's built-in +# logging framework. + +from __future__ import absolute_import, unicode_literals + +try: + import blessings +except ImportError: + blessings = None + +import json +import logging +import sys +import time + + +def format_seconds(total): + """Format number of seconds to MM:SS.DD form.""" + + minutes, seconds = divmod(total, 60) + + return '%2d:%05.2f' % (minutes, seconds) + + +class ConvertToStructuredFilter(logging.Filter): + """Filter that converts unstructured records into structured ones.""" + def filter(self, record): + if hasattr(record, 'action') and hasattr(record, 'params'): + return True + + record.action = 'unstructured' + record.params = {'msg': record.getMessage()} + record.msg = '{msg}' + + return True + + +class StructuredJSONFormatter(logging.Formatter): + """Log formatter that writes a structured JSON entry.""" + + def format(self, record): + action = getattr(record, 'action', 'UNKNOWN') + params = getattr(record, 'params', {}) + + return json.dumps([record.created, action, params]) + + +class StructuredHumanFormatter(logging.Formatter): + """Log formatter that writes structured messages for humans. + + It is important that this formatter never be added to a logger that + produces unstructured/classic log messages. If it is, the call to format() + could fail because the string could contain things (like JSON) that look + like formatting character sequences. + + Because of this limitation, format() will fail with a KeyError if an + unstructured record is passed or if the structured message is malformed. + """ + def __init__(self, start_time, write_interval=False, write_times=True): + self.start_time = start_time + self.write_interval = write_interval + self.write_times = write_times + self.last_time = None + + def format(self, record): + f = record.msg.format(**record.params) + + if not self.write_times: + return f + + elapsed = self._time(record) + + return '%s %s' % (format_seconds(elapsed), f) + + def _time(self, record): + t = record.created - self.start_time + + if self.write_interval and self.last_time is not None: + t = record.created - self.last_time + + self.last_time = record.created + + return t + + +class StructuredTerminalFormatter(StructuredHumanFormatter): + """Log formatter for structured messages writing to a terminal.""" + + def set_terminal(self, terminal): + self.terminal = terminal + + def format(self, record): + f = record.msg.format(**record.params) + + if not self.write_times: + return f + + t = self.terminal.blue(format_seconds(self._time(record))) + + return '%s %s' % (t, self._colorize(f)) + + def _colorize(self, s): + if not self.terminal: + return s + + result = s + + reftest = s.startswith('REFTEST ') + if reftest: + s = s[8:] + + if s.startswith('TEST-PASS'): + result = self.terminal.green(s[0:9]) + s[9:] + elif s.startswith('TEST-UNEXPECTED'): + result = self.terminal.red(s[0:20]) + s[20:] + elif s.startswith('TEST-START'): + result = self.terminal.yellow(s[0:10]) + s[10:] + elif s.startswith('TEST-INFO'): + result = self.terminal.yellow(s[0:9]) + s[9:] + + if reftest: + result = 'REFTEST ' + result + + return result + + +class LoggingManager(object): + """Holds and controls global logging state. + + An application should instantiate one of these and configure it as needed. + + This class provides a mechanism to configure the output of logging data + both from mach and from the overall logging system (e.g. from other + modules). + """ + + def __init__(self): + self.start_time = time.time() + + self.json_handlers = [] + self.terminal_handler = None + self.terminal_formatter = None + + self.root_logger = logging.getLogger() + self.root_logger.setLevel(logging.DEBUG) + + # Installing NullHandler on the root logger ensures that *all* log + # messages have at least one handler. This prevents Python from + # complaining about "no handlers could be found for logger XXX." + self.root_logger.addHandler(logging.NullHandler()) + + self.mach_logger = logging.getLogger('mach') + self.mach_logger.setLevel(logging.DEBUG) + + self.structured_filter = ConvertToStructuredFilter() + + self.structured_loggers = [self.mach_logger] + + self._terminal = None + + @property + def terminal(self): + if not self._terminal and blessings: + # Sometimes blessings fails to set up the terminal. In that case, + # silently fail. + try: + terminal = blessings.Terminal(stream=sys.stdout) + + if terminal.is_a_tty: + self._terminal = terminal + except Exception: + pass + + return self._terminal + + def add_json_handler(self, fh): + """Enable JSON logging on the specified file object.""" + + # Configure the consumer of structured messages. + handler = logging.StreamHandler(stream=fh) + handler.setFormatter(StructuredJSONFormatter()) + handler.setLevel(logging.DEBUG) + + # And hook it up. + for logger in self.structured_loggers: + logger.addHandler(handler) + + self.json_handlers.append(handler) + + def add_terminal_logging(self, fh=sys.stdout, level=logging.INFO, + write_interval=False, write_times=True): + """Enable logging to the terminal.""" + + formatter = StructuredHumanFormatter(self.start_time, + write_interval=write_interval, write_times=write_times) + + if self.terminal: + formatter = StructuredTerminalFormatter(self.start_time, + write_interval=write_interval, write_times=write_times) + formatter.set_terminal(self.terminal) + + handler = logging.StreamHandler(stream=fh) + handler.setFormatter(formatter) + handler.setLevel(level) + + for logger in self.structured_loggers: + logger.addHandler(handler) + + self.terminal_handler = handler + self.terminal_formatter = formatter + + def replace_terminal_handler(self, handler): + """Replace the installed terminal handler. + + Returns the old handler or None if none was configured. + If the new handler is None, removes any existing handler and disables + logging to the terminal. + """ + old = self.terminal_handler + + if old: + for logger in self.structured_loggers: + logger.removeHandler(old) + + if handler: + for logger in self.structured_loggers: + logger.addHandler(handler) + + self.terminal_handler = handler + + return old + + def enable_unstructured(self): + """Enable logging of unstructured messages.""" + if self.terminal_handler: + self.terminal_handler.addFilter(self.structured_filter) + self.root_logger.addHandler(self.terminal_handler) + + def disable_unstructured(self): + """Disable logging of unstructured messages.""" + if self.terminal_handler: + self.terminal_handler.removeFilter(self.structured_filter) + self.root_logger.removeHandler(self.terminal_handler) + + def register_structured_logger(self, logger): + """Register a structured logger. + + This needs to be called for all structured loggers that don't chain up + to the mach logger in order for their output to be captured. + """ + self.structured_loggers.append(logger) diff --git a/python/mach/mach/main.py b/python/mach/mach/main.py new file mode 100644 index 00000000000..3c74bd51333 --- /dev/null +++ b/python/mach/mach/main.py @@ -0,0 +1,615 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# This module provides functionality for the command-line build tool +# (mach). It is packaged as a module because everything is a library. + +from __future__ import absolute_import, print_function, unicode_literals +from collections import Iterable + +import argparse +import codecs +import imp +import logging +import os +import sys +import traceback +import uuid +import sys + +from .base import ( + CommandContext, + MachError, + NoCommandError, + UnknownCommandError, + UnrecognizedArgumentError, +) + +from .decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from .config import ConfigSettings +from .dispatcher import CommandAction +from .logging import LoggingManager +from .registrar import Registrar + + + +MACH_ERROR = r''' +The error occurred in mach itself. This is likely a bug in mach itself or a +fundamental problem with a loaded module. + +Please consider filing a bug against mach by going to the URL: + + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach + +'''.lstrip() + +ERROR_FOOTER = r''' +If filing a bug, please include the full output of mach, including this error +message. + +The details of the failure are as follows: +'''.lstrip() + +COMMAND_ERROR = r''' +The error occurred in the implementation of the invoked mach command. + +This should never occur and is likely a bug in the implementation of that +command. Consider filing a bug for this issue. +'''.lstrip() + +MODULE_ERROR = r''' +The error occurred in code that was called by the mach command. This is either +a bug in the called code itself or in the way that mach is calling it. + +You should consider filing a bug for this issue. +'''.lstrip() + +NO_COMMAND_ERROR = r''' +It looks like you tried to run mach without a command. + +Run |mach help| to show a list of commands. +'''.lstrip() + +UNKNOWN_COMMAND_ERROR = r''' +It looks like you are trying to %s an unknown mach command: %s +%s +Run |mach help| to show a list of commands. +'''.lstrip() + +SUGGESTED_COMMANDS_MESSAGE = r''' +Did you want to %s any of these commands instead: %s? +''' + +UNRECOGNIZED_ARGUMENT_ERROR = r''' +It looks like you passed an unrecognized argument into mach. + +The %s command does not accept the arguments: %s +'''.lstrip() + +INVALID_COMMAND_CONTEXT = r''' +It looks like you tried to run a mach command from an invalid context. The %s +command failed to meet the following conditions: %s + +Run |mach help| to show a list of all commands available to the current context. +'''.lstrip() + +INVALID_ENTRY_POINT = r''' +Entry points should return a list of command providers or directories +containing command providers. The following entry point is invalid: + + %s + +You are seeing this because there is an error in an external module attempting +to implement a mach command. Please fix the error, or uninstall the module from +your system. +'''.lstrip() + +class ArgumentParser(argparse.ArgumentParser): + """Custom implementation argument parser to make things look pretty.""" + + def error(self, message): + """Custom error reporter to give more helpful text on bad commands.""" + if not message.startswith('argument command: invalid choice'): + argparse.ArgumentParser.error(self, message) + assert False + + print('Invalid command specified. The list of commands is below.\n') + self.print_help() + sys.exit(1) + + def format_help(self): + text = argparse.ArgumentParser.format_help(self) + + # Strip out the silly command list that would preceed the pretty list. + # + # Commands: + # {foo,bar} + # foo Do foo. + # bar Do bar. + search = 'Commands:\n {' + start = text.find(search) + + if start != -1: + end = text.find('}\n', start) + assert end != -1 + + real_start = start + len('Commands:\n') + real_end = end + len('}\n') + + text = text[0:real_start] + text[real_end:] + + return text + + +class ContextWrapper(object): + def __init__(self, context, handler): + object.__setattr__(self, '_context', context) + object.__setattr__(self, '_handler', handler) + + def __getattribute__(self, key): + try: + return getattr(object.__getattribute__(self, '_context'), key) + except AttributeError as e: + try: + ret = object.__getattribute__(self, '_handler')(self, key) + except AttributeError, TypeError: + # TypeError is in case the handler comes from old code not + # taking a key argument. + raise e + setattr(self, key, ret) + return ret + + def __setattr__(self, key, value): + setattr(object.__getattribute__(self, '_context'), key, value) + + +@CommandProvider +class Mach(object): + """Main mach driver type. + + This type is responsible for holding global mach state and dispatching + a command from arguments. + + The following attributes may be assigned to the instance to influence + behavior: + + populate_context_handler -- If defined, it must be a callable. The + callable signature is the following: + populate_context_handler(context, key=None) + It acts as a fallback getter for the mach.base.CommandContext + instance. + This allows to augment the context instance with arbitrary data + for use in command handlers. + For backwards compatibility, it is also called before command + dispatch without a key, allowing the context handler to add + attributes to the context instance. + + require_conditions -- If True, commands that do not have any condition + functions applied will be skipped. Defaults to False. + + """ + + USAGE = """%(prog)s [global arguments] command [command arguments] + +mach (German for "do") is the main interface to the Mozilla build system and +common developer tasks. + +You tell mach the command you want to perform and it does it for you. + +Some common commands are: + + %(prog)s build Build/compile the source tree. + %(prog)s help Show full help, including the list of all commands. + +To see more help for a specific command, run: + + %(prog)s help +""" + + def __init__(self, cwd): + assert os.path.isdir(cwd) + + self.cwd = cwd + self.log_manager = LoggingManager() + self.logger = logging.getLogger(__name__) + self.settings = ConfigSettings() + + self.log_manager.register_structured_logger(self.logger) + self.global_arguments = [] + self.populate_context_handler = None + + def add_global_argument(self, *args, **kwargs): + """Register a global argument with the argument parser. + + Arguments are proxied to ArgumentParser.add_argument() + """ + + self.global_arguments.append((args, kwargs)) + + def load_commands_from_directory(self, path): + """Scan for mach commands from modules in a directory. + + This takes a path to a directory, loads the .py files in it, and + registers and found mach command providers with this mach instance. + """ + for f in sorted(os.listdir(path)): + if not f.endswith('.py') or f == '__init__.py': + continue + + full_path = os.path.join(path, f) + module_name = 'mach.commands.%s' % f[0:-3] + + self.load_commands_from_file(full_path, module_name=module_name) + + def load_commands_from_file(self, path, module_name=None): + """Scan for mach commands from a file. + + This takes a path to a file and loads it as a Python module under the + module name specified. If no name is specified, a random one will be + chosen. + """ + if module_name is None: + # Ensure parent module is present otherwise we'll (likely) get + # an error due to unknown parent. + if b'mach.commands' not in sys.modules: + mod = imp.new_module(b'mach.commands') + sys.modules[b'mach.commands'] = mod + + module_name = 'mach.commands.%s' % uuid.uuid1().get_hex() + + imp.load_source(module_name, path) + + def load_commands_from_entry_point(self, group='mach.providers'): + """Scan installed packages for mach command provider entry points. An + entry point is a function that returns a list of paths to files or + directories containing command providers. + + This takes an optional group argument which specifies the entry point + group to use. If not specified, it defaults to 'mach.providers'. + """ + try: + import pkg_resources + except ImportError: + print("Could not find setuptools, ignoring command entry points", + file=sys.stderr) + return + + for entry in pkg_resources.iter_entry_points(group=group, name=None): + paths = entry.load()() + if not isinstance(paths, Iterable): + print(INVALID_ENTRY_POINT % entry) + sys.exit(1) + + for path in paths: + if os.path.isfile(path): + self.load_commands_from_file(path) + elif os.path.isdir(path): + self.load_commands_from_directory(path) + else: + print("command provider '%s' does not exist" % path) + + def define_category(self, name, title, description, priority=50): + """Provide a description for a named command category.""" + + Registrar.register_category(name, title, description, priority) + + @property + def require_conditions(self): + return Registrar.require_conditions + + @require_conditions.setter + def require_conditions(self, value): + Registrar.require_conditions = value + + def run(self, argv, stdin=None, stdout=None, stderr=None): + """Runs mach with arguments provided from the command line. + + Returns the integer exit code that should be used. 0 means success. All + other values indicate failure. + """ + + # If no encoding is defined, we default to UTF-8 because without this + # Python 2.7 will assume the default encoding of ASCII. This will blow + # up with UnicodeEncodeError as soon as it encounters a non-ASCII + # character in a unicode instance. We simply install a wrapper around + # the streams and restore once we have finished. + stdin = sys.stdin if stdin is None else stdin + stdout = sys.stdout if stdout is None else stdout + stderr = sys.stderr if stderr is None else stderr + + orig_stdin = sys.stdin + orig_stdout = sys.stdout + orig_stderr = sys.stderr + + sys.stdin = stdin + sys.stdout = stdout + sys.stderr = stderr + + try: + if stdin.encoding is None: + sys.stdin = codecs.getreader('utf-8')(stdin) + + if stdout.encoding is None: + sys.stdout = codecs.getwriter('utf-8')(stdout) + + if stderr.encoding is None: + sys.stderr = codecs.getwriter('utf-8')(stderr) + + return self._run(argv) + except KeyboardInterrupt: + print('mach interrupted by signal or user action. Stopping.') + return 1 + + except Exception as e: + # _run swallows exceptions in invoked handlers and converts them to + # a proper exit code. So, the only scenario where we should get an + # exception here is if _run itself raises. If _run raises, that's a + # bug in mach (or a loaded command module being silly) and thus + # should be reported differently. + self._print_error_header(argv, sys.stdout) + print(MACH_ERROR) + + exc_type, exc_value, exc_tb = sys.exc_info() + stack = traceback.extract_tb(exc_tb) + + self._print_exception(sys.stdout, exc_type, exc_value, stack) + + return 1 + + finally: + sys.stdin = orig_stdin + sys.stdout = orig_stdout + sys.stderr = orig_stderr + + def _run(self, argv): + context = CommandContext(cwd=self.cwd, + settings=self.settings, log_manager=self.log_manager, + commands=Registrar) + + if self.populate_context_handler: + self.populate_context_handler(context) + context = ContextWrapper(context, self.populate_context_handler) + + parser = self.get_argument_parser(context) + + if not len(argv): + # We don't register the usage until here because if it is globally + # registered, argparse always prints it. This is not desired when + # running with --help. + parser.usage = Mach.USAGE + parser.print_usage() + return 0 + + try: + args = parser.parse_args(argv) + except NoCommandError: + print(NO_COMMAND_ERROR) + return 1 + except UnknownCommandError as e: + suggestion_message = SUGGESTED_COMMANDS_MESSAGE % (e.verb, ', '.join(e.suggested_commands)) if e.suggested_commands else '' + print(UNKNOWN_COMMAND_ERROR % (e.verb, e.command, suggestion_message)) + return 1 + except UnrecognizedArgumentError as e: + print(UNRECOGNIZED_ARGUMENT_ERROR % (e.command, + ' '.join(e.arguments))) + return 1 + + # Add JSON logging to a file if requested. + if args.logfile: + self.log_manager.add_json_handler(args.logfile) + + # Up the logging level if requested. + log_level = logging.INFO + if args.verbose: + log_level = logging.DEBUG + + self.log_manager.register_structured_logger(logging.getLogger('mach')) + + write_times = True + if args.log_no_times or 'MACH_NO_WRITE_TIMES' in os.environ: + write_times = False + + # Always enable terminal logging. The log manager figures out if we are + # actually in a TTY or are a pipe and does the right thing. + self.log_manager.add_terminal_logging(level=log_level, + write_interval=args.log_interval, write_times=write_times) + + self.load_settings(args) + + if not hasattr(args, 'mach_handler'): + raise MachError('ArgumentParser result missing mach handler info.') + + handler = getattr(args, 'mach_handler') + cls = handler.cls + + if handler.pass_context: + instance = cls(context) + else: + instance = cls() + + if handler.conditions: + fail_conditions = [] + for c in handler.conditions: + if not c(instance): + fail_conditions.append(c) + + if fail_conditions: + print(self._condition_failed_message(handler.name, fail_conditions)) + return 1 + + fn = getattr(instance, handler.method) + + try: + result = fn(**vars(args.command_args)) + + if not result: + result = 0 + + assert isinstance(result, (int, long)) + + return result + except KeyboardInterrupt as ki: + raise ki + except Exception as e: + exc_type, exc_value, exc_tb = sys.exc_info() + + # The first frame is us and is never used. + stack = traceback.extract_tb(exc_tb)[1:] + + # If we have nothing on the stack, the exception was raised as part + # of calling the @Command method itself. This likely means a + # mismatch between @CommandArgument and arguments to the method. + # e.g. there exists a @CommandArgument without the corresponding + # argument on the method. We handle that here until the module + # loader grows the ability to validate better. + if not len(stack): + print(COMMAND_ERROR) + self._print_exception(sys.stdout, exc_type, exc_value, + traceback.extract_tb(exc_tb)) + return 1 + + # Split the frames into those from the module containing the + # command and everything else. + command_frames = [] + other_frames = [] + + initial_file = stack[0][0] + + for frame in stack: + if frame[0] == initial_file: + command_frames.append(frame) + else: + other_frames.append(frame) + + # If the exception was in the module providing the command, it's + # likely the bug is in the mach command module, not something else. + # If there are other frames, the bug is likely not the mach + # command's fault. + self._print_error_header(argv, sys.stdout) + + if len(other_frames): + print(MODULE_ERROR) + else: + print(COMMAND_ERROR) + + self._print_exception(sys.stdout, exc_type, exc_value, stack) + + return 1 + + def log(self, level, action, params, format_str): + """Helper method to record a structured log event.""" + self.logger.log(level, format_str, + extra={'action': action, 'params': params}) + + @classmethod + def _condition_failed_message(cls, name, conditions): + msg = ['\n'] + for c in conditions: + part = [' %s' % c.__name__] + if c.__doc__ is not None: + part.append(c.__doc__) + msg.append(' - '.join(part)) + return INVALID_COMMAND_CONTEXT % (name, '\n'.join(msg)) + + def _print_error_header(self, argv, fh): + fh.write('Error running mach:\n\n') + fh.write(' ') + fh.write(repr(argv)) + fh.write('\n\n') + + def _print_exception(self, fh, exc_type, exc_value, stack): + fh.write(ERROR_FOOTER) + fh.write('\n') + + for l in traceback.format_exception_only(exc_type, exc_value): + fh.write(l) + + fh.write('\n') + for l in traceback.format_list(stack): + fh.write(l) + + def load_settings(self, args): + """Determine which settings files apply and load them. + + Currently, we only support loading settings from a single file. + Ideally, we support loading from multiple files. This is supported by + the ConfigSettings API. However, that API currently doesn't track where + individual values come from, so if we load from multiple sources then + save, we effectively do a full copy. We don't want this. Until + ConfigSettings does the right thing, we shouldn't expose multi-file + loading. + + We look for a settings file in the following locations. The first one + found wins: + + 1) Command line argument + 2) Environment variable + 3) Default path + """ + # Settings are disabled until integration with command providers is + # worked out. + self.settings = None + return False + + for provider in Registrar.settings_providers: + provider.register_settings() + self.settings.register_provider(provider) + + p = os.path.join(self.cwd, 'mach.ini') + + if args.settings_file: + p = args.settings_file + elif 'MACH_SETTINGS_FILE' in os.environ: + p = os.environ['MACH_SETTINGS_FILE'] + + self.settings.load_file(p) + + return os.path.exists(p) + + def get_argument_parser(self, context): + """Returns an argument parser for the command-line interface.""" + + parser = ArgumentParser(add_help=False, + usage='%(prog)s [global arguments] command [command arguments]') + + # Order is important here as it dictates the order the auto-generated + # help messages are printed. + global_group = parser.add_argument_group('Global Arguments') + + #global_group.add_argument('--settings', dest='settings_file', + # metavar='FILENAME', help='Path to settings file.') + + global_group.add_argument('-v', '--verbose', dest='verbose', + action='store_true', default=False, + help='Print verbose output.') + global_group.add_argument('-l', '--log-file', dest='logfile', + metavar='FILENAME', type=argparse.FileType('ab'), + help='Filename to write log data to.') + global_group.add_argument('--log-interval', dest='log_interval', + action='store_true', default=False, + help='Prefix log line with interval from last message rather ' + 'than relative time. Note that this is NOT execution time ' + 'if there are parallel operations.') + global_group.add_argument('--log-no-times', dest='log_no_times', + action='store_true', default=False, + help='Do not prefix log lines with times. By default, mach will ' + 'prefix each output line with the time since command start.') + global_group.add_argument('-h', '--help', dest='help', + action='store_true', default=False, + help='Show this help message.') + + for args, kwargs in self.global_arguments: + global_group.add_argument(*args, **kwargs) + + # We need to be last because CommandAction swallows all remaining + # arguments and argparse parses arguments in the order they were added. + parser.add_argument('command', action=CommandAction, + registrar=Registrar, context=context) + + return parser diff --git a/python/mach/mach/mixin/__init__.py b/python/mach/mach/mixin/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/mach/mach/mixin/logging.py b/python/mach/mach/mixin/logging.py new file mode 100644 index 00000000000..5c37b54f1bd --- /dev/null +++ b/python/mach/mach/mixin/logging.py @@ -0,0 +1,55 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import absolute_import, unicode_literals + +import logging + + +class LoggingMixin(object): + """Provides functionality to control logging.""" + + def populate_logger(self, name=None): + """Ensure this class instance has a logger associated with it. + + Users of this mixin that call log() will need to ensure self._logger is + a logging.Logger instance before they call log(). This function ensures + self._logger is defined by populating it if it isn't. + """ + if hasattr(self, '_logger'): + return + + if name is None: + name = '.'.join([self.__module__, self.__class__.__name__]) + + self._logger = logging.getLogger(name) + + def log(self, level, action, params, format_str): + """Log a structured log event. + + A structured log event consists of a logging level, a string action, a + dictionary of attributes, and a formatting string. + + The logging level is one of the logging.* constants, such as + logging.INFO. + + The action string is essentially the enumeration of the event. Each + different type of logged event should have a different action. + + The params dict is the metadata constituting the logged event. + + The formatting string is used to convert the structured message back to + human-readable format. Conversion back to human-readable form is + performed by calling format() on this string, feeding into it the dict + of attributes constituting the event. + + Example Usage + ------------- + + self.log(logging.DEBUG, 'login', {'username': 'johndoe'}, + 'User login: {username}') + """ + self._logger.log(level, format_str, + extra={'action': action, 'params': params}) + diff --git a/python/mach/mach/mixin/process.py b/python/mach/mach/mixin/process.py new file mode 100644 index 00000000000..5b06da3b60e --- /dev/null +++ b/python/mach/mach/mixin/process.py @@ -0,0 +1,175 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# This module provides mixins to perform process execution. + +from __future__ import absolute_import, unicode_literals + +import logging +import os +import subprocess +import sys + +from mozprocess.processhandler import ProcessHandlerMixin + +from .logging import LoggingMixin + + +# Perform detection of operating system environment. This is used by command +# execution. We only do this once to save redundancy. Yes, this can fail module +# loading. That is arguably OK. +if 'SHELL' in os.environ: + _current_shell = os.environ['SHELL'] +elif 'MOZILLABUILD' in os.environ: + _current_shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe' +elif 'COMSPEC' in os.environ: + _current_shell = os.environ['COMSPEC'] +else: + raise Exception('Could not detect environment shell!') + +_in_msys = False + +if os.environ.get('MSYSTEM', None) == 'MINGW32': + _in_msys = True + + if not _current_shell.lower().endswith('.exe'): + _current_shell += '.exe' + + +class ProcessExecutionMixin(LoggingMixin): + """Mix-in that provides process execution functionality.""" + + def run_process(self, args=None, cwd=None, append_env=None, + explicit_env=None, log_name=None, log_level=logging.INFO, + line_handler=None, require_unix_environment=False, + ensure_exit_code=0, ignore_children=False, pass_thru=False): + """Runs a single process to completion. + + Takes a list of arguments to run where the first item is the + executable. Runs the command in the specified directory and + with optional environment variables. + + append_env -- Dict of environment variables to append to the current + set of environment variables. + explicit_env -- Dict of environment variables to set for the new + process. Any existing environment variables will be ignored. + + require_unix_environment if True will ensure the command is executed + within a UNIX environment. Basically, if we are on Windows, it will + execute the command via an appropriate UNIX-like shell. + + ignore_children is proxied to mozprocess's ignore_children. + + ensure_exit_code is used to ensure the exit code of a process matches + what is expected. If it is an integer, we raise an Exception if the + exit code does not match this value. If it is True, we ensure the exit + code is 0. If it is False, we don't perform any exit code validation. + + pass_thru is a special execution mode where the child process inherits + this process's standard file handles (stdin, stdout, stderr) as well as + additional file descriptors. It should be used for interactive processes + where buffering from mozprocess could be an issue. pass_thru does not + use mozprocess. Therefore, arguments like log_name, line_handler, + and ignore_children have no effect. + """ + args = self._normalize_command(args, require_unix_environment) + + self.log(logging.INFO, 'new_process', {'args': args}, ' '.join(args)) + + def handleLine(line): + # Converts str to unicode on Python 2 and bytes to str on Python 3. + if isinstance(line, bytes): + line = line.decode(sys.stdout.encoding or 'utf-8', 'replace') + + if line_handler: + line_handler(line) + + if not log_name: + return + + self.log(log_level, log_name, {'line': line.rstrip()}, '{line}') + + use_env = {} + if explicit_env: + use_env = explicit_env + else: + use_env.update(os.environ) + + if append_env: + use_env.update(append_env) + + self.log(logging.DEBUG, 'process', {'env': use_env}, 'Environment: {env}') + + # There is a bug in subprocess where it doesn't like unicode types in + # environment variables. Here, ensure all unicode are converted to + # binary. utf-8 is our globally assumed default. If the caller doesn't + # want UTF-8, they shouldn't pass in a unicode instance. + normalized_env = {} + for k, v in use_env.items(): + if isinstance(k, unicode): + k = k.encode('utf-8', 'strict') + + if isinstance(v, unicode): + v = v.encode('utf-8', 'strict') + + normalized_env[k] = v + + use_env = normalized_env + + if pass_thru: + proc = subprocess.Popen(args, cwd=cwd, env=use_env) + status = None + # Leave it to the subprocess to handle Ctrl+C. If it terminates as + # a result of Ctrl+C, proc.wait() will return a status code, and, + # we get out of the loop. If it doesn't, like e.g. gdb, we continue + # waiting. + while status is None: + try: + status = proc.wait() + except KeyboardInterrupt: + pass + else: + p = ProcessHandlerMixin(args, cwd=cwd, env=use_env, + processOutputLine=[handleLine], universal_newlines=True, + ignore_children=ignore_children) + p.run() + p.processOutput() + status = p.wait() + + if ensure_exit_code is False: + return status + + if ensure_exit_code is True: + ensure_exit_code = 0 + + if status != ensure_exit_code: + raise Exception('Process executed with non-0 exit code: %s' % args) + + return status + + def _normalize_command(self, args, require_unix_environment): + """Adjust command arguments to run in the necessary environment. + + This exists mainly to facilitate execution of programs requiring a *NIX + shell when running on Windows. The caller specifies whether a shell + environment is required. If it is and we are running on Windows but + aren't running in the UNIX-like msys environment, then we rewrite the + command to execute via a shell. + """ + assert isinstance(args, list) and len(args) + + if not require_unix_environment or not _in_msys: + return args + + # Always munge Windows-style into Unix style for the command. + prog = args[0].replace('\\', '/') + + # PyMake removes the C: prefix. But, things seem to work here + # without it. Not sure what that's about. + + # We run everything through the msys shell. We need to use + # '-c' and pass all the arguments as one argument because that is + # how sh works. + cline = subprocess.list2cmdline([prog] + args[1:]) + return [_current_shell, '-c', cline] diff --git a/python/mach/mach/registrar.py b/python/mach/mach/registrar.py new file mode 100644 index 00000000000..a2de24b2d04 --- /dev/null +++ b/python/mach/mach/registrar.py @@ -0,0 +1,65 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +from .base import MachError + + +class MachRegistrar(object): + """Container for mach command and config providers.""" + + def __init__(self): + self.command_handlers = {} + self.commands_by_category = {} + self.settings_providers = set() + self.categories = {} + self.require_conditions = False + + def register_command_handler(self, handler): + name = handler.name + + if not handler.category: + raise MachError('Cannot register a mach command without a ' + 'category: %s' % name) + + if handler.category not in self.categories: + raise MachError('Cannot register a command to an undefined ' + 'category: %s -> %s' % (name, handler.category)) + + self.command_handlers[name] = handler + self.commands_by_category[handler.category].add(name) + + def register_settings_provider(self, cls): + self.settings_providers.add(cls) + + def register_category(self, name, title, description, priority=50): + self.categories[name] = (title, description, priority) + self.commands_by_category[name] = set() + + def dispatch(self, name, context=None, **args): + """Dispatch/run a command. + + Commands can use this to call other commands. + """ + + # TODO The logic in this function overlaps with code in + # mach.main.Main._run() and should be consolidated. + handler = self.command_handlers[name] + cls = handler.cls + + if handler.pass_context and not context: + raise Exception('mach command class requires context.') + + if handler.pass_context: + instance = cls(context) + else: + instance = cls() + + fn = getattr(instance, handler.method) + + return fn(**args) or 0 + + +Registrar = MachRegistrar() diff --git a/python/mach/mach/terminal.py b/python/mach/mach/terminal.py new file mode 100644 index 00000000000..cdc3966575e --- /dev/null +++ b/python/mach/mach/terminal.py @@ -0,0 +1,75 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +"""This file contains code for interacting with terminals. + +All the terminal interaction code is consolidated so the complexity can be in +one place, away from code that is commonly looked at. +""" + +from __future__ import print_function, unicode_literals + +import logging +import sys + + +class LoggingHandler(logging.Handler): + """Custom logging handler that works with terminal window dressing. + + This is alternative terminal logging handler which contains smarts for + emitting terminal control characters properly. Currently, it has generic + support for "footer" elements at the bottom of the screen. Functionality + can be added when needed. + """ + def __init__(self): + logging.Handler.__init__(self) + + self.fh = sys.stdout + self.footer = None + + def flush(self): + self.acquire() + + try: + self.fh.flush() + finally: + self.release() + + def emit(self, record): + msg = self.format(record) + + if self.footer: + self.footer.clear() + + self.fh.write(msg) + self.fh.write('\n') + + if self.footer: + self.footer.draw() + + # If we don't flush, the footer may not get drawn. + self.flush() + + +class TerminalFooter(object): + """Represents something drawn on the bottom of a terminal.""" + def __init__(self, terminal): + self.t = terminal + self.fh = sys.stdout + + def _clear_lines(self, n): + for i in xrange(n): + self.fh.write(self.t.move_x(0)) + self.fh.write(self.t.clear_eol()) + self.fh.write(self.t.move_up()) + + self.fh.write(self.t.move_down()) + self.fh.write(self.t.move_x(0)) + + def clear(self): + raise Exception('clear() must be implemented.') + + def draw(self): + raise Exception('draw() must be implemented.') + diff --git a/python/mach/mach/test/__init__.py b/python/mach/mach/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/mach/mach/test/common.py b/python/mach/mach/test/common.py new file mode 100644 index 00000000000..1c4b1ea90ac --- /dev/null +++ b/python/mach/mach/test/common.py @@ -0,0 +1,40 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +from StringIO import StringIO +import os +import unittest + +from mach.main import Mach +from mach.base import CommandContext + +here = os.path.abspath(os.path.dirname(__file__)) + +class TestBase(unittest.TestCase): + provider_dir = os.path.join(here, 'providers') + + def _run_mach(self, args, provider_file=None, entry_point=None, context_handler=None): + m = Mach(os.getcwd()) + m.define_category('testing', 'Mach unittest', 'Testing for mach core', 10) + m.populate_context_handler = context_handler + + if provider_file: + m.load_commands_from_file(os.path.join(self.provider_dir, provider_file)) + + if entry_point: + m.load_commands_from_entry_point(entry_point) + + stdout = StringIO() + stderr = StringIO() + stdout.encoding = 'UTF-8' + stderr.encoding = 'UTF-8' + + try: + result = m.run(args, stdout=stdout, stderr=stderr) + except SystemExit: + result = None + + return (result, stdout.getvalue(), stderr.getvalue()) diff --git a/python/mach/mach/test/providers/__init__.py b/python/mach/mach/test/providers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/mach/mach/test/providers/basic.py b/python/mach/mach/test/providers/basic.py new file mode 100644 index 00000000000..d10856289b1 --- /dev/null +++ b/python/mach/mach/test/providers/basic.py @@ -0,0 +1,15 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. +from __future__ import unicode_literals + +from mach.decorators import ( + CommandProvider, + Command, +) + +@CommandProvider +class ConditionsProvider(object): + @Command('cmd_foo', category='testing') + def run_foo(self): + pass diff --git a/python/mach/mach/test/providers/conditions.py b/python/mach/mach/test/providers/conditions.py new file mode 100644 index 00000000000..a95429752d4 --- /dev/null +++ b/python/mach/mach/test/providers/conditions.py @@ -0,0 +1,53 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +from mach.decorators import ( + CommandProvider, + Command, +) + +def is_foo(cls): + """Foo must be true""" + return cls.foo + +def is_bar(cls): + """Bar must be true""" + return cls.bar + +@CommandProvider +class ConditionsProvider(object): + foo = True + bar = False + + @Command('cmd_foo', category='testing', conditions=[is_foo]) + def run_foo(self): + pass + + @Command('cmd_bar', category='testing', conditions=[is_bar]) + def run_bar(self): + pass + + @Command('cmd_foobar', category='testing', conditions=[is_foo, is_bar]) + def run_foobar(self): + pass + +@CommandProvider +class ConditionsContextProvider(object): + def __init__(self, context): + self.foo = context.foo + self.bar = context.bar + + @Command('cmd_foo_ctx', category='testing', conditions=[is_foo]) + def run_foo(self): + pass + + @Command('cmd_bar_ctx', category='testing', conditions=[is_bar]) + def run_bar(self): + pass + + @Command('cmd_foobar_ctx', category='testing', conditions=[is_foo, is_bar]) + def run_foobar(self): + pass diff --git a/python/mach/mach/test/providers/conditions_invalid.py b/python/mach/mach/test/providers/conditions_invalid.py new file mode 100644 index 00000000000..22284d4dcad --- /dev/null +++ b/python/mach/mach/test/providers/conditions_invalid.py @@ -0,0 +1,16 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +from mach.decorators import ( + CommandProvider, + Command, +) + +@CommandProvider +class ConditionsProvider(object): + @Command('cmd_foo', category='testing', conditions=["invalid"]) + def run_foo(self): + pass diff --git a/python/mach/mach/test/providers/throw.py b/python/mach/mach/test/providers/throw.py new file mode 100644 index 00000000000..06bee01eec7 --- /dev/null +++ b/python/mach/mach/test/providers/throw.py @@ -0,0 +1,29 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +import time + +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from mach.test.providers import throw2 + + +@CommandProvider +class TestCommandProvider(object): + @Command('throw', category='testing') + @CommandArgument('--message', '-m', default='General Error') + def throw(self, message): + raise Exception(message) + + @Command('throw_deep', category='testing') + @CommandArgument('--message', '-m', default='General Error') + def throw_deep(self, message): + throw2.throw_deep(message) + diff --git a/python/mach/mach/test/providers/throw2.py b/python/mach/mach/test/providers/throw2.py new file mode 100644 index 00000000000..af0a23fcfe7 --- /dev/null +++ b/python/mach/mach/test/providers/throw2.py @@ -0,0 +1,13 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# This file exists to trigger the differences in mach error reporting between +# exceptions that occur in mach command modules themselves and in the things +# they call. + +def throw_deep(message): + return throw_real(message) + +def throw_real(message): + raise Exception(message) diff --git a/python/mach/mach/test/test_conditions.py b/python/mach/mach/test/test_conditions.py new file mode 100644 index 00000000000..532a8316062 --- /dev/null +++ b/python/mach/mach/test/test_conditions.py @@ -0,0 +1,82 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +import os + +from mach.base import MachError +from mach.main import Mach +from mach.test.common import TestBase + +from mozunit import main + + +def _populate_context(context, key=None): + if key is None: + return + if key == 'foo': + return True + if key == 'bar': + return False + raise AttributeError(key) + +class TestConditions(TestBase): + """Tests for conditionally filtering commands.""" + + def _run_mach(self, args, context_handler=None): + return TestBase._run_mach(self, args, 'conditions.py', + context_handler=context_handler) + + + def test_conditions_pass(self): + """Test that a command which passes its conditions is runnable.""" + + self.assertEquals((0, '', ''), self._run_mach(['cmd_foo'])) + self.assertEquals((0, '', ''), self._run_mach(['cmd_foo_ctx'], _populate_context)) + + def test_invalid_context_message(self): + """Test that commands which do not pass all their conditions + print the proper failure message.""" + + def is_bar(): + """Bar must be true""" + fail_conditions = [is_bar] + + for name in ('cmd_bar', 'cmd_foobar'): + result, stdout, stderr = self._run_mach([name]) + self.assertEquals(1, result) + + fail_msg = Mach._condition_failed_message(name, fail_conditions) + self.assertEquals(fail_msg.rstrip(), stdout.rstrip()) + + for name in ('cmd_bar_ctx', 'cmd_foobar_ctx'): + result, stdout, stderr = self._run_mach([name], _populate_context) + self.assertEquals(1, result) + + fail_msg = Mach._condition_failed_message(name, fail_conditions) + self.assertEquals(fail_msg.rstrip(), stdout.rstrip()) + + def test_invalid_type(self): + """Test that a condition which is not callable raises an exception.""" + + m = Mach(os.getcwd()) + m.define_category('testing', 'Mach unittest', 'Testing for mach core', 10) + self.assertRaises(MachError, m.load_commands_from_file, + os.path.join(self.provider_dir, 'conditions_invalid.py')) + + def test_help_message(self): + """Test that commands that are not runnable do not show up in help.""" + + result, stdout, stderr = self._run_mach(['help'], _populate_context) + self.assertIn('cmd_foo', stdout) + self.assertNotIn('cmd_bar', stdout) + self.assertNotIn('cmd_foobar', stdout) + self.assertIn('cmd_foo_ctx', stdout) + self.assertNotIn('cmd_bar_ctx', stdout) + self.assertNotIn('cmd_foobar_ctx', stdout) + + +if __name__ == '__main__': + main() diff --git a/python/mach/mach/test/test_config.py b/python/mach/mach/test/test_config.py new file mode 100644 index 00000000000..cebd47a7d6c --- /dev/null +++ b/python/mach/mach/test/test_config.py @@ -0,0 +1,264 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. +from __future__ import unicode_literals + +import sys +import unittest + +from mozfile.mozfile import NamedTemporaryFile + +from mach.config import ( + AbsolutePathType, + BooleanType, + ConfigProvider, + ConfigSettings, + IntegerType, + PathType, + PositiveIntegerType, + RelativePathType, + StringType, +) + +from mozunit import main + + +if sys.version_info[0] == 3: + str_type = str +else: + str_type = basestring + +CONFIG1 = r""" +[foo] + +bar = bar_value +baz = /baz/foo.c +""" + +CONFIG2 = r""" +[foo] + +bar = value2 +""" + +class Provider1(ConfigProvider): + @classmethod + def _register_settings(cls): + cls.register_setting('foo', 'bar', StringType) + cls.register_setting('foo', 'baz', AbsolutePathType) + +Provider1.register_settings() + +class ProviderDuplicate(ConfigProvider): + @classmethod + def _register_settings(cls): + cls.register_setting('dupesect', 'foo', StringType) + cls.register_setting('dupesect', 'foo', StringType) + +class TestConfigProvider(unittest.TestCase): + def test_construct(self): + s = Provider1.config_settings + + self.assertEqual(len(s), 1) + self.assertIn('foo', s) + + self.assertEqual(len(s['foo']), 2) + self.assertIn('bar', s['foo']) + self.assertIn('baz', s['foo']) + + def test_duplicate_option(self): + with self.assertRaises(Exception): + ProviderDuplicate.register_settings() + + +class Provider2(ConfigProvider): + @classmethod + def _register_settings(cls): + cls.register_setting('a', 'string', StringType) + cls.register_setting('a', 'boolean', BooleanType) + cls.register_setting('a', 'pos_int', PositiveIntegerType) + cls.register_setting('a', 'int', IntegerType) + cls.register_setting('a', 'abs_path', AbsolutePathType) + cls.register_setting('a', 'rel_path', RelativePathType) + cls.register_setting('a', 'path', PathType) + +Provider2.register_settings() + +class TestConfigSettings(unittest.TestCase): + def test_empty(self): + s = ConfigSettings() + + self.assertEqual(len(s), 0) + self.assertNotIn('foo', s) + + def test_simple(self): + s = ConfigSettings() + s.register_provider(Provider1) + + self.assertEqual(len(s), 1) + self.assertIn('foo', s) + + foo = s['foo'] + foo = s.foo + + self.assertEqual(len(foo), 2) + + self.assertIn('bar', foo) + self.assertIn('baz', foo) + + foo['bar'] = 'value1' + self.assertEqual(foo['bar'], 'value1') + self.assertEqual(foo['bar'], 'value1') + + def test_assignment_validation(self): + s = ConfigSettings() + s.register_provider(Provider2) + + a = s.a + + # Assigning an undeclared setting raises. + with self.assertRaises(KeyError): + a.undefined = True + + with self.assertRaises(KeyError): + a['undefined'] = True + + # Basic type validation. + a.string = 'foo' + a.string = 'foo' + + with self.assertRaises(TypeError): + a.string = False + + a.boolean = True + a.boolean = False + + with self.assertRaises(TypeError): + a.boolean = 'foo' + + a.pos_int = 5 + a.pos_int = 0 + + with self.assertRaises(ValueError): + a.pos_int = -1 + + with self.assertRaises(TypeError): + a.pos_int = 'foo' + + a.int = 5 + a.int = 0 + a.int = -5 + + with self.assertRaises(TypeError): + a.int = 1.24 + + with self.assertRaises(TypeError): + a.int = 'foo' + + a.abs_path = '/home/gps' + + with self.assertRaises(ValueError): + a.abs_path = 'home/gps' + + a.rel_path = 'home/gps' + a.rel_path = './foo/bar' + a.rel_path = 'foo.c' + + with self.assertRaises(ValueError): + a.rel_path = '/foo/bar' + + a.path = '/home/gps' + a.path = 'foo.c' + a.path = 'foo/bar' + a.path = './foo' + + def test_retrieval_type(self): + s = ConfigSettings() + s.register_provider(Provider2) + + a = s.a + + a.string = 'foo' + a.boolean = True + a.pos_int = 12 + a.int = -4 + a.abs_path = '/home/gps' + a.rel_path = 'foo.c' + a.path = './foo/bar' + + self.assertIsInstance(a.string, str_type) + self.assertIsInstance(a.boolean, bool) + self.assertIsInstance(a.pos_int, int) + self.assertIsInstance(a.int, int) + self.assertIsInstance(a.abs_path, str_type) + self.assertIsInstance(a.rel_path, str_type) + self.assertIsInstance(a.path, str_type) + + def test_file_reading_single(self): + temp = NamedTemporaryFile(mode='wt') + temp.write(CONFIG1) + temp.flush() + + s = ConfigSettings() + s.register_provider(Provider1) + + s.load_file(temp.name) + + self.assertEqual(s.foo.bar, 'bar_value') + + def test_file_reading_multiple(self): + """Loading multiple files has proper overwrite behavior.""" + temp1 = NamedTemporaryFile(mode='wt') + temp1.write(CONFIG1) + temp1.flush() + + temp2 = NamedTemporaryFile(mode='wt') + temp2.write(CONFIG2) + temp2.flush() + + s = ConfigSettings() + s.register_provider(Provider1) + + s.load_files([temp1.name, temp2.name]) + + self.assertEqual(s.foo.bar, 'value2') + + def test_file_reading_missing(self): + """Missing files should silently be ignored.""" + + s = ConfigSettings() + + s.load_file('/tmp/foo.ini') + + def test_file_writing(self): + s = ConfigSettings() + s.register_provider(Provider2) + + s.a.string = 'foo' + s.a.boolean = False + + temp = NamedTemporaryFile('wt') + s.write(temp) + temp.flush() + + s2 = ConfigSettings() + s2.register_provider(Provider2) + + s2.load_file(temp.name) + + self.assertEqual(s.a.string, s2.a.string) + self.assertEqual(s.a.boolean, s2.a.boolean) + + def test_write_pot(self): + s = ConfigSettings() + s.register_provider(Provider1) + s.register_provider(Provider2) + + # Just a basic sanity test. + temp = NamedTemporaryFile('wt') + s.write_pot(temp) + temp.flush() + + +if __name__ == '__main__': + main() diff --git a/python/mach/mach/test/test_entry_point.py b/python/mach/mach/test/test_entry_point.py new file mode 100644 index 00000000000..5bd2c279d45 --- /dev/null +++ b/python/mach/mach/test/test_entry_point.py @@ -0,0 +1,60 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. +from __future__ import unicode_literals + +import imp +import os +import sys + +from mach.base import MachError +from mach.test.common import TestBase +from mock import patch + +from mozunit import main + + +here = os.path.abspath(os.path.dirname(__file__)) + +class Entry(): + """Stub replacement for pkg_resources.EntryPoint""" + def __init__(self, providers): + self.providers = providers + + def load(self): + def _providers(): + return self.providers + return _providers + +class TestEntryPoints(TestBase): + """Test integrating with setuptools entry points""" + provider_dir = os.path.join(here, 'providers') + + def _run_mach(self): + return TestBase._run_mach(self, ['help'], entry_point='mach.providers') + + @patch('pkg_resources.iter_entry_points') + def test_load_entry_point_from_directory(self, mock): + # Ensure parent module is present otherwise we'll (likely) get + # an error due to unknown parent. + if b'mach.commands' not in sys.modules: + mod = imp.new_module(b'mach.commands') + sys.modules[b'mach.commands'] = mod + + mock.return_value = [Entry(['providers'])] + # Mach error raised due to conditions_invalid.py + with self.assertRaises(MachError): + self._run_mach() + + @patch('pkg_resources.iter_entry_points') + def test_load_entry_point_from_file(self, mock): + mock.return_value = [Entry([os.path.join('providers', 'basic.py')])] + + result, stdout, stderr = self._run_mach() + self.assertIsNone(result) + self.assertIn('cmd_foo', stdout) + + +# Not enabled in automation because tests are failing. +#if __name__ == '__main__': +# main() diff --git a/python/mach/mach/test/test_error_output.py b/python/mach/mach/test/test_error_output.py new file mode 100644 index 00000000000..25553f96bc4 --- /dev/null +++ b/python/mach/mach/test/test_error_output.py @@ -0,0 +1,39 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import unicode_literals + +from mach.main import ( + COMMAND_ERROR, + MODULE_ERROR +) +from mach.test.common import TestBase + +from mozunit import main + + +class TestErrorOutput(TestBase): + + def _run_mach(self, args): + return TestBase._run_mach(self, args, 'throw.py') + + def test_command_error(self): + result, stdout, stderr = self._run_mach(['throw', '--message', + 'Command Error']) + + self.assertEqual(result, 1) + + self.assertIn(COMMAND_ERROR, stdout) + + def test_invoked_error(self): + result, stdout, stderr = self._run_mach(['throw_deep', '--message', + 'Deep stack']) + + self.assertEqual(result, 1) + + self.assertIn(MODULE_ERROR, stdout) + + +if __name__ == '__main__': + main() diff --git a/python/mach/mach/test/test_logger.py b/python/mach/mach/test/test_logger.py new file mode 100644 index 00000000000..05592845e7f --- /dev/null +++ b/python/mach/mach/test/test_logger.py @@ -0,0 +1,47 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import absolute_import, unicode_literals + +import logging +import time +import unittest + +from mach.logging import StructuredHumanFormatter + +from mozunit import main + + +class DummyLogger(logging.Logger): + def __init__(self, cb): + logging.Logger.__init__(self, 'test') + + self._cb = cb + + def handle(self, record): + self._cb(record) + + +class TestStructuredHumanFormatter(unittest.TestCase): + def test_non_ascii_logging(self): + # Ensures the formatter doesn't choke when non-ASCII characters are + # present in printed parameters. + formatter = StructuredHumanFormatter(time.time()) + + def on_record(record): + result = formatter.format(record) + relevant = result[9:] + + self.assertEqual(relevant, 'Test: s\xe9curit\xe9') + + logger = DummyLogger(on_record) + + value = 's\xe9curit\xe9' + + logger.log(logging.INFO, 'Test: {utf}', + extra={'action': 'action', 'params': {'utf': value}}) + + +if __name__ == '__main__': + main() diff --git a/python/mach/setup.py b/python/mach/setup.py new file mode 100644 index 00000000000..511a6a32277 --- /dev/null +++ b/python/mach/setup.py @@ -0,0 +1,38 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +try: + from setuptools import setup +except: + from distutils.core import setup + + +VERSION = '0.3' + +README = open('README.rst').read() + +setup( + name='mach', + description='Generic command line command dispatching framework.', + long_description=README, + license='MPL 2.0', + author='Gregory Szorc', + author_email='gregory.szorc@gmail.com', + url='https://developer.mozilla.org/en-US/docs/Developer_Guide/mach', + packages=['mach'], + version=VERSION, + classifiers=[ + 'Environment :: Console', + 'Development Status :: 3 - Alpha', + 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', + 'Natural Language :: English', + ], + install_requires=[ + 'blessings', + 'mozfile', + 'mozprocess', + ], + tests_require=['mock'], +) + diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py new file mode 100644 index 00000000000..3418b87d057 --- /dev/null +++ b/python/mach_bootstrap.py @@ -0,0 +1,100 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +from __future__ import print_function, unicode_literals + +import os +import platform +import sys + +SEARCH_PATHS = [ + "python/mach", + "python/toml", +] + +# Individual files providing mach commands. +MACH_MODULES = [ + 'python/servo/bootstrap_commands.py', + 'python/servo/build_commands.py', + 'python/servo/testing_commands.py', + 'python/servo/post_build_commands.py', + 'python/servo/devenv_commands.py', +] + + +CATEGORIES = { + 'bootstrap': { + 'short': 'Bootstrap Commands', + 'long': 'Bootstrap the build system', + 'priority': 90, + }, + 'build': { + 'short': 'Build Commands', + 'long': 'Interact with the build system', + 'priority': 80, + }, + 'post-build': { + 'short': 'Post-build Commands', + 'long': 'Common actions performed after completing a build.', + 'priority': 70, + }, + 'testing': { + 'short': 'Testing', + 'long': 'Run tests.', + 'priority': 60, + }, + 'devenv': { + 'short': 'Development Environment', + 'long': 'Set up and configure your development environment.', + 'priority': 50, + }, + 'build-dev': { + 'short': 'Low-level Build System Interaction', + 'long': 'Interact with specific parts of the build system.', + 'priority': 20, + }, + 'misc': { + 'short': 'Potpourri', + 'long': 'Potent potables and assorted snacks.', + 'priority': 10, + }, + 'disabled': { + 'short': 'Disabled', + 'long': 'The disabled commands are hidden by default. Use -v to display them. These commands are unavailable for your current context, run "mach " to see why.', + 'priority': 0, + } +} + + +def bootstrap(topdir): + topdir = os.path.abspath(topdir) + + # Ensure we are running Python 2.7+. We put this check here so we generate a + # user-friendly error message rather than a cryptic stack trace on module + # import. + if sys.version_info[0] != 2 or sys.version_info[1] < 7: + print('Python 2.7 or above (but not Python 3) is required to run mach.') + print('You are running Python', platform.python_version()) + sys.exit(1) + + def populate_context(context, key=None): + if key is None: + return + if key == 'topdir': + return topdir + raise AttributeError(key) + + sys.path[0:0] = [os.path.join(topdir, path) for path in SEARCH_PATHS] + import mach.main + mach = mach.main.Mach(os.getcwd()) + mach.populate_context_handler = populate_context + + for category, meta in CATEGORIES.items(): + mach.define_category(category, meta['short'], meta['long'], + meta['priority']) + + for path in MACH_MODULES: + mach.load_commands_from_file(os.path.join(topdir, path)) + + return mach diff --git a/python/servo/__init__.py b/python/servo/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py new file mode 100644 index 00000000000..13a411f7008 --- /dev/null +++ b/python/servo/bootstrap_commands.py @@ -0,0 +1,153 @@ +from __future__ import print_function, unicode_literals + +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +import urllib + +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase, cd + +def host_triple(): + os_type = subprocess.check_output(["uname", "-s"]).strip().lower() + if os_type == "linux": + os_type = "unknown-linux-gnu" + elif os_type == "darwin": + os_type = "apple-darwin" + elif os_type == "android": + os_type == "linux-androideabi" + else: + os_type == "unknown" + + cpu_type = subprocess.check_output(["uname", "-m"]).strip().lower() + if cpu_type in ["i386", "i486", "i686", "i768", "x86"]: + cpu_type = "i686" + elif cpu_type in ["x86_64", "x86-64", "x64", "amd64"]: + cpu_type = "x86_64" + elif cpu_type == "arm": + cpu_type = "arm" + else: + cpu_type = "unknown" + + return "%s-%s" % (cpu_type, os_type) + +def download(desc, src, dst): + recved = [0] + def report(count, bsize, fsize): + recved[0] += bsize + pct = recved[0] * 100.0 / fsize + print("\rDownloading %s: %5.1f%%" % (desc, pct), end="") + sys.stdout.flush() + + urllib.urlretrieve(src, dst, report) + print() + +def extract(src, dst, movedir=None): + tarfile.open(src).extractall(dst) + + if movedir: + for f in os.listdir(movedir): + frm = path.join(movedir, f) + to = path.join(dst, f) + os.rename(frm, to) + os.rmdir(movedir) + + os.remove(src) + +@CommandProvider +class MachCommands(CommandBase): + @Command('env', + description='Print environment setup commands', + category='bootstrap') + def env(self): + env = self.build_env() + print("export PATH=%s" % env["PATH"]) + if sys.platform == "darwin": + print("export DYLD_LIBRARY_PATH=%s" % env["DYLD_LIBRARY_PATH"]) + else: + print("export LD_LIBRARY_PATH=%s" % env["LD_LIBRARY_PATH"]) + + @Command('bootstrap-rust', + description='Download the Rust compiler snapshot', + category='bootstrap') + @CommandArgument('--force', '-f', + action='store_true', + help='Force download even if a snapshot already exists') + def bootstrap_rustc(self, force=False): + rust_dir = path.join(self.context.topdir, "rust") + if not force and path.exists(path.join(rust_dir, "bin", "rustc")): + print("Snapshot Rust compiler already downloaded.", end=" ") + print("Use |bootstrap_rust --force| to download again.") + return + + if path.isdir(rust_dir): + shutil.rmtree(rust_dir) + os.mkdir(rust_dir) + + snapshot_hash = open(path.join(self.context.topdir, "rust-snapshot-hash")).read().strip() + snapshot_path = "%s-%s.tar.gz" % (snapshot_hash, host_triple()) + snapshot_url = "https://servo-rust.s3.amazonaws.com/%s" % snapshot_path + tgz_file = path.join(rust_dir, path.basename(snapshot_path)) + + download("Rust snapshot", snapshot_url, tgz_file) + + print("Extracting Rust snapshot...") + snap_dir = path.join(rust_dir, + path.basename(tgz_file).replace(".tar.gz", "")) + extract(tgz_file, rust_dir, movedir=snap_dir) + print("Snapshot Rust ready.") + + @Command('bootstrap-cargo', + description='Download the Cargo build tool', + category='bootstrap') + @CommandArgument('--force', '-f', + action='store_true', + help='Force download even if cargo already exists') + def bootstrap_cargo(self, force=False): + cargo_dir = path.join(self.context.topdir, "cargo") + if not force and path.exists(path.join(cargo_dir, "bin", "cargo")): + print("Cargo already downloaded.", end=" ") + print("Use |bootstrap_cargo --force| to download again.") + return + + if path.isdir(cargo_dir): + shutil.rmtree(cargo_dir) + os.mkdir(cargo_dir) + + tgz_file = "cargo-nightly-%s.tar.gz" % host_triple() + nightly_url = "http://static.rust-lang.org/cargo-dist/%s" % tgz_file + + download("Cargo nightly", nightly_url, tgz_file) + + print("Extracting Cargo nightly...") + nightly_dir = path.join(cargo_dir, + path.basename(tgz_file).replace(".tar.gz", "")) + extract(tgz_file, cargo_dir, movedir=nightly_dir) + print("Cargo ready.") + + @Command('update-submodules', + description='Update submodules', + category='bootstrap') + def update_submodules(self): + submodules = subprocess.check_output(["git", "submodule", "status"]) + for line in submodules.split('\n'): + components = line.strip().split(' ') + if len(components) > 1: + module_path = components[1] + if path.exists(module_path): + with cd(module_path): + output = subprocess.check_output(["git", "status", "--porcelain"]) + if len(output) != 0: + print("error: submodule %s is not clean" % module_path) + print("\nClean the submodule and try again.") + return 1 + subprocess.check_call(["git", "submodule", "--quiet", "sync", "--recursive"]) + subprocess.check_call(["git", "submodule", "update", "--init", "--recursive"]) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py new file mode 100644 index 00000000000..b0f4ab95b64 --- /dev/null +++ b/python/servo/build_commands.py @@ -0,0 +1,85 @@ +from __future__ import print_function, unicode_literals + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +from time import time +import urllib + +from mach.registrar import Registrar +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase, cd + +@CommandProvider +class MachCommands(CommandBase): + @Command('build', + description='Build Servo', + category='build') + @CommandArgument('--target', '-t', + default=None, + help='Cross compile for given target platform') + @CommandArgument('--release', '-r', + action='store_true', + help='Build in release mode') + @CommandArgument('--jobs', '-j', + default=None, + help='Number of jobs to run in parallel') + def build(self, target, release=False, jobs=None): + self.ensure_bootstrapped() + + opts = [] + if release: + opts += ["--release"] + if jobs is not None: + opts += ["-j", jobs] + + build_start = time() + subprocess.check_call(["cargo", "build"] + opts, env=self.build_env()) + elapsed = time() - build_start + + print("Build completed in %0.2fs" % elapsed) + + @Command('build-cef', + description='Build the Chromium Embedding Framework library', + category='build') + @CommandArgument('--jobs', '-j', + default=None, + help='Number of jobs to run in parallel') + def build_cef(self, jobs=None): + self.ensure_bootstrapped() + + ret = None + opts = [] + if jobs is not None: + opts += ["-j", jobs] + + build_start = time() + with cd(path.join("ports", "cef")): + ret = subprocess.call(["cargo", "build"], env=self.build_env()) + elapsed = time() - build_start + + print("CEF build completed in %0.2fs" % elapsed) + + return ret + + @Command('build-tests', + description='Build the Servo test suites', + category='build') + @CommandArgument('--jobs', '-j', + default=None, + help='Number of jobs to run in parallel') + def build_tests(self, jobs=None): + self.ensure_bootstrapped() + opts = [] + if jobs is not None: + opts += ["-j", jobs] + subprocess.check_call(["cargo", "test", "--no-run"], env=self.build_env()) diff --git a/python/servo/command_base.py b/python/servo/command_base.py new file mode 100644 index 00000000000..5d15494a4e7 --- /dev/null +++ b/python/servo/command_base.py @@ -0,0 +1,94 @@ +import os +from os import path +import subprocess +import sys +import toml + +from mach.registrar import Registrar + +class cd: + """Context manager for changing the current working directory""" + def __init__(self, newPath): + self.newPath = newPath + + def __enter__(self): + self.savedPath = os.getcwd() + os.chdir(self.newPath) + + def __exit__(self, etype, value, traceback): + os.chdir(self.savedPath) + +class CommandBase(object): + """Base class for mach command providers. + + This mostly handles configuration management, such as .servobuild.""" + + def __init__(self, context): + self.context = context + + if not hasattr(self.context, "bootstrapped"): + self.context.bootstrapped = False + + config_path = path.join(context.topdir, ".servobuild") + if path.exists(config_path): + self.config = toml.loads(open(config_path).read()) + else: + self.config = {} + + # Handle missing/default items + self.config.setdefault("tools", {}) + self.config["tools"].setdefault("system-rust", False) + self.config["tools"].setdefault("system-cargo", False) + self.config["tools"].setdefault("rust-root", "") + self.config["tools"].setdefault("cargo-root", "") + if not self.config["tools"]["system-rust"]: + self.config["tools"]["rust-root"] = path.join(context.topdir, "rust") + if not self.config["tools"]["system-cargo"]: + self.config["tools"]["cargo-root"] = path.join(context.topdir, "cargo") + + def build_env(self): + """Return an extended environment dictionary.""" + env = os.environ.copy() + extra_path = [] + extra_lib = [] + if not self.config["tools"]["system-rust"] or self.config["tools"]["rust-root"]: + extra_path += [path.join(self.config["tools"]["rust-root"], "bin")] + extra_lib += [path.join(self.config["tools"]["rust-root"], "lib")] + if not self.config["tools"]["system-cargo"] or self.config["tools"]["cargo-root"]: + extra_path += [path.join(self.config["tools"]["cargo-root"], "bin")] + + if extra_path: + env["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"]) + if extra_lib: + if sys.platform == "darwin": + env["DYLD_LIBRARY_PATH"] = "%s%s%s" % \ + (os.pathsep.join(extra_lib), + os.pathsep, + env.get("DYLD_LIBRARY_PATH", "")) + else: + env["LD_LIBRARY_PATH"] = "%s%s%s" % \ + (os.pathsep.join(extra_lib), + os.pathsep, + env.get("LD_LIBRARY_PATH", "")) + + return env + + def ensure_bootstrapped(self): + if self.context.bootstrapped: return + + submodules = subprocess.check_output(["git", "submodule", "status"]) + for line in submodules.split('\n'): + components = line.strip().split(' ') + if len(components) > 1 and components[0].startswith('-'): + module_path = components[1] + subprocess.check_call(["git", "submodule", "update", + "--init", "--recursive", "--", module_path]) + + if not self.config["tools"]["system-rust"] and \ + not path.exists(path.join(self.context.topdir, "rust", "bin", "rustc")): + Registrar.dispatch("bootstrap-rust", context=self.context) + if not self.config["tools"]["system-cargo"] and \ + not path.exists(path.join(self.context.topdir, "cargo", "bin", "cargo")): + Registrar.dispatch("bootstrap-cargo", context=self.context) + + self.context.bootstrapped = True diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py new file mode 100644 index 00000000000..1c5c8ee24b5 --- /dev/null +++ b/python/servo/devenv_commands.py @@ -0,0 +1,32 @@ +from __future__ import print_function, unicode_literals + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +from time import time +import urllib + +from mach.registrar import Registrar +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase + +@CommandProvider +class MachCommands(CommandBase): + @Command('cargo', + description='Run Cargo', + category='devenv', + allow_all_args=True) + @CommandArgument('params', default=None, nargs='...', + help="Command-line arguments to be passed through to Cervo") + def run(self, params): + return subprocess.call(["cargo"] + params, + env=self.build_env()) diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py new file mode 100644 index 00000000000..276a772c787 --- /dev/null +++ b/python/servo/post_build_commands.py @@ -0,0 +1,44 @@ +from __future__ import print_function, unicode_literals + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +from time import time +import urllib + +from mach.registrar import Registrar +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase + +@CommandProvider +class MachCommands(CommandBase): + @Command('run', + description='Run Servo', + category='post-build', + allow_all_args=True) + @CommandArgument('params', default=None, nargs='...', + help="Command-line arguments to be passed through to Servo") + def run(self, params): + subprocess.check_call([path.join("target", "servo")] + params, + env=self.build_env()) + + @Command('doc', + description='Generate documentation', + category='post-build', + allow_all_args=True) + @CommandArgument('params', default=None, nargs='...', + help="Command-line arguments to be passed through to cargo doc") + def doc(self, params): + self.ensure_bootstrapped() + return subprocess.call(["cargo", "doc"] + params, + env=self.build_env()) + diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py new file mode 100644 index 00000000000..19ecc4ef4cf --- /dev/null +++ b/python/servo/testing_commands.py @@ -0,0 +1,122 @@ +from __future__ import print_function, unicode_literals + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +from time import time +import urllib + +from mach.registrar import Registrar +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase +import tidy + +@CommandProvider +class MachCommands(CommandBase): + def __init__(self, context): + CommandBase.__init__(self, context) + if not hasattr(self.context, "built_tests"): + self.context.built_tests = False + + def ensure_built_tests(self): + if self.context.built_tests: return + Registrar.dispatch('build-tests', context=self.context) + self.context.built_tests = True + + def find_test(self, prefix): + candidates = [f for f in os.listdir(path.join(self.context.topdir, "target")) + if f.startswith(prefix + "-")] + if candidates: + return path.join(self.context.topdir, "target", candidates[0]) + return None + + def run_test(self, prefix, args=[]): + t = self.find_test(prefix) + if t: + return subprocess.call([t] + args, env=self.build_env()) + + @Command('test', + description='Run all Servo tests', + category='testing') + def test(self): + test_start = time() + for t in ["tidy", "unit", "ref", "content", "wpt"]: + Registrar.dispatch("test-%s" % t, context=self.context) + elapsed = time() - test_start + + print("Tests completed in %0.2fs" % elapsed) + + @Command('test-unit', + description='Run libservo unit tests', + category='testing') + def test_unit(self): + self.ensure_bootstrapped() + self.ensure_built_tests() + return self.run_test("servo") + + @Command('test-ref', + description='Run the reference tests', + category='testing') + @CommandArgument('--kind', '-k', default=None) + def test_ref(self, kind=None): + self.ensure_bootstrapped() + self.ensure_built_tests() + + kinds = ["cpu", "gpu"] if kind is None else [kind] + test_path = path.join(self.context.topdir, "tests", "ref") + error = False + + test_start = time() + for k in kinds: + print("Running %s reftests..." % k) + ret = self.run_test("reftest", [k, test_path]) + error = error or ret != 0 + elapsed = time() - test_start + + print("Reference tests completed in %0.2fs" % elapsed) + + if error: return 1 + + @Command('test-content', + description='Run the content tests', + category='testing') + def test_content(self): + self.ensure_bootstrapped() + self.ensure_built_tests() + + test_path = path.join(self.context.topdir, "tests", "content") + test_start = time() + ret = self.run_test("contenttest", ["--source-dir=%s" % test_path]) + elapsed = time() - test_start + + print("Content tests completed in %0.2fs" % elapsed) + return ret + + @Command('test-tidy', + description='Run the source code tidiness check', + category='testing') + def test_tidy(self): + errors = 0 + for p in ["src", "components"]: + ret = tidy.scan(path.join(self.context.topdir, p)) + if ret != 0: errors = 1 + return errors + + @Command('test-wpt', + description='Run the web platform tests', + category='testing', + allow_all_args=True) + @CommandArgument('params', default=None, nargs='...', + help="Command-line arguments to be passed through to wpt/run.sh") + def test_wpt(self, params): + return subprocess.call(["bash", path.join("tests", "wpt", "run.sh")] + params, + env=self.build_env()) diff --git a/src/etc/tidy.py b/python/tidy.py similarity index 72% rename from src/etc/tidy.py rename to python/tidy.py index f5175013f55..04743433dbf 100644 --- a/src/etc/tidy.py +++ b/python/tidy.py @@ -10,9 +10,9 @@ #!/usr/bin/env python import os -import sys from licenseck import check_license +# FIXME(#3242): Don't use globals err = 0 @@ -46,13 +46,12 @@ def do_whitespace_check(name, contents): exceptions = [ # Upstream - "src/support", - "src/platform", - "src/test/wpt/web-platform-tests", + "support", + "tests/wpt/web-platform-tests", # Generated and upstream code combined with our own. Could use cleanup - "src/components/script/dom/bindings/codegen", - "src/components/style/properties/mod.rs", + "components/script/dom/bindings/codegen", + "components/style/properties/mod.rs", ] @@ -72,17 +71,21 @@ def should_check(name): return True -file_names = [] -for root, dirs, files in os.walk(sys.argv[1]): - for myfile in files: - file_name = root + "/" + myfile - if should_check(file_name): - file_names.append(file_name) +def scan(start_path): + global err + err = 0 -for path in file_names: - with open(path, "r") as fp: - lines = fp.readlines() - do_license_check(path, "".join(lines)) - do_whitespace_check(path, lines) + file_names = [] + for root, dirs, files in os.walk(start_path): + for myfile in files: + file_name = root + "/" + myfile + if should_check(file_name): + file_names.append(file_name) -sys.exit(err) + for path in file_names: + with open(path, "r") as fp: + lines = fp.readlines() + do_license_check(path, "".join(lines)) + do_whitespace_check(path, lines) + + return err diff --git a/python/toml/LICENSE b/python/toml/LICENSE new file mode 100644 index 00000000000..c55b493cb7e --- /dev/null +++ b/python/toml/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright 2013 Uiri Noyb + +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. \ No newline at end of file diff --git a/python/toml/PKG-INFO b/python/toml/PKG-INFO new file mode 100644 index 00000000000..c9c5493f311 --- /dev/null +++ b/python/toml/PKG-INFO @@ -0,0 +1,52 @@ +Metadata-Version: 1.0 +Name: toml +Version: 0.8.2 +Summary: Python Library for Tom's Obvious, Minimal Language +Home-page: https://github.com/uiri/toml +Author: Uiri Noyb +Author-email: uiri@xqz.ca +License: License :: OSI Approved :: MIT License +Description: TOML + ==== + + Original repository: https://github.com/uiri/toml + + See also https://github.com/mojombo/toml + + Python module which parses and emits TOML. + + Released under the MIT license. + + Passes https://github.com/BurntSushi/toml-test + + See http://j.xqz.ca/toml-status for up to date test results. + + Current Version of the Specification + ------------------------------------ + + https://github.com/mojombo/toml/blob/v0.2.0/README.md + + QUICK GUIDE + ----------- + + ``pip install toml`` + + toml.loads --- takes a string to be parsed as toml and returns the corresponding dictionary + + toml.dumps --- takes a dictionary and returns a string which is the contents of the corresponding toml file. + + + There are other functions which I use to dump and load various fragments of toml but dumps and loads will cover most usage. + + Example usage: + + .. code:: python + + import toml + + with open("conf.toml") as conffile: + config = toml.loads(conffile.read()) + # do stuff with config here + . . . + +Platform: UNKNOWN diff --git a/python/toml/README.rst b/python/toml/README.rst new file mode 100644 index 00000000000..0c97ce21044 --- /dev/null +++ b/python/toml/README.rst @@ -0,0 +1,42 @@ +TOML +==== + +Original repository: https://github.com/uiri/toml + +See also https://github.com/mojombo/toml + +Python module which parses and emits TOML. + +Released under the MIT license. + +Passes https://github.com/BurntSushi/toml-test + +See http://j.xqz.ca/toml-status for up to date test results. + +Current Version of the Specification +------------------------------------ + +https://github.com/mojombo/toml/blob/v0.2.0/README.md + +QUICK GUIDE +----------- + +``pip install toml`` + +toml.loads --- takes a string to be parsed as toml and returns the corresponding dictionary + +toml.dumps --- takes a dictionary and returns a string which is the contents of the corresponding toml file. + + +There are other functions which I use to dump and load various fragments of toml but dumps and loads will cover most usage. + +Example usage: + +.. code:: python + + import toml + + with open("conf.toml") as conffile: + config = toml.loads(conffile.read()) + # do stuff with config here + . . . diff --git a/python/toml/setup.py b/python/toml/setup.py new file mode 100644 index 00000000000..e2f2492dc10 --- /dev/null +++ b/python/toml/setup.py @@ -0,0 +1,14 @@ +from distutils.core import setup + +with open("README.rst") as readmefile: + readme = readmefile.read() +setup(name='toml', + version='0.8.2', + description="Python Library for Tom's Obvious, Minimal Language", + author="Uiri Noyb", + author_email="uiri@xqz.ca", + url="https://github.com/uiri/toml", + py_modules=['toml'], + license="License :: OSI Approved :: MIT License", + long_description=readme, +) diff --git a/python/toml/toml.py b/python/toml/toml.py new file mode 100644 index 00000000000..8b3ecb67a2a --- /dev/null +++ b/python/toml/toml.py @@ -0,0 +1,443 @@ +import datetime, decimal + +try: + _range = xrange +except NameError: + unicode = str + _range = range + basestring = str + unichr = chr + +def load(f): + """Returns a dictionary containing the named file parsed as toml.""" + if isinstance(f, basestring): + with open(f) as ffile: + return loads(ffile.read()) + elif isinstance(f, list): + for l in f: + if not isinstance(l, basestring): + raise Exception("Load expects a list to contain filenames only") + d = [] + for l in f: + d.append(load(l)) + r = {} + for l in d: + toml_merge_dict(r, l) + return r + elif f.read: + return loads(f.read()) + else: + raise Exception("You can only load a file descriptor, filename or list") + +def loads(s): + """Returns a dictionary containing s, a string, parsed as toml.""" + implicitgroups = [] + retval = {} + currentlevel = retval + if isinstance(s, basestring): + try: + s.decode('utf8') + except AttributeError: + pass + sl = list(s) + openarr = 0 + openstring = False + arrayoftables = True + beginline = True + keygroup = False + delnum = 1 + for i in range(len(sl)): + if sl[i] == '"': + oddbackslash = False + try: + k = 1 + j = sl[i-k] + oddbackslash = False + while j == '\\': + oddbackslash = not oddbackslash + k += 1 + j = sl[i-k] + except IndexError: + pass + if not oddbackslash: + openstring = not openstring + if keygroup and (sl[i] == ' ' or sl[i] == '\t'): + keygroup = False + if arrayoftables and (sl[i] == ' ' or sl[i] == '\t'): + arrayoftables = False + if sl[i] == '#' and not openstring and not keygroup and not arrayoftables: + j = i + while sl[j] != '\n': + sl.insert(j, ' ') + sl.pop(j+1) + j += 1 + if sl[i] == '[' and not openstring and not keygroup and not arrayoftables: + if beginline: + if sl[i+1] == '[': + arrayoftables = True + else: + keygroup = True + else: + openarr += 1 + if sl[i] == ']' and not openstring and not keygroup and not arrayoftables: + if keygroup: + keygroup = False + elif arrayoftables: + if sl[i-1] == ']': + arrayoftables = False + else: + openarr -= 1 + if sl[i] == '\n': + if openstring: + raise Exception("Unbalanced quotes") + if openarr: + sl.insert(i, ' ') + sl.pop(i+1) + else: + beginline = True + elif beginline and sl[i] != ' ' and sl[i] != '\t': + beginline = False + keygroup = True + s = ''.join(sl) + s = s.split('\n') + else: + raise Exception("What exactly are you trying to pull?") + for line in s: + line = line.strip() + if line == "": + continue + if line[0] == '[': + arrayoftables = False + if line[1] == '[': + arrayoftables = True + line = line[2:].split(']]', 1) + else: + line = line[1:].split(']', 1) + if line[1].strip() != "": + raise Exception("Key group not on a line by itself.") + line = line[0] + if '[' in line: + raise Exception("Key group name cannot contain '['") + if ']' in line: + raise Exception("Key group name cannot contain']'") + groups = line.split('.') + currentlevel = retval + for i in range(len(groups)): + group = groups[i] + if group == "": + raise Exception("Can't have a keygroup with an empty name") + try: + currentlevel[group] + if i == len(groups) - 1: + if group in implicitgroups: + implicitgroups.remove(group) + if arrayoftables: + raise Exception("An implicitly defined table can't be an array") + elif arrayoftables: + currentlevel[group].append({}) + else: + raise Exception("What? "+group+" already exists?"+str(currentlevel)) + except TypeError: + if i != len(groups) - 1: + implicitgroups.append(group) + currentlevel = currentlevel[0] + if arrayoftables: + currentlevel[group] = [{}] + else: + currentlevel[group] = {} + except KeyError: + if i != len(groups) - 1: + implicitgroups.append(group) + currentlevel[group] = {} + if i == len(groups) - 1 and arrayoftables: + currentlevel[group] = [{}] + currentlevel = currentlevel[group] + if arrayoftables: + try: + currentlevel = currentlevel[-1] + except KeyError: + pass + elif "=" in line: + i = 1 + pair = line.split('=', i) + l = len(line) + while pair[-1][0] != ' ' and pair[-1][0] != '\t' and pair[-1][0] != '"' and pair[-1][0] != '[' and pair[-1] != 'true' and pair[-1] != 'false': + try: + float(pair[-1]) + break + except ValueError: + try: + datetime.datetime.strptime(pair[-1], "%Y-%m-%dT%H:%M:%SZ") + break + except ValueError: + i += 1 + pair = line.split('=', i) + newpair = [] + newpair.append('='.join(pair[:-1])) + newpair.append(pair[-1]) + pair = newpair + pair[0] = pair[0].strip() + pair[1] = pair[1].strip() + value, vtype = load_value(pair[1]) + try: + currentlevel[pair[0]] + raise Exception("Duplicate keys!") + except KeyError: + currentlevel[pair[0]] = value + return retval + +def load_value(v): + if v == 'true': + return (True, "bool") + elif v == 'false': + return (False, "bool") + elif v[0] == '"': + testv = v[1:].split('"') + closed = False + for tv in testv: + if tv == '': + closed = True + else: + oddbackslash = False + try: + i = -1 + j = tv[i] + while j == '\\': + oddbackslash = not oddbackslash + i -= 1 + j = tv[i] + except IndexError: + pass + if not oddbackslash: + if closed: + raise Exception("Stuff after closed string. WTF?") + else: + closed = True + escapes = ['0', 'b', 'f', '/', 'n', 'r', 't', '"', '\\'] + escapedchars = ['\0', '\b', '\f', '/', '\n', '\r', '\t', '\"', '\\'] + escapeseqs = v.split('\\')[1:] + backslash = False + for i in escapeseqs: + if i == '': + backslash = not backslash + else: + if i[0] not in escapes and i[0] != 'u' and not backslash: + raise Exception("Reserved escape sequence used") + if backslash: + backslash = False + if "\\u" in v: + hexchars = ['0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'] + hexbytes = v.split('\\u') + newv = hexbytes[0] + hexbytes = hexbytes[1:] + for hx in hexbytes: + hxb = "" + try: + if hx[0].lower() in hexchars: + hxb += hx[0].lower() + if hx[1].lower() in hexchars: + hxb += hx[1].lower() + if hx[2].lower() in hexchars: + hxb += hx[2].lower() + if hx[3].lower() in hexchars: + hxb += hx[3].lower() + except IndexError: + if len(hxb) != 2: + raise Exception("Invalid escape sequence") + if len(hxb) != 4 and len(hxb) != 2: + raise Exception("Invalid escape sequence") + newv += unichr(int(hxb, 16)) + newv += unicode(hx[len(hxb):]) + v = newv + for i in range(len(escapes)): + v = v.replace("\\"+escapes[i], escapedchars[i]) + # (where (n) signifies a member of escapes: + # undo (\\)(\\)(n) -> (\\)(\n) + v = v.replace("\\"+escapedchars[i], "\\\\"+escapes[i]) + return (v[1:-1], "str") + elif v[0] == '[': + return (load_array(v), "array") + elif len(v) == 20 and v[-1] == 'Z': + if v[10] == 'T': + return (datetime.datetime.strptime(v, "%Y-%m-%dT%H:%M:%SZ"), "date") + else: + raise Exception("Wait, what?") + else: + itype = "int" + digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] + neg = False + if v[0] == '-': + neg = True + v = v[1:] + if '.' in v: + if v.split('.', 1)[1] == '': + raise Exception("This float is missing digits after the point") + if v[0] not in digits: + raise Exception("This float doesn't have a leading digit") + v = float(v) + itype = "float" + else: + v = int(v) + if neg: + return (0 - v, itype) + return (v, itype) + + +def load_array(a): + atype = None + retval = [] + a = a.strip() + if '[' not in a[1:-1]: + strarray = False + tmpa = a[1:-1].strip() + if tmpa != '' and tmpa[0] == '"': + strarray = True + a = a[1:-1].split(',') + b = 0 + if strarray: + while b < len(a) - 1: + while a[b].strip()[-1] != '"' and a[b+1].strip()[0] != '"': + a[b] = a[b] + ',' + a[b+1] + if b < len(a) - 2: + a = a[:b+1] + a[b+2:] + else: + a = a[:b+1] + b += 1 + else: + al = list(a[1:-1]) + a = [] + openarr = 0 + j = 0 + for i in range(len(al)): + if al[i] == '[': + openarr += 1 + elif al[i] == ']': + openarr -= 1 + elif al[i] == ',' and not openarr: + a.append(''.join(al[j:i])) + j = i+1 + a.append(''.join(al[j:])) + for i in range(len(a)): + a[i] = a[i].strip() + if a[i] != '': + nval, ntype = load_value(a[i]) + if atype: + if ntype != atype: + raise Exception("Not a homogeneous array") + else: + atype = ntype + retval.append(nval) + return retval + +def dump(o, f): + """Writes out to f the toml corresponding to o. Returns said toml.""" + if f.write: + d = dumps(o) + f.write(d) + return d + else: + raise Exception("You can only dump an object to a file descriptor") + +def dumps(o): + """Returns a string containing the toml corresponding to o, a dictionary""" + retval = "" + addtoretval, sections = dump_sections(o, "") + retval += addtoretval + while sections != {}: + newsections = {} + for section in sections: + addtoretval, addtosections = dump_sections(sections[section], section) + if addtoretval: + retval += "["+section+"]\n" + retval += addtoretval + for s in addtosections: + newsections[section+"."+s] = addtosections[s] + sections = newsections + return retval + +def dump_sections(o, sup): + retstr = "" + if sup != "" and sup[-1] != ".": + sup += '.' + retdict = {} + arraystr = "" + for section in o: + if not isinstance(o[section], dict): + arrayoftables = False + if isinstance(o[section], list): + for a in o[section]: + if isinstance(a, dict): + arrayoftables = True + if arrayoftables: + for a in o[section]: + arraytabstr = "" + arraystr += "[["+sup+section+"]]\n" + s, d = dump_sections(a, sup+section) + if s: + if s[0] == "[": + arraytabstr += s + else: + arraystr += s + while d != {}: + newd = {} + for dsec in d: + s1, d1 = dump_sections(d[dsec], sup+section+dsec) + if s1: + arraytabstr += "["+sup+section+"."+dsec+"]\n" + arraytabstr += s1 + for s1 in d1: + newd[dsec+"."+s1] = d1[s1] + d = newd + arraystr += arraytabstr + else: + retstr += section + " = " + str(dump_value(o[section])) + '\n' + else: + retdict[section] = o[section] + retstr += arraystr + return (retstr, retdict) + +def dump_value(v): + if isinstance(v, list): + t = [] + retval = "[" + for u in v: + t.append(dump_value(u)) + while t != []: + s = [] + for u in t: + if isinstance(u, list): + for r in u: + s.append(r) + else: + retval += " " + str(u) + "," + t = s + retval += "]" + return retval + if isinstance(v, (str, unicode)): + escapes = ['\\', '0', 'b', 'f', '/', 'n', 'r', 't', '"'] + escapedchars = ['\\', '\0', '\b', '\f', '/', '\n', '\r', '\t', '\"'] + for i in range(len(escapes)): + v = v.replace(escapedchars[i], "\\"+escapes[i]) + return str('"'+v+'"') + if isinstance(v, bool): + return str(v).lower() + if isinstance(v, datetime.datetime): + return v.isoformat()[:19]+'Z' + if isinstance(v, float): + return '{0:f}'.format(decimal.Decimal(str(v))) + return v + +def toml_merge_dict(a, b): + for k in a: + if isinstance(a[k], dict): + try: + b[k] + except KeyError: + continue + if isinstance(b[k], dict): + b[k] = toml_merge_dict(a[k], b[k]) + else: + raise Exception("Can't merge dict and nondict in toml object") + a.update(b) + return a diff --git a/servobuild.example b/servobuild.example new file mode 100644 index 00000000000..71d693a3225 --- /dev/null +++ b/servobuild.example @@ -0,0 +1,16 @@ +# Tool options +[tools] +# If system-rust is true, will use rustc/rustdoc from the path, or if +# rust-root is specified, will make sure that rust-root is in the path +# when building. Similarly for Cargo. This takes care of PATH as well as +# [DY]LD_LIBRARY_PATH. +system-rust = false +rust-root = "/path/to/rust" +system-cargo = false +cargo-root = "/path/to/cargo" + +# Android information +[android] +sdk = "/opt/android-sdk" +ndk = "/opt/android-ndk" +toolchain = "/opt/android-toolchain" diff --git a/src/README.md b/src/README.md deleted file mode 100644 index f62a6ed7527..00000000000 --- a/src/README.md +++ /dev/null @@ -1,65 +0,0 @@ -Descriptions of the Servo source directories. For the most part these represent a single -crate or library. - -## Servo components - -* `components/gfx`: Graphics rendering, fonts, and text shaping. -* `components/main`: The top-level Servo crate. Contains compositing, DOM, layout, and script. -* `components/net`: Networking, caching, image decoding. -* `components/util`: Various utility functions used by other Servo components. - -## Supporting libraries - -These libraries are used in all Servo ports. In keeping with Servo's philosophy of modularity, -they are designed to be useful in other Rust projects. - -* `support/azure`: A cross-platform 2D drawing library from the Mozilla project. Azure can render - with Direct2D, Core Graphics (Quartz), Skia, and Cairo. -* `support/css`: A low-level CSS parsing library for Rust. -* `support/geom`: A simple Euclidean geometry and linear algebra library. -* `support/glut`: Bindings to the GLUT windowing framework. This bare-bones windowing framework is - useful for testing the engine without browser chrome. -* `support/harfbuzz`: A mature Unicode- and OpenType-aware text shaping library, used by many - rendering engines and toolkits. -* `support/http-client`: An HTTP client library for Rust. -* `support/hubbub`: The HTML parser from the NetSurf project. This is a temporary solution for HTML - parsing until a pure-Rust solution is available. -* `support/layers`: A simple GPU-accelerated 2D scene graph library, somewhat similar to libraries - like Clutter. -* `support/libparserutils`: A parsing library used by `hubbub` and `netsurfcss`. -* `support/opengles`: Bindings to OpenGL ES 2.0. -* `support/png`: Bindings to libpng. -* `support/sharegl`: A library for sharing OpenGL or Direct3D textures between processes. -* `support/skia`: Google's accelerated 2D rendering library. -* `support/spidermonkey`: Mozilla's JavaScript engine. -* `support/stb-image`: A minimalist image decoding library. This is a temporary stopgap for image - decoding until a higher-performance solution is available. - -## Platform-specific bindings - -### Linux - -* `platform/linux/rust-fontconfig`: Bindings to the freedesktop.org `fontconfig` library. -* `platform/linux/rust-freetype`: Bindings to the FreeType library. -* `platform/linux/rust-xlib`: Bindings to the X Window System libraries. - -### Mac - -* `platform/macos/rust-cocoa`: General Cocoa bindings. -* `platform/macos/rust-core-foundation`: Bindings to Core Foundation. -* `platform/macos/rust-core-graphics`: Bindings to Core Graphics/Quartz. -* `platform/macos/rust-core-text`: Bindings to Core Text. -* `platform/macos/rust-io-surface`: Bindings to the `IOSurface` library. -* `platform/macos/rust-task_info`: Bindings to `task_info()`. - -## Tests - -* `test/harness/contenttest`: JavaScript test runner. -* `test/harness/reftest`: Reference (layout) test runner. -* `test/html`: Test cases. - -## Miscellaneous - -* `etc`: Various scripts and files that don't belong anywhere else. -* `etc/patches`: Patches for upstream libraries. - diff --git a/src/components/main/servo.rs b/src/lib.rs similarity index 94% rename from src/components/main/servo.rs rename to src/lib.rs index 9730a7f4191..f2292635a17 100644 --- a/src/components/main/servo.rs +++ b/src/lib.rs @@ -2,7 +2,6 @@ * 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/. */ -#![crate_name = "servo"] #![comment = "The Servo Parallel Browser Project"] #![license = "MPL"] @@ -59,17 +58,6 @@ use std::string; #[cfg(not(test))] use url::{Url, UrlParser}; - -#[cfg(not(test), target_os="linux")] -#[cfg(not(test), target_os="macos")] -#[start] -#[allow(dead_code)] -fn start(argc: int, argv: *const *const u8) -> int { - native::start(argc, argv, proc() { - opts::from_cmdline_args(os::args().as_slice()).map(run); - }) -} - #[cfg(not(test), target_os="android")] #[no_mangle] #[allow(dead_code)] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 00000000000..7c3db1b91f3 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,32 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +#![comment = "The Servo Parallel Browser Project"] +#![license = "MPL"] + +extern crate servo; +extern crate native; +extern crate servo_util = "util"; + +#[cfg(not(test),not(target_os="android"))] +use servo_util::opts; + +#[cfg(not(test),not(target_os="android"))] +use servo::run; + +#[cfg(not(test),not(target_os="android"))] +use std::os; + +#[cfg(not(test), target_os="linux")] +#[cfg(not(test), target_os="macos")] +#[start] +#[allow(dead_code)] +fn start(argc: int, argv: *const *const u8) -> int { + native::start(argc, argv, proc() { + opts::from_cmdline_args(os::args().as_slice()).map(run); + }) +} + +#[cfg(not(test), target_os="android")] +fn main() {} diff --git a/src/platform/android/libexpat b/src/platform/android/libexpat deleted file mode 160000 index e74cfc25628..00000000000 --- a/src/platform/android/libexpat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e74cfc256285a94b84c5b019714e922d37d0a286 diff --git a/src/platform/android/libfreetype2 b/src/platform/android/libfreetype2 deleted file mode 160000 index 3030c434349..00000000000 --- a/src/platform/android/libfreetype2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3030c434349f39dd16d330b07f3ec6db917ea882 diff --git a/src/platform/android/servo-android-glue b/src/platform/android/servo-android-glue deleted file mode 160000 index 1b406788b55..00000000000 --- a/src/platform/android/servo-android-glue +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b406788b5581e3a446326f1396ca50e628dd810 diff --git a/src/platform/fontconfig/fontconfig b/src/platform/fontconfig/fontconfig deleted file mode 160000 index 23161fabaa1..00000000000 --- a/src/platform/fontconfig/fontconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 23161fabaa1505bfc21cf663be9447f4e720cb76 diff --git a/src/platform/linux/rust-fontconfig b/src/platform/linux/rust-fontconfig deleted file mode 160000 index 6d742cf825d..00000000000 --- a/src/platform/linux/rust-fontconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6d742cf825d0266562a9f0c9735ce95e89d053db diff --git a/src/platform/linux/rust-freetype b/src/platform/linux/rust-freetype deleted file mode 160000 index 5aa1d323ab8..00000000000 --- a/src/platform/linux/rust-freetype +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5aa1d323ab85c7f3c3a3a1585da53a54cf301b98 diff --git a/src/platform/linux/rust-xlib b/src/platform/linux/rust-xlib deleted file mode 160000 index 79904fb42ff..00000000000 --- a/src/platform/linux/rust-xlib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 79904fb42ff8a0e888f70fae336fbf6c11f1e6c8 diff --git a/src/platform/macos/rust-cocoa b/src/platform/macos/rust-cocoa deleted file mode 160000 index f24aa3e1c84..00000000000 --- a/src/platform/macos/rust-cocoa +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f24aa3e1c845db32f0a9ed336453b22bfc63b7f2 diff --git a/src/platform/macos/rust-core-foundation b/src/platform/macos/rust-core-foundation deleted file mode 160000 index 265586fe94b..00000000000 --- a/src/platform/macos/rust-core-foundation +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 265586fe94b237b06290421c147a6cd47f0bc15c diff --git a/src/platform/macos/rust-core-graphics b/src/platform/macos/rust-core-graphics deleted file mode 160000 index 36817ab7a64..00000000000 --- a/src/platform/macos/rust-core-graphics +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36817ab7a6457702ffbe0443e75820def88264be diff --git a/src/platform/macos/rust-core-text b/src/platform/macos/rust-core-text deleted file mode 160000 index 93dd419820e..00000000000 --- a/src/platform/macos/rust-core-text +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 93dd419820e1420db820fee0b5ab9432c75bcff1 diff --git a/src/platform/macos/rust-io-surface b/src/platform/macos/rust-io-surface deleted file mode 160000 index 44245c425d5..00000000000 --- a/src/platform/macos/rust-io-surface +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 44245c425d5b068af35a67aeae7d86369c594bcf diff --git a/src/platform/macos/rust-task_info/configure b/src/platform/macos/rust-task_info/configure deleted file mode 100755 index 62a0f4cd3e6..00000000000 --- a/src/platform/macos/rust-task_info/configure +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -SRCDIR="$(cd $(dirname $0) && pwd)" -sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile diff --git a/src/support/alert/rust-alert b/src/support/alert/rust-alert deleted file mode 160000 index 6fdfe1254a2..00000000000 --- a/src/support/alert/rust-alert +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6fdfe1254a29f1c742cc25545313e3463161e621 diff --git a/src/support/azure/rust-azure b/src/support/azure/rust-azure deleted file mode 160000 index f7b3a1e5c2d..00000000000 --- a/src/support/azure/rust-azure +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7b3a1e5c2d21a505b808a3167e8f23b8c9c2e48 diff --git a/src/support/css/rust-cssparser b/src/support/css/rust-cssparser deleted file mode 160000 index 48e517b40c8..00000000000 --- a/src/support/css/rust-cssparser +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48e517b40c8aad55b5f2b7072d092102b48797bc diff --git a/src/support/egl/rust-egl b/src/support/egl/rust-egl deleted file mode 160000 index 5ba3f58283d..00000000000 --- a/src/support/egl/rust-egl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5ba3f58283d5ad6307a654f8dd72cf866755b3b5 diff --git a/src/support/encoding/Makefile.in b/src/support/encoding/Makefile.in deleted file mode 100644 index 6d36cf946c2..00000000000 --- a/src/support/encoding/Makefile.in +++ /dev/null @@ -1,51 +0,0 @@ -VPATH=%VPATH% - -CC ?= gcc -CXX ?= g++ -CXXFLAGS ?= -AR ?= ar -RUSTC ?= rustc -RUSTDOC ?= rustdoc -RUSTFLAGS ?= -EXT_DEPS ?= -RUSTDOC_FLAGS ?= -RUSTDOC_TARGET ?= doc - -LIB_RS = src/encoding/lib.rs -RUST_SRC = $(shell find $(VPATH)/src/encoding/. -type f -name '*.rs') - -# rustdoc links dynamically, so we need to add '.' to the dynamic library path -ifeq ($(CFG_OSTYPE),apple-darwin) -export DYLD_LIBRARY_PATH := .:$(DYLD_LIBRARY_PATH) -else -export LD_LIBRARY_PATH := .:$(LD_LIBRARY_PATH) -endif - -.PHONY: all -all: libencoding.dummy - -libencoding.dummy: $(LIB_RS) $(RUST_SRC) $(EXT_DEPS) - $(RUSTC) $(RUSTFLAGS) $< --crate-type rlib - touch $@ - -rustencoding-test: $(LIB_RS) $(RUST_SRC) libencoding.dummy - $(RUSTC) $(RUSTFLAGS) $< -o $@ --test - -.PHONY: doctest -doctest: $(LIB_RS) $(RUST_SRC) libencoding.dummy - $(RUSTDOC) $< -L . --test - -.PHONY: check -check: rustencoding-test - ./rustencoding-test - -.PHONY: doc -doc: $(RUSTDOC_TARGET)/encoding/index.html - -$(RUSTDOC_TARGET)/encoding/index.html: $(LIB_RS) $(RUST_SRC) $(EXT_DEPS) - $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) - -.PHONY: clean -clean: - rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *.exe *-test - diff --git a/src/support/encoding/configure b/src/support/encoding/configure deleted file mode 100755 index f0af33bea1e..00000000000 --- a/src/support/encoding/configure +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -SRCDIR="$(cd $(dirname $0) && pwd)" -sed "s#%VPATH%#${SRCDIR}/rust-encoding#" ${SRCDIR}/Makefile.in > Makefile - diff --git a/src/support/encoding/rust-encoding b/src/support/encoding/rust-encoding deleted file mode 160000 index 6bb05b9c27d..00000000000 --- a/src/support/encoding/rust-encoding +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6bb05b9c27d6801a3981ca0da4aa5bb9808e6396 diff --git a/src/support/geom/rust-geom b/src/support/geom/rust-geom deleted file mode 160000 index c733f78e06b..00000000000 --- a/src/support/geom/rust-geom +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c733f78e06bd02f7498e93b391e0f6094d91786a diff --git a/src/support/glfw/glfw b/src/support/glfw/glfw deleted file mode 160000 index bf90cb8b336..00000000000 --- a/src/support/glfw/glfw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bf90cb8b336b2cfb49572dd964c5d2c23297502e diff --git a/src/support/glfw/glfw-rs b/src/support/glfw/glfw-rs deleted file mode 160000 index 12180ed055f..00000000000 --- a/src/support/glfw/glfw-rs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12180ed055f9df2b28cee4bbbf26fc68b3c405f3 diff --git a/src/support/glut/rust-glut b/src/support/glut/rust-glut deleted file mode 160000 index c7d9118d824..00000000000 --- a/src/support/glut/rust-glut +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c7d9118d824517da3769e93b1b90cc8e47112d62 diff --git a/src/support/harfbuzz/rust-harfbuzz b/src/support/harfbuzz/rust-harfbuzz deleted file mode 160000 index ee4c20f4b6b..00000000000 --- a/src/support/harfbuzz/rust-harfbuzz +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ee4c20f4b6bee1b360cb708fe24fdc8350cb80ec diff --git a/src/support/http/rust-http b/src/support/http/rust-http deleted file mode 160000 index d07678333c5..00000000000 --- a/src/support/http/rust-http +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d07678333c5f9faa4886f7261386f5bf55c1fd5e diff --git a/src/support/hubbub/libhubbub b/src/support/hubbub/libhubbub deleted file mode 160000 index aa6f30d77bd..00000000000 --- a/src/support/hubbub/libhubbub +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa6f30d77bdcb92277648a503dd5083db0fc31a2 diff --git a/src/support/hubbub/rust-hubbub b/src/support/hubbub/rust-hubbub deleted file mode 160000 index 0e6502e5b1b..00000000000 --- a/src/support/hubbub/rust-hubbub +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0e6502e5b1bc795dbc4927bdb4616d9d7d686271 diff --git a/src/support/layers/rust-layers b/src/support/layers/rust-layers deleted file mode 160000 index c04029907be..00000000000 --- a/src/support/layers/rust-layers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c04029907be1f2242d48235d3b03608b905bbd9f diff --git a/src/support/libparserutils/libparserutils b/src/support/libparserutils/libparserutils deleted file mode 160000 index ce1dbab3aff..00000000000 --- a/src/support/libparserutils/libparserutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ce1dbab3affee0b3ba569ceb93039a1961ffb428 diff --git a/src/support/opengles/rust-opengles b/src/support/opengles/rust-opengles deleted file mode 160000 index 4e5740761b2..00000000000 --- a/src/support/opengles/rust-opengles +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4e5740761b2a143e7d3290a58ccabc89200a4763 diff --git a/src/support/phf/rust-phf b/src/support/phf/rust-phf deleted file mode 160000 index 997da1ff70c..00000000000 --- a/src/support/phf/rust-phf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 997da1ff70cc52988641a75e1a46d4b398d5fe12 diff --git a/src/support/png/libpng b/src/support/png/libpng deleted file mode 160000 index bda7eca7c39..00000000000 --- a/src/support/png/libpng +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bda7eca7c3962caadf1c25dac215519b8935b22f diff --git a/src/support/png/rust-png b/src/support/png/rust-png deleted file mode 160000 index 0fae0f48754..00000000000 --- a/src/support/png/rust-png +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0fae0f48754d1af9b33d208a87f9abc632dc2dc8 diff --git a/src/support/sharegl/sharegl b/src/support/sharegl/sharegl deleted file mode 160000 index f2ae0dfd8c5..00000000000 --- a/src/support/sharegl/sharegl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f2ae0dfd8c57e851facb08522019e1a990601b3f diff --git a/src/support/skia/skia b/src/support/skia/skia deleted file mode 160000 index d12079aaf6e..00000000000 --- a/src/support/skia/skia +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d12079aaf6ee17cc1af51de71a12f50f2ff2a457 diff --git a/src/support/spidermonkey/mozjs b/src/support/spidermonkey/mozjs deleted file mode 160000 index a3454dce2b1..00000000000 --- a/src/support/spidermonkey/mozjs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a3454dce2b179eec3cb9906318d3e64dbc9d1a1f diff --git a/src/support/spidermonkey/rust-mozjs b/src/support/spidermonkey/rust-mozjs deleted file mode 160000 index 4a360199a4e..00000000000 --- a/src/support/spidermonkey/rust-mozjs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a360199a4e87427234339bc3c1362ab355dcde1 diff --git a/src/support/ssl/rust-openssl b/src/support/ssl/rust-openssl deleted file mode 160000 index 05bc3cbc68b..00000000000 --- a/src/support/ssl/rust-openssl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 05bc3cbc68bf097debbf109cf36374e313b15f94 diff --git a/src/support/stb-image/rust-stb-image b/src/support/stb-image/rust-stb-image deleted file mode 160000 index 4fd755a37a3..00000000000 --- a/src/support/stb-image/rust-stb-image +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4fd755a37a3eb443b6b35c37f042cd7d2a1aebf8 diff --git a/src/support/stringcache/string-cache b/src/support/stringcache/string-cache deleted file mode 160000 index ef968ec053a..00000000000 --- a/src/support/stringcache/string-cache +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ef968ec053aa7cce7b5e0c422cac23a6d249ef7e diff --git a/src/support/url/Makefile.in b/src/support/url/Makefile.in deleted file mode 100644 index d628a6dc4b8..00000000000 --- a/src/support/url/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -VPATH=%VPATH% - -RUSTC ?= rustc -RUSTFLAGS ?= -EXT_DEPS ?= -RUSTDOC ?= rustdoc -RUSTDOC_FLAGS ?= -RUSTDOC_TARGET ?= doc - -SRC=$(shell find $(VPATH)/src -type f) - -.PHONY: all -all: liburl.dummy - -liburl.dummy: src/lib.rs $(SRC) $(EXT_DEPS) - $(RUSTC) $(RUSTFLAGS) $< --out-dir . --crate-type rlib - touch $@ - -url-test: src/lib.rs $(SRC) - $(RUSTC) $(RUSTFLAGS) $< -o $@ --test - -.PHONY: check -check: url-test - ./url-test $(TEST) - -.PHONY: doc -doc: $(RUSTDOC_TARGET)/url/index.html - -$(RUSTDOC_TARGET)/url/index.html: src/lib.rs $(SRC) $(EXT_DEPS) - $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) - -.PHONY: clean -clean: - rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test diff --git a/src/support/url/configure b/src/support/url/configure deleted file mode 100755 index 4e86aec066d..00000000000 --- a/src/support/url/configure +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -SRCDIR="$(cd $(dirname $0) && pwd)" -sed "s#%VPATH%#${SRCDIR}/rust-url#" ${SRCDIR}/Makefile.in > Makefile diff --git a/src/support/url/rust-url b/src/support/url/rust-url deleted file mode 160000 index 678bb4d5263..00000000000 --- a/src/support/url/rust-url +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 678bb4d52638b1cfdab78ef8e521566c9240fb1a diff --git a/support/glfw-rs b/support/glfw-rs new file mode 160000 index 00000000000..a646f0badac --- /dev/null +++ b/support/glfw-rs @@ -0,0 +1 @@ +Subproject commit a646f0badaccaebd61d0f8aaec5646da0a7c2a14 diff --git a/support/rust-task_info/Cargo.toml b/support/rust-task_info/Cargo.toml new file mode 100644 index 00000000000..16df934d054 --- /dev/null +++ b/support/rust-task_info/Cargo.toml @@ -0,0 +1,7 @@ +[package] + +name = "task_info" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +build = "make -f makefile.cargo" diff --git a/src/platform/macos/rust-task_info/Makefile.in b/support/rust-task_info/Makefile.in similarity index 100% rename from src/platform/macos/rust-task_info/Makefile.in rename to support/rust-task_info/Makefile.in diff --git a/support/rust-task_info/makefile.cargo b/support/rust-task_info/makefile.cargo new file mode 100644 index 00000000000..01be6df7b4c --- /dev/null +++ b/support/rust-task_info/makefile.cargo @@ -0,0 +1,20 @@ +CC ?= gcc +AR ?= ar +CFLAGS += -Wall + +.PHONY: all +ifeq (darwin,$(findstring darwin,$(TARGET))) + +all: $(OUT_DIR)/libtask_info.a + +$(OUT_DIR)/libtask_info.a: $(OUT_DIR)/task_info.o + $(AR) rcs $@ $^ + +$(OUT_DIR)/task_info.o: src/task_info.c + $(CC) $(CFLAGS) $< -o $@ -c + +else + +all: + +endif diff --git a/src/platform/macos/rust-task_info/task_info.rc b/support/rust-task_info/src/lib.rs similarity index 95% rename from src/platform/macos/rust-task_info/task_info.rc rename to support/rust-task_info/src/lib.rs index 8952a508871..1ecb18c252f 100644 --- a/src/platform/macos/rust-task_info/task_info.rc +++ b/support/rust-task_info/src/lib.rs @@ -17,5 +17,6 @@ extern crate libc; +#[cfg(target_os="macos")] pub mod task_basic_info; diff --git a/src/platform/macos/rust-task_info/task_basic_info.rs b/support/rust-task_info/src/task_basic_info.rs similarity index 100% rename from src/platform/macos/rust-task_info/task_basic_info.rs rename to support/rust-task_info/src/task_basic_info.rs diff --git a/src/platform/macos/rust-task_info/task_info.c b/support/rust-task_info/src/task_info.c similarity index 100% rename from src/platform/macos/rust-task_info/task_info.c rename to support/rust-task_info/src/task_info.c diff --git a/src/test/content/harness.js b/tests/content/harness.js similarity index 100% rename from src/test/content/harness.js rename to tests/content/harness.js diff --git a/src/test/content/test.jpg b/tests/content/test.jpg similarity index 100% rename from src/test/content/test.jpg rename to tests/content/test.jpg diff --git a/src/test/content/test.png b/tests/content/test.png similarity index 100% rename from src/test/content/test.png rename to tests/content/test.png diff --git a/src/test/content/test_DOMParser.html b/tests/content/test_DOMParser.html similarity index 100% rename from src/test/content/test_DOMParser.html rename to tests/content/test_DOMParser.html diff --git a/src/test/content/test_Event.html b/tests/content/test_Event.html similarity index 100% rename from src/test/content/test_Event.html rename to tests/content/test_Event.html diff --git a/src/test/content/test_MouseEvent.html b/tests/content/test_MouseEvent.html similarity index 100% rename from src/test/content/test_MouseEvent.html rename to tests/content/test_MouseEvent.html diff --git a/src/test/content/test_body_listener.html b/tests/content/test_body_listener.html similarity index 100% rename from src/test/content/test_body_listener.html rename to tests/content/test_body_listener.html diff --git a/src/test/content/test_caption.html b/tests/content/test_caption.html similarity index 100% rename from src/test/content/test_caption.html rename to tests/content/test_caption.html diff --git a/src/test/content/test_click_prevent.html b/tests/content/test_click_prevent.html similarity index 100% rename from src/test/content/test_click_prevent.html rename to tests/content/test_click_prevent.html diff --git a/src/test/content/test_collections.html b/tests/content/test_collections.html similarity index 100% rename from src/test/content/test_collections.html rename to tests/content/test_collections.html diff --git a/src/test/content/test_create_element.html b/tests/content/test_create_element.html similarity index 100% rename from src/test/content/test_create_element.html rename to tests/content/test_create_element.html diff --git a/src/test/content/test_documentElement.html b/tests/content/test_documentElement.html similarity index 100% rename from src/test/content/test_documentElement.html rename to tests/content/test_documentElement.html diff --git a/src/test/content/test_document_adoptNode.html b/tests/content/test_document_adoptNode.html similarity index 100% rename from src/test/content/test_document_adoptNode.html rename to tests/content/test_document_adoptNode.html diff --git a/src/test/content/test_document_body.html b/tests/content/test_document_body.html similarity index 100% rename from src/test/content/test_document_body.html rename to tests/content/test_document_body.html diff --git a/src/test/content/test_document_characterSet.html b/tests/content/test_document_characterSet.html similarity index 100% rename from src/test/content/test_document_characterSet.html rename to tests/content/test_document_characterSet.html diff --git a/src/test/content/test_document_characterSet_default.html b/tests/content/test_document_characterSet_default.html similarity index 100% rename from src/test/content/test_document_characterSet_default.html rename to tests/content/test_document_characterSet_default.html diff --git a/src/test/content/test_document_characterSet_invalid.html b/tests/content/test_document_characterSet_invalid.html similarity index 100% rename from src/test/content/test_document_characterSet_invalid.html rename to tests/content/test_document_characterSet_invalid.html diff --git a/src/test/content/test_document_characterSet_long.html b/tests/content/test_document_characterSet_long.html similarity index 100% rename from src/test/content/test_document_characterSet_long.html rename to tests/content/test_document_characterSet_long.html diff --git a/src/test/content/test_document_characterSet_short.html b/tests/content/test_document_characterSet_short.html similarity index 100% rename from src/test/content/test_document_characterSet_short.html rename to tests/content/test_document_characterSet_short.html diff --git a/src/test/content/test_document_compatMode.html b/tests/content/test_document_compatMode.html similarity index 100% rename from src/test/content/test_document_compatMode.html rename to tests/content/test_document_compatMode.html diff --git a/src/test/content/test_document_compatMode_loose.html b/tests/content/test_document_compatMode_loose.html similarity index 100% rename from src/test/content/test_document_compatMode_loose.html rename to tests/content/test_document_compatMode_loose.html diff --git a/src/test/content/test_document_compatMode_strict.html b/tests/content/test_document_compatMode_strict.html similarity index 100% rename from src/test/content/test_document_compatMode_strict.html rename to tests/content/test_document_compatMode_strict.html diff --git a/src/test/content/test_document_contenttype.html b/tests/content/test_document_contenttype.html similarity index 100% rename from src/test/content/test_document_contenttype.html rename to tests/content/test_document_contenttype.html diff --git a/src/test/content/test_document_datalist_options.html b/tests/content/test_document_datalist_options.html similarity index 100% rename from src/test/content/test_document_datalist_options.html rename to tests/content/test_document_datalist_options.html diff --git a/src/test/content/test_document_getElementById.html b/tests/content/test_document_getElementById.html similarity index 100% rename from src/test/content/test_document_getElementById.html rename to tests/content/test_document_getElementById.html diff --git a/src/test/content/test_document_getElementsByName.html b/tests/content/test_document_getElementsByName.html similarity index 100% rename from src/test/content/test_document_getElementsByName.html rename to tests/content/test_document_getElementsByName.html diff --git a/src/test/content/test_document_head.html b/tests/content/test_document_head.html similarity index 100% rename from src/test/content/test_document_head.html rename to tests/content/test_document_head.html diff --git a/src/test/content/test_document_implementation.html b/tests/content/test_document_implementation.html similarity index 100% rename from src/test/content/test_document_implementation.html rename to tests/content/test_document_implementation.html diff --git a/src/test/content/test_document_links_cache.html b/tests/content/test_document_links_cache.html similarity index 100% rename from src/test/content/test_document_links_cache.html rename to tests/content/test_document_links_cache.html diff --git a/src/test/content/test_document_set_node_value.html b/tests/content/test_document_set_node_value.html similarity index 100% rename from src/test/content/test_document_set_node_value.html rename to tests/content/test_document_set_node_value.html diff --git a/src/test/content/test_document_title_nontextchildren.html b/tests/content/test_document_title_nontextchildren.html similarity index 100% rename from src/test/content/test_document_title_nontextchildren.html rename to tests/content/test_document_title_nontextchildren.html diff --git a/src/test/content/test_document_url.html b/tests/content/test_document_url.html similarity index 100% rename from src/test/content/test_document_url.html rename to tests/content/test_document_url.html diff --git a/src/test/content/test_domtokenlist.html b/tests/content/test_domtokenlist.html similarity index 100% rename from src/test/content/test_domtokenlist.html rename to tests/content/test_domtokenlist.html diff --git a/src/test/content/test_element_attribute.html b/tests/content/test_element_attribute.html similarity index 100% rename from src/test/content/test_element_attribute.html rename to tests/content/test_element_attribute.html diff --git a/src/test/content/test_element_attributes.html b/tests/content/test_element_attributes.html similarity index 100% rename from src/test/content/test_element_attributes.html rename to tests/content/test_element_attributes.html diff --git a/src/test/content/test_element_classList.html b/tests/content/test_element_classList.html similarity index 100% rename from src/test/content/test_element_classList.html rename to tests/content/test_element_classList.html diff --git a/src/test/content/test_element_className.html b/tests/content/test_element_className.html similarity index 100% rename from src/test/content/test_element_className.html rename to tests/content/test_element_className.html diff --git a/src/test/content/test_element_matches.html b/tests/content/test_element_matches.html similarity index 100% rename from src/test/content/test_element_matches.html rename to tests/content/test_element_matches.html diff --git a/src/test/content/test_empty_clientrect.html b/tests/content/test_empty_clientrect.html similarity index 100% rename from src/test/content/test_empty_clientrect.html rename to tests/content/test_empty_clientrect.html diff --git a/src/test/content/test_enabled_disabled_selectors.html b/tests/content/test_enabled_disabled_selectors.html similarity index 100% rename from src/test/content/test_enabled_disabled_selectors.html rename to tests/content/test_enabled_disabled_selectors.html diff --git a/src/test/content/test_event_dispatch.html b/tests/content/test_event_dispatch.html similarity index 100% rename from src/test/content/test_event_dispatch.html rename to tests/content/test_event_dispatch.html diff --git a/src/test/content/test_event_dispatch_dynamic.html b/tests/content/test_event_dispatch_dynamic.html similarity index 100% rename from src/test/content/test_event_dispatch_dynamic.html rename to tests/content/test_event_dispatch_dynamic.html diff --git a/src/test/content/test_event_dispatch_order.html b/tests/content/test_event_dispatch_order.html similarity index 100% rename from src/test/content/test_event_dispatch_order.html rename to tests/content/test_event_dispatch_order.html diff --git a/src/test/content/test_event_handler_syntax_error.html b/tests/content/test_event_handler_syntax_error.html similarity index 100% rename from src/test/content/test_event_handler_syntax_error.html rename to tests/content/test_event_handler_syntax_error.html diff --git a/src/test/content/test_event_listener.html b/tests/content/test_event_listener.html similarity index 100% rename from src/test/content/test_event_listener.html rename to tests/content/test_event_listener.html diff --git a/src/test/content/test_getBoundingClientRect.html b/tests/content/test_getBoundingClientRect.html similarity index 100% rename from src/test/content/test_getBoundingClientRect.html rename to tests/content/test_getBoundingClientRect.html diff --git a/src/test/content/test_global.html b/tests/content/test_global.html similarity index 100% rename from src/test/content/test_global.html rename to tests/content/test_global.html diff --git a/src/test/content/test_htmlcollection.html b/tests/content/test_htmlcollection.html similarity index 100% rename from src/test/content/test_htmlcollection.html rename to tests/content/test_htmlcollection.html diff --git a/src/test/content/test_htmlfieldsetelement_elements.html b/tests/content/test_htmlfieldsetelement_elements.html similarity index 100% rename from src/test/content/test_htmlfieldsetelement_elements.html rename to tests/content/test_htmlfieldsetelement_elements.html diff --git a/src/test/content/test_htmlspacechars.html b/tests/content/test_htmlspacechars.html similarity index 100% rename from src/test/content/test_htmlspacechars.html rename to tests/content/test_htmlspacechars.html diff --git a/src/test/content/test_img_width_height.html b/tests/content/test_img_width_height.html similarity index 100% rename from src/test/content/test_img_width_height.html rename to tests/content/test_img_width_height.html diff --git a/src/test/content/test_inline_event_handler.html b/tests/content/test_inline_event_handler.html similarity index 100% rename from src/test/content/test_inline_event_handler.html rename to tests/content/test_inline_event_handler.html diff --git a/src/test/content/test_innerHTML.html b/tests/content/test_innerHTML.html similarity index 100% rename from src/test/content/test_innerHTML.html rename to tests/content/test_innerHTML.html diff --git a/src/test/content/test_interfaces.html b/tests/content/test_interfaces.html similarity index 100% rename from src/test/content/test_interfaces.html rename to tests/content/test_interfaces.html diff --git a/src/test/content/test_load_event.html b/tests/content/test_load_event.html similarity index 100% rename from src/test/content/test_load_event.html rename to tests/content/test_load_event.html diff --git a/src/test/content/test_navigator.html b/tests/content/test_navigator.html similarity index 100% rename from src/test/content/test_navigator.html rename to tests/content/test_navigator.html diff --git a/src/test/content/test_node_cloneNode.html b/tests/content/test_node_cloneNode.html similarity index 100% rename from src/test/content/test_node_cloneNode.html rename to tests/content/test_node_cloneNode.html diff --git a/src/test/content/test_node_compareDocumentPosition.html b/tests/content/test_node_compareDocumentPosition.html similarity index 100% rename from src/test/content/test_node_compareDocumentPosition.html rename to tests/content/test_node_compareDocumentPosition.html diff --git a/src/test/content/test_node_contains.html b/tests/content/test_node_contains.html similarity index 100% rename from src/test/content/test_node_contains.html rename to tests/content/test_node_contains.html diff --git a/src/test/content/test_node_insertBefore.html b/tests/content/test_node_insertBefore.html similarity index 100% rename from src/test/content/test_node_insertBefore.html rename to tests/content/test_node_insertBefore.html diff --git a/src/test/content/test_node_isEqualNode.html b/tests/content/test_node_isEqualNode.html similarity index 100% rename from src/test/content/test_node_isEqualNode.html rename to tests/content/test_node_isEqualNode.html diff --git a/src/test/content/test_node_normalize.html b/tests/content/test_node_normalize.html similarity index 100% rename from src/test/content/test_node_normalize.html rename to tests/content/test_node_normalize.html diff --git a/src/test/content/test_node_replaceChild.html b/tests/content/test_node_replaceChild.html similarity index 100% rename from src/test/content/test_node_replaceChild.html rename to tests/content/test_node_replaceChild.html diff --git a/src/test/content/test_parentNode_querySelector.html b/tests/content/test_parentNode_querySelector.html similarity index 100% rename from src/test/content/test_parentNode_querySelector.html rename to tests/content/test_parentNode_querySelector.html diff --git a/src/test/content/test_parentNode_querySelectorAll.html b/tests/content/test_parentNode_querySelectorAll.html similarity index 100% rename from src/test/content/test_parentNode_querySelectorAll.html rename to tests/content/test_parentNode_querySelectorAll.html diff --git a/src/test/content/test_parentnodes.html b/tests/content/test_parentnodes.html similarity index 100% rename from src/test/content/test_parentnodes.html rename to tests/content/test_parentnodes.html diff --git a/src/test/content/test_prototypes.html b/tests/content/test_prototypes.html similarity index 100% rename from src/test/content/test_prototypes.html rename to tests/content/test_prototypes.html diff --git a/src/test/content/test_proxy_setter.html b/tests/content/test_proxy_setter.html similarity index 100% rename from src/test/content/test_proxy_setter.html rename to tests/content/test_proxy_setter.html diff --git a/src/test/content/test_script_src_attribute.html b/tests/content/test_script_src_attribute.html similarity index 100% rename from src/test/content/test_script_src_attribute.html rename to tests/content/test_script_src_attribute.html diff --git a/src/test/content/test_script_type.html b/tests/content/test_script_type.html similarity index 100% rename from src/test/content/test_script_type.html rename to tests/content/test_script_type.html diff --git a/src/test/content/test_textcontent.html b/tests/content/test_textcontent.html similarity index 100% rename from src/test/content/test_textcontent.html rename to tests/content/test_textcontent.html diff --git a/src/test/content/test_title.html b/tests/content/test_title.html similarity index 100% rename from src/test/content/test_title.html rename to tests/content/test_title.html diff --git a/src/test/content/test_trace_null.html b/tests/content/test_trace_null.html similarity index 100% rename from src/test/content/test_trace_null.html rename to tests/content/test_trace_null.html diff --git a/src/test/content/test_union.html b/tests/content/test_union.html similarity index 100% rename from src/test/content/test_union.html rename to tests/content/test_union.html diff --git a/src/test/content/test_window.html b/tests/content/test_window.html similarity index 100% rename from src/test/content/test_window.html rename to tests/content/test_window.html diff --git a/src/test/content/test_window_performance.html b/tests/content/test_window_performance.html similarity index 100% rename from src/test/content/test_window_performance.html rename to tests/content/test_window_performance.html diff --git a/src/test/content/test_window_setInterval.html b/tests/content/test_window_setInterval.html similarity index 100% rename from src/test/content/test_window_setInterval.html rename to tests/content/test_window_setInterval.html diff --git a/src/test/harness/contenttest/contenttest.rs b/tests/contenttest.rs similarity index 98% rename from src/test/harness/contenttest/contenttest.rs rename to tests/contenttest.rs index b416f606207..81ce1acdb8b 100644 --- a/src/test/harness/contenttest/contenttest.rs +++ b/tests/contenttest.rs @@ -97,7 +97,7 @@ fn run_test(file: String) { let stderr = InheritFd(2); let args = ["-z", "-f", infile.as_slice()]; - let mut prc = match Command::new("./servo") + let mut prc = match Command::new("target/servo") .args(args) .stdin(Ignored) .stdout(stdout) diff --git a/src/test/html/about-mozilla.html b/tests/html/about-mozilla.html similarity index 100% rename from src/test/html/about-mozilla.html rename to tests/html/about-mozilla.html diff --git a/src/test/html/acid1.html b/tests/html/acid1.html similarity index 100% rename from src/test/html/acid1.html rename to tests/html/acid1.html diff --git a/src/test/html/acid2.html b/tests/html/acid2.html similarity index 100% rename from src/test/html/acid2.html rename to tests/html/acid2.html diff --git a/src/test/html/andreas.jpeg b/tests/html/andreas.jpeg similarity index 100% rename from src/test/html/andreas.jpeg rename to tests/html/andreas.jpeg diff --git a/src/test/html/anonymous_table.html b/tests/html/anonymous_table.html similarity index 100% rename from src/test/html/anonymous_table.html rename to tests/html/anonymous_table.html diff --git a/src/test/html/background.html b/tests/html/background.html similarity index 100% rename from src/test/html/background.html rename to tests/html/background.html diff --git a/src/test/html/bad-line-ends.html b/tests/html/bad-line-ends.html similarity index 100% rename from src/test/html/bad-line-ends.html rename to tests/html/bad-line-ends.html diff --git a/src/test/html/box-model-smoketest.html b/tests/html/box-model-smoketest.html similarity index 100% rename from src/test/html/box-model-smoketest.html rename to tests/html/box-model-smoketest.html diff --git a/src/test/html/color-change-text.html b/tests/html/color-change-text.html similarity index 100% rename from src/test/html/color-change-text.html rename to tests/html/color-change-text.html diff --git a/src/test/html/combining-character-sequences.html b/tests/html/combining-character-sequences.html similarity index 100% rename from src/test/html/combining-character-sequences.html rename to tests/html/combining-character-sequences.html diff --git a/src/test/html/demo.css b/tests/html/demo.css similarity index 100% rename from src/test/html/demo.css rename to tests/html/demo.css diff --git a/src/test/html/demo.html b/tests/html/demo.html similarity index 100% rename from src/test/html/demo.html rename to tests/html/demo.html diff --git a/src/test/html/doge-servo.html b/tests/html/doge-servo.html similarity index 100% rename from src/test/html/doge-servo.html rename to tests/html/doge-servo.html diff --git a/src/test/html/doge-servo.jpg b/tests/html/doge-servo.jpg similarity index 100% rename from src/test/html/doge-servo.jpg rename to tests/html/doge-servo.jpg diff --git a/src/test/html/failure.html b/tests/html/failure.html similarity index 100% rename from src/test/html/failure.html rename to tests/html/failure.html diff --git a/src/test/html/filmstrip.html b/tests/html/filmstrip.html similarity index 100% rename from src/test/html/filmstrip.html rename to tests/html/filmstrip.html diff --git a/src/test/html/fixed_table.html b/tests/html/fixed_table.html similarity index 100% rename from src/test/html/fixed_table.html rename to tests/html/fixed_table.html diff --git a/src/test/html/fixed_table_2.html b/tests/html/fixed_table_2.html similarity index 100% rename from src/test/html/fixed_table_2.html rename to tests/html/fixed_table_2.html diff --git a/src/test/html/fixed_table_additional_cols.html b/tests/html/fixed_table_additional_cols.html similarity index 100% rename from src/test/html/fixed_table_additional_cols.html rename to tests/html/fixed_table_additional_cols.html diff --git a/src/test/html/fixed_table_basic_height.html b/tests/html/fixed_table_basic_height.html similarity index 100% rename from src/test/html/fixed_table_basic_height.html rename to tests/html/fixed_table_basic_height.html diff --git a/src/test/html/fixed_table_simple.html b/tests/html/fixed_table_simple.html similarity index 100% rename from src/test/html/fixed_table_simple.html rename to tests/html/fixed_table_simple.html diff --git a/src/test/html/fixed_table_with_margin_padding.html b/tests/html/fixed_table_with_margin_padding.html similarity index 100% rename from src/test/html/fixed_table_with_margin_padding.html rename to tests/html/fixed_table_with_margin_padding.html diff --git a/src/test/html/head_link_test.html b/tests/html/head_link_test.html similarity index 100% rename from src/test/html/head_link_test.html rename to tests/html/head_link_test.html diff --git a/src/test/html/hello.html b/tests/html/hello.html similarity index 100% rename from src/test/html/hello.html rename to tests/html/hello.html diff --git a/src/test/html/https.html b/tests/html/https.html similarity index 100% rename from src/test/html/https.html rename to tests/html/https.html diff --git a/src/test/html/ib-split-image.html b/tests/html/ib-split-image.html similarity index 100% rename from src/test/html/ib-split-image.html rename to tests/html/ib-split-image.html diff --git a/src/test/html/inline-block-split-2.html b/tests/html/inline-block-split-2.html similarity index 100% rename from src/test/html/inline-block-split-2.html rename to tests/html/inline-block-split-2.html diff --git a/src/test/html/inline-block-split-3.html b/tests/html/inline-block-split-3.html similarity index 100% rename from src/test/html/inline-block-split-3.html rename to tests/html/inline-block-split-3.html diff --git a/src/test/html/inline-block-split-float.html b/tests/html/inline-block-split-float.html similarity index 100% rename from src/test/html/inline-block-split-float.html rename to tests/html/inline-block-split-float.html diff --git a/src/test/html/inline-block-split.html b/tests/html/inline-block-split.html similarity index 100% rename from src/test/html/inline-block-split.html rename to tests/html/inline-block-split.html diff --git a/src/test/html/inline_bg_color_simple.html b/tests/html/inline_bg_color_simple.html similarity index 100% rename from src/test/html/inline_bg_color_simple.html rename to tests/html/inline_bg_color_simple.html diff --git a/src/test/html/itried.jpg b/tests/html/itried.jpg similarity index 100% rename from src/test/html/itried.jpg rename to tests/html/itried.jpg diff --git a/src/test/html/ligatures.html b/tests/html/ligatures.html similarity index 100% rename from src/test/html/ligatures.html rename to tests/html/ligatures.html diff --git a/src/test/html/lineheight-simple.css b/tests/html/lineheight-simple.css similarity index 100% rename from src/test/html/lineheight-simple.css rename to tests/html/lineheight-simple.css diff --git a/src/test/html/lineheight-simple.html b/tests/html/lineheight-simple.html similarity index 100% rename from src/test/html/lineheight-simple.html rename to tests/html/lineheight-simple.html diff --git a/src/test/html/lipsum.html b/tests/html/lipsum.html similarity index 100% rename from src/test/html/lipsum.html rename to tests/html/lipsum.html diff --git a/src/test/html/longcat.html b/tests/html/longcat.html similarity index 100% rename from src/test/html/longcat.html rename to tests/html/longcat.html diff --git a/src/test/html/longcatbot.png b/tests/html/longcatbot.png similarity index 100% rename from src/test/html/longcatbot.png rename to tests/html/longcatbot.png diff --git a/src/test/html/longcatmid.png b/tests/html/longcatmid.png similarity index 100% rename from src/test/html/longcatmid.png rename to tests/html/longcatmid.png diff --git a/src/test/html/longcattop.png b/tests/html/longcattop.png similarity index 100% rename from src/test/html/longcattop.png rename to tests/html/longcattop.png diff --git a/src/test/html/lots_of_background_colors.css b/tests/html/lots_of_background_colors.css similarity index 100% rename from src/test/html/lots_of_background_colors.css rename to tests/html/lots_of_background_colors.css diff --git a/src/test/html/mojira.html b/tests/html/mojira.html similarity index 100% rename from src/test/html/mojira.html rename to tests/html/mojira.html diff --git a/src/test/html/object_element.html b/tests/html/object_element.html similarity index 100% rename from src/test/html/object_element.html rename to tests/html/object_element.html diff --git a/src/test/html/perf-rainbow-hard.html b/tests/html/perf-rainbow-hard.html similarity index 100% rename from src/test/html/perf-rainbow-hard.html rename to tests/html/perf-rainbow-hard.html diff --git a/src/test/html/perf-rainbow.html b/tests/html/perf-rainbow.html similarity index 100% rename from src/test/html/perf-rainbow.html rename to tests/html/perf-rainbow.html diff --git a/src/test/html/rust-0.png b/tests/html/rust-0.png similarity index 100% rename from src/test/html/rust-0.png rename to tests/html/rust-0.png diff --git a/src/test/html/rust-135.png b/tests/html/rust-135.png similarity index 100% rename from src/test/html/rust-135.png rename to tests/html/rust-135.png diff --git a/src/test/html/rust-180.png b/tests/html/rust-180.png similarity index 100% rename from src/test/html/rust-180.png rename to tests/html/rust-180.png diff --git a/src/test/html/rust-225.png b/tests/html/rust-225.png similarity index 100% rename from src/test/html/rust-225.png rename to tests/html/rust-225.png diff --git a/src/test/html/rust-270.png b/tests/html/rust-270.png similarity index 100% rename from src/test/html/rust-270.png rename to tests/html/rust-270.png diff --git a/src/test/html/rust-315.png b/tests/html/rust-315.png similarity index 100% rename from src/test/html/rust-315.png rename to tests/html/rust-315.png diff --git a/src/test/html/rust-45.png b/tests/html/rust-45.png similarity index 100% rename from src/test/html/rust-45.png rename to tests/html/rust-45.png diff --git a/src/test/html/rust-90.png b/tests/html/rust-90.png similarity index 100% rename from src/test/html/rust-90.png rename to tests/html/rust-90.png diff --git a/src/test/html/small-layout-test.html b/tests/html/small-layout-test.html similarity index 100% rename from src/test/html/small-layout-test.html rename to tests/html/small-layout-test.html diff --git a/src/test/html/small_color_test.css b/tests/html/small_color_test.css similarity index 100% rename from src/test/html/small_color_test.css rename to tests/html/small_color_test.css diff --git a/src/test/html/small_color_test.html b/tests/html/small_color_test.html similarity index 100% rename from src/test/html/small_color_test.html rename to tests/html/small_color_test.html diff --git a/src/test/html/summit-crash.html b/tests/html/summit-crash.html similarity index 100% rename from src/test/html/summit-crash.html rename to tests/html/summit-crash.html diff --git a/src/test/html/summit-fail.html b/tests/html/summit-fail.html similarity index 100% rename from src/test/html/summit-fail.html rename to tests/html/summit-fail.html diff --git a/src/test/html/summit-one.html b/tests/html/summit-one.html similarity index 100% rename from src/test/html/summit-one.html rename to tests/html/summit-one.html diff --git a/src/test/html/summit-three.html b/tests/html/summit-three.html similarity index 100% rename from src/test/html/summit-three.html rename to tests/html/summit-three.html diff --git a/src/test/html/summit-two.html b/tests/html/summit-two.html similarity index 100% rename from src/test/html/summit-two.html rename to tests/html/summit-two.html diff --git a/src/test/html/summit2.html b/tests/html/summit2.html similarity index 100% rename from src/test/html/summit2.html rename to tests/html/summit2.html diff --git a/src/test/html/summit3.html b/tests/html/summit3.html similarity index 100% rename from src/test/html/summit3.html rename to tests/html/summit3.html diff --git a/src/test/html/test-absolute.css b/tests/html/test-absolute.css similarity index 100% rename from src/test/html/test-absolute.css rename to tests/html/test-absolute.css diff --git a/src/test/html/test-absolute.html b/tests/html/test-absolute.html similarity index 100% rename from src/test/html/test-absolute.html rename to tests/html/test-absolute.html diff --git a/src/test/html/test-css-pseudo-root.html b/tests/html/test-css-pseudo-root.html similarity index 100% rename from src/test/html/test-css-pseudo-root.html rename to tests/html/test-css-pseudo-root.html diff --git a/src/test/html/test-inline.html b/tests/html/test-inline.html similarity index 100% rename from src/test/html/test-inline.html rename to tests/html/test-inline.html diff --git a/src/test/html/test-js-alert.html b/tests/html/test-js-alert.html similarity index 100% rename from src/test/html/test-js-alert.html rename to tests/html/test-js-alert.html diff --git a/src/test/html/test-js-console.html b/tests/html/test-js-console.html similarity index 100% rename from src/test/html/test-js-console.html rename to tests/html/test-js-console.html diff --git a/src/test/html/test-js-image.html b/tests/html/test-js-image.html similarity index 100% rename from src/test/html/test-js-image.html rename to tests/html/test-js-image.html diff --git a/src/test/html/test-js.html b/tests/html/test-js.html similarity index 100% rename from src/test/html/test-js.html rename to tests/html/test-js.html diff --git a/src/test/html/test-lineheight-verticalalign.html b/tests/html/test-lineheight-verticalalign.html similarity index 100% rename from src/test/html/test-lineheight-verticalalign.html rename to tests/html/test-lineheight-verticalalign.html diff --git a/src/test/html/test-many-images-different.html b/tests/html/test-many-images-different.html similarity index 100% rename from src/test/html/test-many-images-different.html rename to tests/html/test-many-images-different.html diff --git a/src/test/html/test-many-images.html b/tests/html/test-many-images.html similarity index 100% rename from src/test/html/test-many-images.html rename to tests/html/test-many-images.html diff --git a/src/test/html/test-text-break.html b/tests/html/test-text-break.html similarity index 100% rename from src/test/html/test-text-break.html rename to tests/html/test-text-break.html diff --git a/src/test/html/test-text.html b/tests/html/test-text.html similarity index 100% rename from src/test/html/test-text.html rename to tests/html/test-text.html diff --git a/src/test/html/test.css b/tests/html/test.css similarity index 100% rename from src/test/html/test.css rename to tests/html/test.css diff --git a/src/test/html/test.html b/tests/html/test.html similarity index 100% rename from src/test/html/test.html rename to tests/html/test.html diff --git a/src/test/html/test.js b/tests/html/test.js similarity index 100% rename from src/test/html/test.js rename to tests/html/test.js diff --git a/src/test/html/test_UIEvent_resize.html b/tests/html/test_UIEvent_resize.html similarity index 100% rename from src/test/html/test_UIEvent_resize.html rename to tests/html/test_UIEvent_resize.html diff --git a/src/test/html/test_bg_color.html b/tests/html/test_bg_color.html similarity index 100% rename from src/test/html/test_bg_color.html rename to tests/html/test_bg_color.html diff --git a/src/test/html/test_bg_color_simple.css b/tests/html/test_bg_color_simple.css similarity index 100% rename from src/test/html/test_bg_color_simple.css rename to tests/html/test_bg_color_simple.css diff --git a/src/test/html/test_bg_color_simple.html b/tests/html/test_bg_color_simple.html similarity index 100% rename from src/test/html/test_bg_color_simple.html rename to tests/html/test_bg_color_simple.html diff --git a/src/test/html/test_border.html b/tests/html/test_border.html similarity index 100% rename from src/test/html/test_border.html rename to tests/html/test_border.html diff --git a/src/test/html/test_canvas.html b/tests/html/test_canvas.html similarity index 100% rename from src/test/html/test_canvas.html rename to tests/html/test_canvas.html diff --git a/src/test/html/test_class_helloworld.html b/tests/html/test_class_helloworld.html similarity index 100% rename from src/test/html/test_class_helloworld.html rename to tests/html/test_class_helloworld.html diff --git a/src/test/html/test_clear.html b/tests/html/test_clear.html similarity index 100% rename from src/test/html/test_clear.html rename to tests/html/test_clear.html diff --git a/src/test/html/test_clear_float.html b/tests/html/test_clear_float.html similarity index 100% rename from src/test/html/test_clear_float.html rename to tests/html/test_clear_float.html diff --git a/src/test/html/test_close.html b/tests/html/test_close.html similarity index 100% rename from src/test/html/test_close.html rename to tests/html/test_close.html diff --git a/src/test/html/test_cssunit_length.html b/tests/html/test_cssunit_length.html similarity index 100% rename from src/test/html/test_cssunit_length.html rename to tests/html/test_cssunit_length.html diff --git a/src/test/html/test_float_placement.html b/tests/html/test_float_placement.html similarity index 100% rename from src/test/html/test_float_placement.html rename to tests/html/test_float_placement.html diff --git a/src/test/html/test_getter_time.html b/tests/html/test_getter_time.html similarity index 100% rename from src/test/html/test_getter_time.html rename to tests/html/test_getter_time.html diff --git a/src/test/html/test_hammer_layout.css b/tests/html/test_hammer_layout.css similarity index 100% rename from src/test/html/test_hammer_layout.css rename to tests/html/test_hammer_layout.css diff --git a/src/test/html/test_hammer_layout.html b/tests/html/test_hammer_layout.html similarity index 100% rename from src/test/html/test_hammer_layout.html rename to tests/html/test_hammer_layout.html diff --git a/src/test/html/test_inline_border.html b/tests/html/test_inline_border.html similarity index 100% rename from src/test/html/test_inline_border.html rename to tests/html/test_inline_border.html diff --git a/src/test/html/test_inline_boxes.html b/tests/html/test_inline_boxes.html similarity index 100% rename from src/test/html/test_inline_boxes.html rename to tests/html/test_inline_boxes.html diff --git a/src/test/html/test_interval.html b/tests/html/test_interval.html similarity index 100% rename from src/test/html/test_interval.html rename to tests/html/test_interval.html diff --git a/src/test/html/test_italic_bold.html b/tests/html/test_italic_bold.html similarity index 100% rename from src/test/html/test_italic_bold.html rename to tests/html/test_italic_bold.html diff --git a/src/test/html/test_linking.css b/tests/html/test_linking.css similarity index 100% rename from src/test/html/test_linking.css rename to tests/html/test_linking.css diff --git a/src/test/html/test_local_bookmark.html b/tests/html/test_local_bookmark.html similarity index 100% rename from src/test/html/test_local_bookmark.html rename to tests/html/test_local_bookmark.html diff --git a/src/test/html/test_overflow_hidden.html b/tests/html/test_overflow_hidden.html similarity index 100% rename from src/test/html/test_overflow_hidden.html rename to tests/html/test_overflow_hidden.html diff --git a/src/test/html/test_pseudo.html b/tests/html/test_pseudo.html similarity index 100% rename from src/test/html/test_pseudo.html rename to tests/html/test_pseudo.html diff --git a/src/test/html/test_sandboxed.html b/tests/html/test_sandboxed.html similarity index 100% rename from src/test/html/test_sandboxed.html rename to tests/html/test_sandboxed.html diff --git a/src/test/html/test_sandboxed_iframe.html b/tests/html/test_sandboxed_iframe.html similarity index 100% rename from src/test/html/test_sandboxed_iframe.html rename to tests/html/test_sandboxed_iframe.html diff --git a/src/test/html/test_slam_layout.css b/tests/html/test_slam_layout.css similarity index 100% rename from src/test/html/test_slam_layout.css rename to tests/html/test_slam_layout.css diff --git a/src/test/html/test_slam_layout.html b/tests/html/test_slam_layout.html similarity index 100% rename from src/test/html/test_slam_layout.html rename to tests/html/test_slam_layout.html diff --git a/src/test/html/test_timeout.html b/tests/html/test_timeout.html similarity index 100% rename from src/test/html/test_timeout.html rename to tests/html/test_timeout.html diff --git a/src/test/html/test_underline.html b/tests/html/test_underline.html similarity index 100% rename from src/test/html/test_underline.html rename to tests/html/test_underline.html diff --git a/src/test/html/test_underline_helloworld.html b/tests/html/test_underline_helloworld.html similarity index 100% rename from src/test/html/test_underline_helloworld.html rename to tests/html/test_underline_helloworld.html diff --git a/src/test/html/text_deco_simple.html b/tests/html/text_deco_simple.html similarity index 100% rename from src/test/html/text_deco_simple.html rename to tests/html/text_deco_simple.html diff --git a/src/test/html/tiny_test.html b/tests/html/tiny_test.html similarity index 100% rename from src/test/html/tiny_test.html rename to tests/html/tiny_test.html diff --git a/src/test/html/vertical_align_simple.html b/tests/html/vertical_align_simple.html similarity index 100% rename from src/test/html/vertical_align_simple.html rename to tests/html/vertical_align_simple.html diff --git a/src/test/power/PowerMeasure.py b/tests/power/PowerMeasure.py similarity index 100% rename from src/test/power/PowerMeasure.py rename to tests/power/PowerMeasure.py diff --git a/src/test/power/README.md b/tests/power/README.md similarity index 100% rename from src/test/power/README.md rename to tests/power/README.md diff --git a/src/test/ref/400x400_green.png b/tests/ref/400x400_green.png similarity index 100% rename from src/test/ref/400x400_green.png rename to tests/ref/400x400_green.png diff --git a/src/test/ref/500x300_green.html b/tests/ref/500x300_green.html similarity index 100% rename from src/test/ref/500x300_green.html rename to tests/ref/500x300_green.html diff --git a/src/test/ref/acid1.png b/tests/ref/acid1.png similarity index 100% rename from src/test/ref/acid1.png rename to tests/ref/acid1.png diff --git a/src/test/ref/acid1_a.html b/tests/ref/acid1_a.html similarity index 100% rename from src/test/ref/acid1_a.html rename to tests/ref/acid1_a.html diff --git a/src/test/ref/acid1_b.html b/tests/ref/acid1_b.html similarity index 100% rename from src/test/ref/acid1_b.html rename to tests/ref/acid1_b.html diff --git a/src/test/ref/acid2_noscroll.html b/tests/ref/acid2_noscroll.html similarity index 100% rename from src/test/ref/acid2_noscroll.html rename to tests/ref/acid2_noscroll.html diff --git a/src/test/ref/acid2_ref.html b/tests/ref/acid2_ref.html similarity index 100% rename from src/test/ref/acid2_ref.html rename to tests/ref/acid2_ref.html diff --git a/src/test/ref/acid2_ref.png b/tests/ref/acid2_ref.png similarity index 100% rename from src/test/ref/acid2_ref.png rename to tests/ref/acid2_ref.png diff --git a/src/test/ref/acid2_ref_broken.html b/tests/ref/acid2_ref_broken.html similarity index 100% rename from src/test/ref/acid2_ref_broken.html rename to tests/ref/acid2_ref_broken.html diff --git a/src/test/ref/acid2_ref_broken.png b/tests/ref/acid2_ref_broken.png similarity index 100% rename from src/test/ref/acid2_ref_broken.png rename to tests/ref/acid2_ref_broken.png diff --git a/src/test/ref/anon_block_inherit_a.html b/tests/ref/anon_block_inherit_a.html similarity index 100% rename from src/test/ref/anon_block_inherit_a.html rename to tests/ref/anon_block_inherit_a.html diff --git a/src/test/ref/anon_block_inherit_b.html b/tests/ref/anon_block_inherit_b.html similarity index 100% rename from src/test/ref/anon_block_inherit_b.html rename to tests/ref/anon_block_inherit_b.html diff --git a/src/test/ref/append_style_a.html b/tests/ref/append_style_a.html similarity index 100% rename from src/test/ref/append_style_a.html rename to tests/ref/append_style_a.html diff --git a/src/test/ref/append_style_b.html b/tests/ref/append_style_b.html similarity index 100% rename from src/test/ref/append_style_b.html rename to tests/ref/append_style_b.html diff --git a/src/test/ref/attr_exists_selector.html b/tests/ref/attr_exists_selector.html similarity index 100% rename from src/test/ref/attr_exists_selector.html rename to tests/ref/attr_exists_selector.html diff --git a/src/test/ref/attr_exists_selector_ref.html b/tests/ref/attr_exists_selector_ref.html similarity index 100% rename from src/test/ref/attr_exists_selector_ref.html rename to tests/ref/attr_exists_selector_ref.html diff --git a/src/test/ref/background_external_stylesheet.html b/tests/ref/background_external_stylesheet.html similarity index 100% rename from src/test/ref/background_external_stylesheet.html rename to tests/ref/background_external_stylesheet.html diff --git a/src/test/ref/background_none_a.html b/tests/ref/background_none_a.html similarity index 100% rename from src/test/ref/background_none_a.html rename to tests/ref/background_none_a.html diff --git a/src/test/ref/background_none_b.html b/tests/ref/background_none_b.html similarity index 100% rename from src/test/ref/background_none_b.html rename to tests/ref/background_none_b.html diff --git a/src/test/ref/background_position_a.html b/tests/ref/background_position_a.html similarity index 100% rename from src/test/ref/background_position_a.html rename to tests/ref/background_position_a.html diff --git a/src/test/ref/background_position_b.html b/tests/ref/background_position_b.html similarity index 100% rename from src/test/ref/background_position_b.html rename to tests/ref/background_position_b.html diff --git a/src/test/ref/background_ref.html b/tests/ref/background_ref.html similarity index 100% rename from src/test/ref/background_ref.html rename to tests/ref/background_ref.html diff --git a/src/test/ref/background_repeat_both_a.html b/tests/ref/background_repeat_both_a.html similarity index 100% rename from src/test/ref/background_repeat_both_a.html rename to tests/ref/background_repeat_both_a.html diff --git a/src/test/ref/background_repeat_both_b.html b/tests/ref/background_repeat_both_b.html similarity index 100% rename from src/test/ref/background_repeat_both_b.html rename to tests/ref/background_repeat_both_b.html diff --git a/src/test/ref/background_repeat_none_a.html b/tests/ref/background_repeat_none_a.html similarity index 100% rename from src/test/ref/background_repeat_none_a.html rename to tests/ref/background_repeat_none_a.html diff --git a/src/test/ref/background_repeat_none_b.html b/tests/ref/background_repeat_none_b.html similarity index 100% rename from src/test/ref/background_repeat_none_b.html rename to tests/ref/background_repeat_none_b.html diff --git a/src/test/ref/background_repeat_x_a.html b/tests/ref/background_repeat_x_a.html similarity index 100% rename from src/test/ref/background_repeat_x_a.html rename to tests/ref/background_repeat_x_a.html diff --git a/src/test/ref/background_repeat_x_b.html b/tests/ref/background_repeat_x_b.html similarity index 100% rename from src/test/ref/background_repeat_x_b.html rename to tests/ref/background_repeat_x_b.html diff --git a/src/test/ref/background_repeat_y_a.html b/tests/ref/background_repeat_y_a.html similarity index 100% rename from src/test/ref/background_repeat_y_a.html rename to tests/ref/background_repeat_y_a.html diff --git a/src/test/ref/background_repeat_y_b.html b/tests/ref/background_repeat_y_b.html similarity index 100% rename from src/test/ref/background_repeat_y_b.html rename to tests/ref/background_repeat_y_b.html diff --git a/src/test/ref/background_style_attr.html b/tests/ref/background_style_attr.html similarity index 100% rename from src/test/ref/background_style_attr.html rename to tests/ref/background_style_attr.html diff --git a/src/test/ref/basic.list b/tests/ref/basic.list similarity index 100% rename from src/test/ref/basic.list rename to tests/ref/basic.list diff --git a/src/test/ref/basic_width_em.html b/tests/ref/basic_width_em.html similarity index 100% rename from src/test/ref/basic_width_em.html rename to tests/ref/basic_width_em.html diff --git a/src/test/ref/basic_width_px.html b/tests/ref/basic_width_px.html similarity index 100% rename from src/test/ref/basic_width_px.html rename to tests/ref/basic_width_px.html diff --git a/src/test/ref/block_image.html b/tests/ref/block_image.html similarity index 100% rename from src/test/ref/block_image.html rename to tests/ref/block_image.html diff --git a/src/test/ref/block_replaced_content_a.html b/tests/ref/block_replaced_content_a.html similarity index 100% rename from src/test/ref/block_replaced_content_a.html rename to tests/ref/block_replaced_content_a.html diff --git a/src/test/ref/block_replaced_content_b.html b/tests/ref/block_replaced_content_b.html similarity index 100% rename from src/test/ref/block_replaced_content_b.html rename to tests/ref/block_replaced_content_b.html diff --git a/src/test/ref/block_replaced_content_ref.html b/tests/ref/block_replaced_content_ref.html similarity index 100% rename from src/test/ref/block_replaced_content_ref.html rename to tests/ref/block_replaced_content_ref.html diff --git a/src/test/ref/border_style_none_a.html b/tests/ref/border_style_none_a.html similarity index 100% rename from src/test/ref/border_style_none_a.html rename to tests/ref/border_style_none_a.html diff --git a/src/test/ref/border_style_none_b.html b/tests/ref/border_style_none_b.html similarity index 100% rename from src/test/ref/border_style_none_b.html rename to tests/ref/border_style_none_b.html diff --git a/src/test/ref/borders.png b/tests/ref/borders.png similarity index 100% rename from src/test/ref/borders.png rename to tests/ref/borders.png diff --git a/src/test/ref/borders_a.html b/tests/ref/borders_a.html similarity index 100% rename from src/test/ref/borders_a.html rename to tests/ref/borders_a.html diff --git a/src/test/ref/borders_b.html b/tests/ref/borders_b.html similarity index 100% rename from src/test/ref/borders_b.html rename to tests/ref/borders_b.html diff --git a/src/test/ref/br-ref.html b/tests/ref/br-ref.html similarity index 100% rename from src/test/ref/br-ref.html rename to tests/ref/br-ref.html diff --git a/src/test/ref/br.html b/tests/ref/br.html similarity index 100% rename from src/test/ref/br.html rename to tests/ref/br.html diff --git a/src/test/ref/csswg/css21/block-formatting-context-height-003-ref.htm b/tests/ref/csswg/css21/block-formatting-context-height-003-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-context-height-003-ref.htm rename to tests/ref/csswg/css21/block-formatting-context-height-003-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-context-height-003.htm b/tests/ref/csswg/css21/block-formatting-context-height-003.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-context-height-003.htm rename to tests/ref/csswg/css21/block-formatting-context-height-003.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-001-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-001-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-001-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-001-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-001.htm b/tests/ref/csswg/css21/block-formatting-contexts-001.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-001.htm rename to tests/ref/csswg/css21/block-formatting-contexts-001.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-003-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-003-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-003-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-003-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-003.htm b/tests/ref/csswg/css21/block-formatting-contexts-003.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-003.htm rename to tests/ref/csswg/css21/block-formatting-contexts-003.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-004-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-004-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-004-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-004-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-004.htm b/tests/ref/csswg/css21/block-formatting-contexts-004.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-004.htm rename to tests/ref/csswg/css21/block-formatting-contexts-004.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-005-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-005-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-005-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-005-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-005.htm b/tests/ref/csswg/css21/block-formatting-contexts-005.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-005.htm rename to tests/ref/csswg/css21/block-formatting-contexts-005.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-006-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-006-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-006-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-006-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-006.htm b/tests/ref/csswg/css21/block-formatting-contexts-006.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-006.htm rename to tests/ref/csswg/css21/block-formatting-contexts-006.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-008-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-008-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-008-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-008-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-008.htm b/tests/ref/csswg/css21/block-formatting-contexts-008.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-008.htm rename to tests/ref/csswg/css21/block-formatting-contexts-008.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-011-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-011-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-011-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-011-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-011.htm b/tests/ref/csswg/css21/block-formatting-contexts-011.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-011.htm rename to tests/ref/csswg/css21/block-formatting-contexts-011.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-015-ref.htm b/tests/ref/csswg/css21/block-formatting-contexts-015-ref.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-015-ref.htm rename to tests/ref/csswg/css21/block-formatting-contexts-015-ref.htm diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-015.htm b/tests/ref/csswg/css21/block-formatting-contexts-015.htm similarity index 100% rename from src/test/ref/csswg/css21/block-formatting-contexts-015.htm rename to tests/ref/csswg/css21/block-formatting-contexts-015.htm diff --git a/src/test/ref/csswg/css21/css21.list b/tests/ref/csswg/css21/css21.list similarity index 100% rename from src/test/ref/csswg/css21/css21.list rename to tests/ref/csswg/css21/css21.list diff --git a/src/test/ref/csswg/css21/support/blue15x15.png b/tests/ref/csswg/css21/support/blue15x15.png similarity index 100% rename from src/test/ref/csswg/css21/support/blue15x15.png rename to tests/ref/csswg/css21/support/blue15x15.png diff --git a/src/test/ref/csswg/css21/support/margin-collapse-2em-space.png b/tests/ref/csswg/css21/support/margin-collapse-2em-space.png similarity index 100% rename from src/test/ref/csswg/css21/support/margin-collapse-2em-space.png rename to tests/ref/csswg/css21/support/margin-collapse-2em-space.png diff --git a/src/test/ref/csswg/css21/support/swatch-orange.png b/tests/ref/csswg/css21/support/swatch-orange.png similarity index 100% rename from src/test/ref/csswg/css21/support/swatch-orange.png rename to tests/ref/csswg/css21/support/swatch-orange.png diff --git a/src/test/ref/data_img_a.html b/tests/ref/data_img_a.html similarity index 100% rename from src/test/ref/data_img_a.html rename to tests/ref/data_img_a.html diff --git a/src/test/ref/data_img_b.html b/tests/ref/data_img_b.html similarity index 100% rename from src/test/ref/data_img_b.html rename to tests/ref/data_img_b.html diff --git a/src/test/ref/first_child_pseudo_a.html b/tests/ref/first_child_pseudo_a.html similarity index 100% rename from src/test/ref/first_child_pseudo_a.html rename to tests/ref/first_child_pseudo_a.html diff --git a/src/test/ref/first_child_pseudo_b.html b/tests/ref/first_child_pseudo_b.html similarity index 100% rename from src/test/ref/first_child_pseudo_b.html rename to tests/ref/first_child_pseudo_b.html diff --git a/src/test/ref/first_of_type_pseudo_a.html b/tests/ref/first_of_type_pseudo_a.html similarity index 100% rename from src/test/ref/first_of_type_pseudo_a.html rename to tests/ref/first_of_type_pseudo_a.html diff --git a/src/test/ref/first_of_type_pseudo_b.html b/tests/ref/first_of_type_pseudo_b.html similarity index 100% rename from src/test/ref/first_of_type_pseudo_b.html rename to tests/ref/first_of_type_pseudo_b.html diff --git a/src/test/ref/fixed_width_overrides_child_intrinsic_width_a.html b/tests/ref/fixed_width_overrides_child_intrinsic_width_a.html similarity index 100% rename from src/test/ref/fixed_width_overrides_child_intrinsic_width_a.html rename to tests/ref/fixed_width_overrides_child_intrinsic_width_a.html diff --git a/src/test/ref/fixed_width_overrides_child_intrinsic_width_ref.html b/tests/ref/fixed_width_overrides_child_intrinsic_width_ref.html similarity index 100% rename from src/test/ref/fixed_width_overrides_child_intrinsic_width_ref.html rename to tests/ref/fixed_width_overrides_child_intrinsic_width_ref.html diff --git a/src/test/ref/float_intrinsic_height.html b/tests/ref/float_intrinsic_height.html similarity index 100% rename from src/test/ref/float_intrinsic_height.html rename to tests/ref/float_intrinsic_height.html diff --git a/src/test/ref/float_intrinsic_height_ref.html b/tests/ref/float_intrinsic_height_ref.html similarity index 100% rename from src/test/ref/float_intrinsic_height_ref.html rename to tests/ref/float_intrinsic_height_ref.html diff --git a/src/test/ref/float_intrinsic_width_a.html b/tests/ref/float_intrinsic_width_a.html similarity index 100% rename from src/test/ref/float_intrinsic_width_a.html rename to tests/ref/float_intrinsic_width_a.html diff --git a/src/test/ref/float_intrinsic_width_ref.html b/tests/ref/float_intrinsic_width_ref.html similarity index 100% rename from src/test/ref/float_intrinsic_width_ref.html rename to tests/ref/float_intrinsic_width_ref.html diff --git a/src/test/ref/float_right_intrinsic_width_a.html b/tests/ref/float_right_intrinsic_width_a.html similarity index 100% rename from src/test/ref/float_right_intrinsic_width_a.html rename to tests/ref/float_right_intrinsic_width_a.html diff --git a/src/test/ref/float_right_intrinsic_width_ref.html b/tests/ref/float_right_intrinsic_width_ref.html similarity index 100% rename from src/test/ref/float_right_intrinsic_width_ref.html rename to tests/ref/float_right_intrinsic_width_ref.html diff --git a/src/test/ref/font_size_em.html b/tests/ref/font_size_em.html similarity index 100% rename from src/test/ref/font_size_em.html rename to tests/ref/font_size_em.html diff --git a/src/test/ref/font_size_em_ref.html b/tests/ref/font_size_em_ref.html similarity index 100% rename from src/test/ref/font_size_em_ref.html rename to tests/ref/font_size_em_ref.html diff --git a/src/test/ref/font_size_percentage.html b/tests/ref/font_size_percentage.html similarity index 100% rename from src/test/ref/font_size_percentage.html rename to tests/ref/font_size_percentage.html diff --git a/src/test/ref/fonts/ahem/COPYING b/tests/ref/fonts/ahem/COPYING similarity index 100% rename from src/test/ref/fonts/ahem/COPYING rename to tests/ref/fonts/ahem/COPYING diff --git a/src/test/ref/fonts/ahem/README b/tests/ref/fonts/ahem/README similarity index 100% rename from src/test/ref/fonts/ahem/README rename to tests/ref/fonts/ahem/README diff --git a/src/test/ref/fonts/ahem/ahem.ttf b/tests/ref/fonts/ahem/ahem.ttf similarity index 100% rename from src/test/ref/fonts/ahem/ahem.ttf rename to tests/ref/fonts/ahem/ahem.ttf diff --git a/src/test/ref/height_compute.html b/tests/ref/height_compute.html similarity index 100% rename from src/test/ref/height_compute.html rename to tests/ref/height_compute.html diff --git a/src/test/ref/height_compute_reset.html b/tests/ref/height_compute_reset.html similarity index 100% rename from src/test/ref/height_compute_reset.html rename to tests/ref/height_compute_reset.html diff --git a/src/test/ref/hello_a.html b/tests/ref/hello_a.html similarity index 100% rename from src/test/ref/hello_a.html rename to tests/ref/hello_a.html diff --git a/src/test/ref/hello_b.html b/tests/ref/hello_b.html similarity index 100% rename from src/test/ref/hello_b.html rename to tests/ref/hello_b.html diff --git a/src/test/ref/img_dynamic_remove.html b/tests/ref/img_dynamic_remove.html similarity index 100% rename from src/test/ref/img_dynamic_remove.html rename to tests/ref/img_dynamic_remove.html diff --git a/src/test/ref/img_dynamic_remove_ref.html b/tests/ref/img_dynamic_remove_ref.html similarity index 100% rename from src/test/ref/img_dynamic_remove_ref.html rename to tests/ref/img_dynamic_remove_ref.html diff --git a/src/test/ref/img_size_a.html b/tests/ref/img_size_a.html similarity index 100% rename from src/test/ref/img_size_a.html rename to tests/ref/img_size_a.html diff --git a/src/test/ref/img_size_b.html b/tests/ref/img_size_b.html similarity index 100% rename from src/test/ref/img_size_b.html rename to tests/ref/img_size_b.html diff --git a/src/test/ref/inline_background_a.html b/tests/ref/inline_background_a.html similarity index 100% rename from src/test/ref/inline_background_a.html rename to tests/ref/inline_background_a.html diff --git a/src/test/ref/inline_background_ref.html b/tests/ref/inline_background_ref.html similarity index 100% rename from src/test/ref/inline_background_ref.html rename to tests/ref/inline_background_ref.html diff --git a/src/test/ref/inline_border_a.html b/tests/ref/inline_border_a.html similarity index 100% rename from src/test/ref/inline_border_a.html rename to tests/ref/inline_border_a.html diff --git a/src/test/ref/inline_border_b.html b/tests/ref/inline_border_b.html similarity index 100% rename from src/test/ref/inline_border_b.html rename to tests/ref/inline_border_b.html diff --git a/src/test/ref/inline_border_ref.png b/tests/ref/inline_border_ref.png similarity index 100% rename from src/test/ref/inline_border_ref.png rename to tests/ref/inline_border_ref.png diff --git a/src/test/ref/inline_element_border_a.html b/tests/ref/inline_element_border_a.html similarity index 100% rename from src/test/ref/inline_element_border_a.html rename to tests/ref/inline_element_border_a.html diff --git a/src/test/ref/inline_element_border_ref.html b/tests/ref/inline_element_border_ref.html similarity index 100% rename from src/test/ref/inline_element_border_ref.html rename to tests/ref/inline_element_border_ref.html diff --git a/src/test/ref/inline_padding_a.html b/tests/ref/inline_padding_a.html similarity index 100% rename from src/test/ref/inline_padding_a.html rename to tests/ref/inline_padding_a.html diff --git a/src/test/ref/inline_padding_b.html b/tests/ref/inline_padding_b.html similarity index 100% rename from src/test/ref/inline_padding_b.html rename to tests/ref/inline_padding_b.html diff --git a/src/test/ref/inline_text_align_a.html b/tests/ref/inline_text_align_a.html similarity index 100% rename from src/test/ref/inline_text_align_a.html rename to tests/ref/inline_text_align_a.html diff --git a/src/test/ref/inline_text_align_b.html b/tests/ref/inline_text_align_b.html similarity index 100% rename from src/test/ref/inline_text_align_b.html rename to tests/ref/inline_text_align_b.html diff --git a/src/test/ref/inline_whitespace_a.html b/tests/ref/inline_whitespace_a.html similarity index 100% rename from src/test/ref/inline_whitespace_a.html rename to tests/ref/inline_whitespace_a.html diff --git a/src/test/ref/inline_whitespace_b.html b/tests/ref/inline_whitespace_b.html similarity index 100% rename from src/test/ref/inline_whitespace_b.html rename to tests/ref/inline_whitespace_b.html diff --git a/src/test/ref/inline_whitespace_ref.html b/tests/ref/inline_whitespace_ref.html similarity index 100% rename from src/test/ref/inline_whitespace_ref.html rename to tests/ref/inline_whitespace_ref.html diff --git a/src/test/ref/last_child_pseudo_a.html b/tests/ref/last_child_pseudo_a.html similarity index 100% rename from src/test/ref/last_child_pseudo_a.html rename to tests/ref/last_child_pseudo_a.html diff --git a/src/test/ref/last_child_pseudo_b.html b/tests/ref/last_child_pseudo_b.html similarity index 100% rename from src/test/ref/last_child_pseudo_b.html rename to tests/ref/last_child_pseudo_b.html diff --git a/src/test/ref/last_of_type_pseudo_a.html b/tests/ref/last_of_type_pseudo_a.html similarity index 100% rename from src/test/ref/last_of_type_pseudo_a.html rename to tests/ref/last_of_type_pseudo_a.html diff --git a/src/test/ref/last_of_type_pseudo_b.html b/tests/ref/last_of_type_pseudo_b.html similarity index 100% rename from src/test/ref/last_of_type_pseudo_b.html rename to tests/ref/last_of_type_pseudo_b.html diff --git a/src/test/ref/line_height_a.html b/tests/ref/line_height_a.html similarity index 100% rename from src/test/ref/line_height_a.html rename to tests/ref/line_height_a.html diff --git a/src/test/ref/line_height_ref.html b/tests/ref/line_height_ref.html similarity index 100% rename from src/test/ref/line_height_ref.html rename to tests/ref/line_height_ref.html diff --git a/src/test/ref/linebreak_inline_span_a.html b/tests/ref/linebreak_inline_span_a.html similarity index 100% rename from src/test/ref/linebreak_inline_span_a.html rename to tests/ref/linebreak_inline_span_a.html diff --git a/src/test/ref/linebreak_inline_span_b.html b/tests/ref/linebreak_inline_span_b.html similarity index 100% rename from src/test/ref/linebreak_inline_span_b.html rename to tests/ref/linebreak_inline_span_b.html diff --git a/src/test/ref/linebreak_simple_a.html b/tests/ref/linebreak_simple_a.html similarity index 100% rename from src/test/ref/linebreak_simple_a.html rename to tests/ref/linebreak_simple_a.html diff --git a/src/test/ref/linebreak_simple_b.html b/tests/ref/linebreak_simple_b.html similarity index 100% rename from src/test/ref/linebreak_simple_b.html rename to tests/ref/linebreak_simple_b.html diff --git a/src/test/ref/margin_a.html b/tests/ref/margin_a.html similarity index 100% rename from src/test/ref/margin_a.html rename to tests/ref/margin_a.html diff --git a/src/test/ref/margin_b.html b/tests/ref/margin_b.html similarity index 100% rename from src/test/ref/margin_b.html rename to tests/ref/margin_b.html diff --git a/src/test/ref/max_width_float_simple_a.html b/tests/ref/max_width_float_simple_a.html similarity index 100% rename from src/test/ref/max_width_float_simple_a.html rename to tests/ref/max_width_float_simple_a.html diff --git a/src/test/ref/max_width_float_simple_b.html b/tests/ref/max_width_float_simple_b.html similarity index 100% rename from src/test/ref/max_width_float_simple_b.html rename to tests/ref/max_width_float_simple_b.html diff --git a/src/test/ref/max_width_simple_a.html b/tests/ref/max_width_simple_a.html similarity index 100% rename from src/test/ref/max_width_simple_a.html rename to tests/ref/max_width_simple_a.html diff --git a/src/test/ref/max_width_simple_b.html b/tests/ref/max_width_simple_b.html similarity index 100% rename from src/test/ref/max_width_simple_b.html rename to tests/ref/max_width_simple_b.html diff --git a/src/test/ref/min_max_height_a.html b/tests/ref/min_max_height_a.html similarity index 100% rename from src/test/ref/min_max_height_a.html rename to tests/ref/min_max_height_a.html diff --git a/src/test/ref/min_max_height_b.html b/tests/ref/min_max_height_b.html similarity index 100% rename from src/test/ref/min_max_height_b.html rename to tests/ref/min_max_height_b.html diff --git a/src/test/ref/min_width_float_simple_a.html b/tests/ref/min_width_float_simple_a.html similarity index 100% rename from src/test/ref/min_width_float_simple_a.html rename to tests/ref/min_width_float_simple_a.html diff --git a/src/test/ref/min_width_float_simple_b.html b/tests/ref/min_width_float_simple_b.html similarity index 100% rename from src/test/ref/min_width_float_simple_b.html rename to tests/ref/min_width_float_simple_b.html diff --git a/src/test/ref/min_width_simple_a.html b/tests/ref/min_width_simple_a.html similarity index 100% rename from src/test/ref/min_width_simple_a.html rename to tests/ref/min_width_simple_a.html diff --git a/src/test/ref/min_width_simple_b.html b/tests/ref/min_width_simple_b.html similarity index 100% rename from src/test/ref/min_width_simple_b.html rename to tests/ref/min_width_simple_b.html diff --git a/src/test/ref/minimum_line_height_a.html b/tests/ref/minimum_line_height_a.html similarity index 100% rename from src/test/ref/minimum_line_height_a.html rename to tests/ref/minimum_line_height_a.html diff --git a/src/test/ref/minimum_line_height_b.html b/tests/ref/minimum_line_height_b.html similarity index 100% rename from src/test/ref/minimum_line_height_b.html rename to tests/ref/minimum_line_height_b.html diff --git a/src/test/ref/negative_margin_uncle_a.html b/tests/ref/negative_margin_uncle_a.html similarity index 100% rename from src/test/ref/negative_margin_uncle_a.html rename to tests/ref/negative_margin_uncle_a.html diff --git a/src/test/ref/negative_margin_uncle_b.html b/tests/ref/negative_margin_uncle_b.html similarity index 100% rename from src/test/ref/negative_margin_uncle_b.html rename to tests/ref/negative_margin_uncle_b.html diff --git a/src/test/ref/negative_margins_a.html b/tests/ref/negative_margins_a.html similarity index 100% rename from src/test/ref/negative_margins_a.html rename to tests/ref/negative_margins_a.html diff --git a/src/test/ref/negative_margins_b.html b/tests/ref/negative_margins_b.html similarity index 100% rename from src/test/ref/negative_margins_b.html rename to tests/ref/negative_margins_b.html diff --git a/src/test/ref/noscript.html b/tests/ref/noscript.html similarity index 100% rename from src/test/ref/noscript.html rename to tests/ref/noscript.html diff --git a/src/test/ref/noscript_ref.html b/tests/ref/noscript_ref.html similarity index 100% rename from src/test/ref/noscript_ref.html rename to tests/ref/noscript_ref.html diff --git a/src/test/ref/noteq_500x300_white.html b/tests/ref/noteq_500x300_white.html similarity index 100% rename from src/test/ref/noteq_500x300_white.html rename to tests/ref/noteq_500x300_white.html diff --git a/src/test/ref/noteq_attr_exists_selector.html b/tests/ref/noteq_attr_exists_selector.html similarity index 100% rename from src/test/ref/noteq_attr_exists_selector.html rename to tests/ref/noteq_attr_exists_selector.html diff --git a/src/test/ref/nth_child_pseudo_a.html b/tests/ref/nth_child_pseudo_a.html similarity index 100% rename from src/test/ref/nth_child_pseudo_a.html rename to tests/ref/nth_child_pseudo_a.html diff --git a/src/test/ref/nth_child_pseudo_b.html b/tests/ref/nth_child_pseudo_b.html similarity index 100% rename from src/test/ref/nth_child_pseudo_b.html rename to tests/ref/nth_child_pseudo_b.html diff --git a/src/test/ref/nth_last_child_pseudo_a.html b/tests/ref/nth_last_child_pseudo_a.html similarity index 100% rename from src/test/ref/nth_last_child_pseudo_a.html rename to tests/ref/nth_last_child_pseudo_a.html diff --git a/src/test/ref/nth_last_child_pseudo_b.html b/tests/ref/nth_last_child_pseudo_b.html similarity index 100% rename from src/test/ref/nth_last_child_pseudo_b.html rename to tests/ref/nth_last_child_pseudo_b.html diff --git a/src/test/ref/nth_last_of_type_pseudo_a.html b/tests/ref/nth_last_of_type_pseudo_a.html similarity index 100% rename from src/test/ref/nth_last_of_type_pseudo_a.html rename to tests/ref/nth_last_of_type_pseudo_a.html diff --git a/src/test/ref/nth_last_of_type_pseudo_b.html b/tests/ref/nth_last_of_type_pseudo_b.html similarity index 100% rename from src/test/ref/nth_last_of_type_pseudo_b.html rename to tests/ref/nth_last_of_type_pseudo_b.html diff --git a/src/test/ref/nth_of_type_pseudo_a.html b/tests/ref/nth_of_type_pseudo_a.html similarity index 100% rename from src/test/ref/nth_of_type_pseudo_a.html rename to tests/ref/nth_of_type_pseudo_a.html diff --git a/src/test/ref/nth_of_type_pseudo_b.html b/tests/ref/nth_of_type_pseudo_b.html similarity index 100% rename from src/test/ref/nth_of_type_pseudo_b.html rename to tests/ref/nth_of_type_pseudo_b.html diff --git a/src/test/ref/object_element_a.html b/tests/ref/object_element_a.html similarity index 100% rename from src/test/ref/object_element_a.html rename to tests/ref/object_element_a.html diff --git a/src/test/ref/object_element_b.html b/tests/ref/object_element_b.html similarity index 100% rename from src/test/ref/object_element_b.html rename to tests/ref/object_element_b.html diff --git a/src/test/ref/only_child_pseudo_a.html b/tests/ref/only_child_pseudo_a.html similarity index 100% rename from src/test/ref/only_child_pseudo_a.html rename to tests/ref/only_child_pseudo_a.html diff --git a/src/test/ref/only_child_pseudo_b.html b/tests/ref/only_child_pseudo_b.html similarity index 100% rename from src/test/ref/only_child_pseudo_b.html rename to tests/ref/only_child_pseudo_b.html diff --git a/src/test/ref/only_of_type_pseudo_a.html b/tests/ref/only_of_type_pseudo_a.html similarity index 100% rename from src/test/ref/only_of_type_pseudo_a.html rename to tests/ref/only_of_type_pseudo_a.html diff --git a/src/test/ref/only_of_type_pseudo_b.html b/tests/ref/only_of_type_pseudo_b.html similarity index 100% rename from src/test/ref/only_of_type_pseudo_b.html rename to tests/ref/only_of_type_pseudo_b.html diff --git a/src/test/ref/overconstrained_block.html b/tests/ref/overconstrained_block.html similarity index 100% rename from src/test/ref/overconstrained_block.html rename to tests/ref/overconstrained_block.html diff --git a/src/test/ref/overconstrained_block_ref.html b/tests/ref/overconstrained_block_ref.html similarity index 100% rename from src/test/ref/overconstrained_block_ref.html rename to tests/ref/overconstrained_block_ref.html diff --git a/src/test/ref/overflow_auto.html b/tests/ref/overflow_auto.html similarity index 100% rename from src/test/ref/overflow_auto.html rename to tests/ref/overflow_auto.html diff --git a/src/test/ref/overflow_position_abs_inside_normal_a.html b/tests/ref/overflow_position_abs_inside_normal_a.html similarity index 100% rename from src/test/ref/overflow_position_abs_inside_normal_a.html rename to tests/ref/overflow_position_abs_inside_normal_a.html diff --git a/src/test/ref/overflow_position_abs_inside_normal_b.html b/tests/ref/overflow_position_abs_inside_normal_b.html similarity index 100% rename from src/test/ref/overflow_position_abs_inside_normal_b.html rename to tests/ref/overflow_position_abs_inside_normal_b.html diff --git a/src/test/ref/overflow_position_abs_simple_a.html b/tests/ref/overflow_position_abs_simple_a.html similarity index 100% rename from src/test/ref/overflow_position_abs_simple_a.html rename to tests/ref/overflow_position_abs_simple_a.html diff --git a/src/test/ref/overflow_position_abs_simple_b.html b/tests/ref/overflow_position_abs_simple_b.html similarity index 100% rename from src/test/ref/overflow_position_abs_simple_b.html rename to tests/ref/overflow_position_abs_simple_b.html diff --git a/src/test/ref/overflow_scroll.html b/tests/ref/overflow_scroll.html similarity index 100% rename from src/test/ref/overflow_scroll.html rename to tests/ref/overflow_scroll.html diff --git a/src/test/ref/overflow_simple_a.html b/tests/ref/overflow_simple_a.html similarity index 100% rename from src/test/ref/overflow_simple_a.html rename to tests/ref/overflow_simple_a.html diff --git a/src/test/ref/overflow_simple_b.html b/tests/ref/overflow_simple_b.html similarity index 100% rename from src/test/ref/overflow_simple_b.html rename to tests/ref/overflow_simple_b.html diff --git a/src/test/ref/png_rgba_colorspace_a.html b/tests/ref/png_rgba_colorspace_a.html similarity index 100% rename from src/test/ref/png_rgba_colorspace_a.html rename to tests/ref/png_rgba_colorspace_a.html diff --git a/src/test/ref/png_rgba_colorspace_a.png b/tests/ref/png_rgba_colorspace_a.png similarity index 100% rename from src/test/ref/png_rgba_colorspace_a.png rename to tests/ref/png_rgba_colorspace_a.png diff --git a/src/test/ref/png_rgba_colorspace_b.html b/tests/ref/png_rgba_colorspace_b.html similarity index 100% rename from src/test/ref/png_rgba_colorspace_b.html rename to tests/ref/png_rgba_colorspace_b.html diff --git a/src/test/ref/position_abs_cb_with_non_cb_kid_a.html b/tests/ref/position_abs_cb_with_non_cb_kid_a.html similarity index 100% rename from src/test/ref/position_abs_cb_with_non_cb_kid_a.html rename to tests/ref/position_abs_cb_with_non_cb_kid_a.html diff --git a/src/test/ref/position_abs_cb_with_non_cb_kid_b.html b/tests/ref/position_abs_cb_with_non_cb_kid_b.html similarity index 100% rename from src/test/ref/position_abs_cb_with_non_cb_kid_b.html rename to tests/ref/position_abs_cb_with_non_cb_kid_b.html diff --git a/src/test/ref/position_abs_height_width_a.html b/tests/ref/position_abs_height_width_a.html similarity index 100% rename from src/test/ref/position_abs_height_width_a.html rename to tests/ref/position_abs_height_width_a.html diff --git a/src/test/ref/position_abs_height_width_b.html b/tests/ref/position_abs_height_width_b.html similarity index 100% rename from src/test/ref/position_abs_height_width_b.html rename to tests/ref/position_abs_height_width_b.html diff --git a/src/test/ref/position_abs_left_a.html b/tests/ref/position_abs_left_a.html similarity index 100% rename from src/test/ref/position_abs_left_a.html rename to tests/ref/position_abs_left_a.html diff --git a/src/test/ref/position_abs_left_b.html b/tests/ref/position_abs_left_b.html similarity index 100% rename from src/test/ref/position_abs_left_b.html rename to tests/ref/position_abs_left_b.html diff --git a/src/test/ref/position_abs_margin_top_percentage_a.html b/tests/ref/position_abs_margin_top_percentage_a.html similarity index 100% rename from src/test/ref/position_abs_margin_top_percentage_a.html rename to tests/ref/position_abs_margin_top_percentage_a.html diff --git a/src/test/ref/position_abs_margin_top_percentage_b.html b/tests/ref/position_abs_margin_top_percentage_b.html similarity index 100% rename from src/test/ref/position_abs_margin_top_percentage_b.html rename to tests/ref/position_abs_margin_top_percentage_b.html diff --git a/src/test/ref/position_abs_nested_a.html b/tests/ref/position_abs_nested_a.html similarity index 100% rename from src/test/ref/position_abs_nested_a.html rename to tests/ref/position_abs_nested_a.html diff --git a/src/test/ref/position_abs_nested_b.html b/tests/ref/position_abs_nested_b.html similarity index 100% rename from src/test/ref/position_abs_nested_b.html rename to tests/ref/position_abs_nested_b.html diff --git a/src/test/ref/position_abs_pseudo_a.html b/tests/ref/position_abs_pseudo_a.html similarity index 100% rename from src/test/ref/position_abs_pseudo_a.html rename to tests/ref/position_abs_pseudo_a.html diff --git a/src/test/ref/position_abs_pseudo_b.html b/tests/ref/position_abs_pseudo_b.html similarity index 100% rename from src/test/ref/position_abs_pseudo_b.html rename to tests/ref/position_abs_pseudo_b.html diff --git a/src/test/ref/position_abs_replaced_simple_a.html b/tests/ref/position_abs_replaced_simple_a.html similarity index 100% rename from src/test/ref/position_abs_replaced_simple_a.html rename to tests/ref/position_abs_replaced_simple_a.html diff --git a/src/test/ref/position_abs_replaced_simple_b.html b/tests/ref/position_abs_replaced_simple_b.html similarity index 100% rename from src/test/ref/position_abs_replaced_simple_b.html rename to tests/ref/position_abs_replaced_simple_b.html diff --git a/src/test/ref/position_abs_static_y_a.html b/tests/ref/position_abs_static_y_a.html similarity index 100% rename from src/test/ref/position_abs_static_y_a.html rename to tests/ref/position_abs_static_y_a.html diff --git a/src/test/ref/position_abs_static_y_b.html b/tests/ref/position_abs_static_y_b.html similarity index 100% rename from src/test/ref/position_abs_static_y_b.html rename to tests/ref/position_abs_static_y_b.html diff --git a/src/test/ref/position_abs_width_percentage_a.html b/tests/ref/position_abs_width_percentage_a.html similarity index 100% rename from src/test/ref/position_abs_width_percentage_a.html rename to tests/ref/position_abs_width_percentage_a.html diff --git a/src/test/ref/position_abs_width_percentage_b.html b/tests/ref/position_abs_width_percentage_b.html similarity index 100% rename from src/test/ref/position_abs_width_percentage_b.html rename to tests/ref/position_abs_width_percentage_b.html diff --git a/src/test/ref/position_fixed_a.html b/tests/ref/position_fixed_a.html similarity index 100% rename from src/test/ref/position_fixed_a.html rename to tests/ref/position_fixed_a.html diff --git a/src/test/ref/position_fixed_b.html b/tests/ref/position_fixed_b.html similarity index 100% rename from src/test/ref/position_fixed_b.html rename to tests/ref/position_fixed_b.html diff --git a/src/test/ref/position_fixed_background_color_a.html b/tests/ref/position_fixed_background_color_a.html similarity index 100% rename from src/test/ref/position_fixed_background_color_a.html rename to tests/ref/position_fixed_background_color_a.html diff --git a/src/test/ref/position_fixed_background_color_b.html b/tests/ref/position_fixed_background_color_b.html similarity index 100% rename from src/test/ref/position_fixed_background_color_b.html rename to tests/ref/position_fixed_background_color_b.html diff --git a/src/test/ref/position_fixed_overflow_a.html b/tests/ref/position_fixed_overflow_a.html similarity index 100% rename from src/test/ref/position_fixed_overflow_a.html rename to tests/ref/position_fixed_overflow_a.html diff --git a/src/test/ref/position_fixed_overflow_b.html b/tests/ref/position_fixed_overflow_b.html similarity index 100% rename from src/test/ref/position_fixed_overflow_b.html rename to tests/ref/position_fixed_overflow_b.html diff --git a/src/test/ref/position_fixed_simple_a.html b/tests/ref/position_fixed_simple_a.html similarity index 100% rename from src/test/ref/position_fixed_simple_a.html rename to tests/ref/position_fixed_simple_a.html diff --git a/src/test/ref/position_fixed_simple_b.html b/tests/ref/position_fixed_simple_b.html similarity index 100% rename from src/test/ref/position_fixed_simple_b.html rename to tests/ref/position_fixed_simple_b.html diff --git a/src/test/ref/position_fixed_static_y_a.html b/tests/ref/position_fixed_static_y_a.html similarity index 100% rename from src/test/ref/position_fixed_static_y_a.html rename to tests/ref/position_fixed_static_y_a.html diff --git a/src/test/ref/position_fixed_static_y_b.html b/tests/ref/position_fixed_static_y_b.html similarity index 100% rename from src/test/ref/position_fixed_static_y_b.html rename to tests/ref/position_fixed_static_y_b.html diff --git a/src/test/ref/position_relative_a.html b/tests/ref/position_relative_a.html similarity index 100% rename from src/test/ref/position_relative_a.html rename to tests/ref/position_relative_a.html diff --git a/src/test/ref/position_relative_b.html b/tests/ref/position_relative_b.html similarity index 100% rename from src/test/ref/position_relative_b.html rename to tests/ref/position_relative_b.html diff --git a/src/test/ref/position_relative_top_percentage_a.html b/tests/ref/position_relative_top_percentage_a.html similarity index 100% rename from src/test/ref/position_relative_top_percentage_a.html rename to tests/ref/position_relative_top_percentage_a.html diff --git a/src/test/ref/position_relative_top_percentage_b.html b/tests/ref/position_relative_top_percentage_b.html similarity index 100% rename from src/test/ref/position_relative_top_percentage_b.html rename to tests/ref/position_relative_top_percentage_b.html diff --git a/src/test/ref/pseudo_element_a.html b/tests/ref/pseudo_element_a.html similarity index 100% rename from src/test/ref/pseudo_element_a.html rename to tests/ref/pseudo_element_a.html diff --git a/src/test/ref/pseudo_element_b.html b/tests/ref/pseudo_element_b.html similarity index 100% rename from src/test/ref/pseudo_element_b.html rename to tests/ref/pseudo_element_b.html diff --git a/src/test/ref/pseudo_inherit.html b/tests/ref/pseudo_inherit.html similarity index 100% rename from src/test/ref/pseudo_inherit.html rename to tests/ref/pseudo_inherit.html diff --git a/src/test/ref/pseudo_inherit_ref.html b/tests/ref/pseudo_inherit_ref.html similarity index 100% rename from src/test/ref/pseudo_inherit_ref.html rename to tests/ref/pseudo_inherit_ref.html diff --git a/src/test/ref/reset.css b/tests/ref/reset.css similarity index 100% rename from src/test/ref/reset.css rename to tests/ref/reset.css diff --git a/src/test/ref/root_height_a.html b/tests/ref/root_height_a.html similarity index 100% rename from src/test/ref/root_height_a.html rename to tests/ref/root_height_a.html diff --git a/src/test/ref/root_height_b.html b/tests/ref/root_height_b.html similarity index 100% rename from src/test/ref/root_height_b.html rename to tests/ref/root_height_b.html diff --git a/src/test/ref/root_margin_collapse_a.html b/tests/ref/root_margin_collapse_a.html similarity index 100% rename from src/test/ref/root_margin_collapse_a.html rename to tests/ref/root_margin_collapse_a.html diff --git a/src/test/ref/root_margin_collapse_b.html b/tests/ref/root_margin_collapse_b.html similarity index 100% rename from src/test/ref/root_margin_collapse_b.html rename to tests/ref/root_margin_collapse_b.html diff --git a/src/test/ref/root_pseudo_a.html b/tests/ref/root_pseudo_a.html similarity index 100% rename from src/test/ref/root_pseudo_a.html rename to tests/ref/root_pseudo_a.html diff --git a/src/test/ref/root_pseudo_b.html b/tests/ref/root_pseudo_b.html similarity index 100% rename from src/test/ref/root_pseudo_b.html rename to tests/ref/root_pseudo_b.html diff --git a/src/test/ref/rust-0.png b/tests/ref/rust-0.png similarity index 100% rename from src/test/ref/rust-0.png rename to tests/ref/rust-0.png diff --git a/src/test/ref/rust_logo.png b/tests/ref/rust_logo.png similarity index 100% rename from src/test/ref/rust_logo.png rename to tests/ref/rust_logo.png diff --git a/src/test/ref/setattribute_id_restyle_a.html b/tests/ref/setattribute_id_restyle_a.html similarity index 100% rename from src/test/ref/setattribute_id_restyle_a.html rename to tests/ref/setattribute_id_restyle_a.html diff --git a/src/test/ref/setattribute_id_restyle_b.html b/tests/ref/setattribute_id_restyle_b.html similarity index 100% rename from src/test/ref/setattribute_id_restyle_b.html rename to tests/ref/setattribute_id_restyle_b.html diff --git a/src/test/ref/simple_iframe.html b/tests/ref/simple_iframe.html similarity index 100% rename from src/test/ref/simple_iframe.html rename to tests/ref/simple_iframe.html diff --git a/src/test/ref/simple_iframe_ref.html b/tests/ref/simple_iframe_ref.html similarity index 100% rename from src/test/ref/simple_iframe_ref.html rename to tests/ref/simple_iframe_ref.html diff --git a/src/test/ref/style_is_in_doc.html b/tests/ref/style_is_in_doc.html similarity index 100% rename from src/test/ref/style_is_in_doc.html rename to tests/ref/style_is_in_doc.html diff --git a/src/test/ref/style_is_in_doc_ref.html b/tests/ref/style_is_in_doc_ref.html similarity index 100% rename from src/test/ref/style_is_in_doc_ref.html rename to tests/ref/style_is_in_doc_ref.html diff --git a/src/test/ref/subdirectory/background_image.css b/tests/ref/subdirectory/background_image.css similarity index 100% rename from src/test/ref/subdirectory/background_image.css rename to tests/ref/subdirectory/background_image.css diff --git a/src/test/ref/table_auto_width.html b/tests/ref/table_auto_width.html similarity index 100% rename from src/test/ref/table_auto_width.html rename to tests/ref/table_auto_width.html diff --git a/src/test/ref/table_auto_width_ref.html b/tests/ref/table_auto_width_ref.html similarity index 100% rename from src/test/ref/table_auto_width_ref.html rename to tests/ref/table_auto_width_ref.html diff --git a/src/test/ref/test.jpeg b/tests/ref/test.jpeg similarity index 100% rename from src/test/ref/test.jpeg rename to tests/ref/test.jpeg diff --git a/src/test/ref/text_decoration_cached.html b/tests/ref/text_decoration_cached.html similarity index 100% rename from src/test/ref/text_decoration_cached.html rename to tests/ref/text_decoration_cached.html diff --git a/src/test/ref/text_decoration_cached_ref.html b/tests/ref/text_decoration_cached_ref.html similarity index 100% rename from src/test/ref/text_decoration_cached_ref.html rename to tests/ref/text_decoration_cached_ref.html diff --git a/src/test/ref/text_decoration_propagation_a.html b/tests/ref/text_decoration_propagation_a.html similarity index 100% rename from src/test/ref/text_decoration_propagation_a.html rename to tests/ref/text_decoration_propagation_a.html diff --git a/src/test/ref/text_decoration_propagation_b.html b/tests/ref/text_decoration_propagation_b.html similarity index 100% rename from src/test/ref/text_decoration_propagation_b.html rename to tests/ref/text_decoration_propagation_b.html diff --git a/src/test/ref/upper_id_attr.html b/tests/ref/upper_id_attr.html similarity index 100% rename from src/test/ref/upper_id_attr.html rename to tests/ref/upper_id_attr.html diff --git a/src/test/ref/upper_id_attr_ref.html b/tests/ref/upper_id_attr_ref.html similarity index 100% rename from src/test/ref/upper_id_attr_ref.html rename to tests/ref/upper_id_attr_ref.html diff --git a/src/test/ref/vertical-lr-blocks.html b/tests/ref/vertical-lr-blocks.html similarity index 100% rename from src/test/ref/vertical-lr-blocks.html rename to tests/ref/vertical-lr-blocks.html diff --git a/src/test/ref/vertical-lr-blocks_ref.html b/tests/ref/vertical-lr-blocks_ref.html similarity index 100% rename from src/test/ref/vertical-lr-blocks_ref.html rename to tests/ref/vertical-lr-blocks_ref.html diff --git a/src/test/ref/visibility_hidden.html b/tests/ref/visibility_hidden.html similarity index 100% rename from src/test/ref/visibility_hidden.html rename to tests/ref/visibility_hidden.html diff --git a/src/test/ref/visibility_hidden_ref.html b/tests/ref/visibility_hidden_ref.html similarity index 100% rename from src/test/ref/visibility_hidden_ref.html rename to tests/ref/visibility_hidden_ref.html diff --git a/src/test/ref/width_nonreplaced_block_simple_a.html b/tests/ref/width_nonreplaced_block_simple_a.html similarity index 100% rename from src/test/ref/width_nonreplaced_block_simple_a.html rename to tests/ref/width_nonreplaced_block_simple_a.html diff --git a/src/test/ref/width_nonreplaced_block_simple_b.html b/tests/ref/width_nonreplaced_block_simple_b.html similarity index 100% rename from src/test/ref/width_nonreplaced_block_simple_b.html rename to tests/ref/width_nonreplaced_block_simple_b.html diff --git a/src/test/harness/reftest/reftest.rs b/tests/reftest.rs similarity index 99% rename from src/test/harness/reftest/reftest.rs rename to tests/reftest.rs index b2f26c87b77..75344f7a68a 100644 --- a/src/test/harness/reftest/reftest.rs +++ b/tests/reftest.rs @@ -224,7 +224,7 @@ fn capture(reftest: &Reftest, side: uint) -> (u32, u32, Vec) { args.push_all(["-f".to_string(), "-o".to_string(), filename.clone(), reftest.files[side].clone()]); - let retval = match Command::new("./servo").args(args.as_slice()).status() { + let retval = match Command::new("target/servo").args(args.as_slice()).status() { Ok(status) => status, Err(e) => fail!("failed to execute process: {}", e), }; diff --git a/src/test/wpt/README.md b/tests/wpt/README.md similarity index 100% rename from src/test/wpt/README.md rename to tests/wpt/README.md diff --git a/src/test/wpt/config.ini b/tests/wpt/config.ini similarity index 100% rename from src/test/wpt/config.ini rename to tests/wpt/config.ini diff --git a/src/test/wpt/include.ini b/tests/wpt/include.ini similarity index 87% rename from src/test/wpt/include.ini rename to tests/wpt/include.ini index 1ee84e30bf3..bb34afa4482 100644 --- a/src/test/wpt/include.ini +++ b/tests/wpt/include.ini @@ -33,6 +33,14 @@ skip: true skip: false [embedded-content] skip: false + [the-ol-element] + skip: false + [grouping-ol] + skip: true + [the-li-element] + skip: false + [grouping-li] + skip: true [media-elements] skip: true [the-audio-element] diff --git a/src/test/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json similarity index 99% rename from src/test/wpt/metadata/MANIFEST.json rename to tests/wpt/metadata/MANIFEST.json index 9b020617097..71b3c8475a3 100644 --- a/src/test/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -22733,4 +22733,4 @@ }, "local_changes": [], "rev": "2c4d2713ef1eca473ab6df02cc5b0f9fdbcffd29" -} \ No newline at end of file +} diff --git a/src/test/wpt/metadata/XMLHttpRequest/FormData-append.html.ini b/tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/FormData-append.html.ini rename to tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/abort-after-stop.htm.ini b/tests/wpt/metadata/XMLHttpRequest/abort-after-stop.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/abort-after-stop.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/abort-after-stop.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/anonymous-mode-unsupported.htm.ini b/tests/wpt/metadata/XMLHttpRequest/anonymous-mode-unsupported.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/anonymous-mode-unsupported.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/anonymous-mode-unsupported.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/data-uri-basic.htm.ini b/tests/wpt/metadata/XMLHttpRequest/data-uri-basic.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/data-uri-basic.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/data-uri-basic.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/data-uri.htm.ini b/tests/wpt/metadata/XMLHttpRequest/data-uri.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/data-uri.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/data-uri.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/formdata-blob.htm.ini b/tests/wpt/metadata/XMLHttpRequest/formdata-blob.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/formdata-blob.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/formdata-blob.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/formdata.htm.ini b/tests/wpt/metadata/XMLHttpRequest/formdata.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/formdata.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/formdata.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/getresponseheader-case-insensitive.htm.ini b/tests/wpt/metadata/XMLHttpRequest/getresponseheader-case-insensitive.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/getresponseheader-case-insensitive.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/getresponseheader-case-insensitive.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/getresponseheader-chunked-trailer.htm.ini b/tests/wpt/metadata/XMLHttpRequest/getresponseheader-chunked-trailer.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/getresponseheader-chunked-trailer.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/getresponseheader-chunked-trailer.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/getresponseheader-error-state.htm.ini b/tests/wpt/metadata/XMLHttpRequest/getresponseheader-error-state.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/getresponseheader-error-state.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/getresponseheader-error-state.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/interfaces.html.ini b/tests/wpt/metadata/XMLHttpRequest/interfaces.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/interfaces.html.ini rename to tests/wpt/metadata/XMLHttpRequest/interfaces.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-after-setrequestheader.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-after-setrequestheader.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-after-setrequestheader.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-after-setrequestheader.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-referer.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-referer.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-referer.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-referer.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-about-blank-window.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-about-blank-window.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-about-blank-window.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-about-blank-window.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-base-inserted.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-base-inserted.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-base-inserted.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-base-inserted.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-base.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-base.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-base.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-base.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-bogus.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-bogus.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-bogus.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-bogus.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-javascript-window-2.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-javascript-window-2.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-javascript-window-2.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-javascript-window-2.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-javascript-window.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-javascript-window.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-javascript-window.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-javascript-window.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-2.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-2.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-2.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-2.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-3.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-3.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-3.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-3.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-4.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-4.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-4.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-4.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-5.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-5.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window-5.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-5.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-multi-window.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-multi-window.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-done-state.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-done-state.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-done-state.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-done-state.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-invalid-mime-type.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-invalid-mime-type.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-invalid-mime-type.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-invalid-mime-type.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-loading-state.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-loading-state.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-loading-state.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-loading-state.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-xml.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-xml.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-xml.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-xml.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/progress-events-response-data-gzip.htm.ini b/tests/wpt/metadata/XMLHttpRequest/progress-events-response-data-gzip.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/progress-events-response-data-gzip.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/progress-events-response-data-gzip.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/response-data-arraybuffer.htm.ini b/tests/wpt/metadata/XMLHttpRequest/response-data-arraybuffer.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/response-data-arraybuffer.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/response-data-arraybuffer.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/response-data-blob.htm.ini b/tests/wpt/metadata/XMLHttpRequest/response-data-blob.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/response-data-blob.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/response-data-blob.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/response-data-deflate.htm.ini b/tests/wpt/metadata/XMLHttpRequest/response-data-deflate.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/response-data-deflate.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/response-data-deflate.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/response-data-gzip.htm.ini b/tests/wpt/metadata/XMLHttpRequest/response-data-gzip.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/response-data-gzip.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/response-data-gzip.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/response-json.htm.ini b/tests/wpt/metadata/XMLHttpRequest/response-json.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/response-json.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/response-json.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/responsetext-decoding.htm.ini b/tests/wpt/metadata/XMLHttpRequest/responsetext-decoding.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/responsetext-decoding.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/responsetext-decoding.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/responsexml-basic.htm.ini b/tests/wpt/metadata/XMLHttpRequest/responsexml-basic.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/responsexml-basic.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/responsexml-basic.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/responsexml-document-properties.htm.ini b/tests/wpt/metadata/XMLHttpRequest/responsexml-document-properties.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/responsexml-document-properties.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/responsexml-document-properties.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/responsexml-media-type.htm.ini b/tests/wpt/metadata/XMLHttpRequest/responsexml-media-type.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/responsexml-media-type.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/responsexml-media-type.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/responsexml-non-document-types.htm.ini b/tests/wpt/metadata/XMLHttpRequest/responsexml-non-document-types.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/responsexml-non-document-types.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/responsexml-non-document-types.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-accept-language.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-accept-language.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-accept-language.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-accept-language.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-basic.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-basic.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-competing-names-passwords.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-competing-names-passwords.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-competing-names-passwords.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-competing-names-passwords.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-conditional.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-conditional.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-conditional.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-conditional.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-content-type-charset.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-content-type-charset.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-content-type-charset.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-content-type-charset.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-data-arraybuffer.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-data-arraybuffer.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-data-arraybuffer.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-data-arraybuffer.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-data-blob.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-data-blob.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-data-blob.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-data-blob.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-data-formdata.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-data-formdata.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-data-formdata.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-data-formdata.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-entity-body-document-bogus.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document-bogus.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-entity-body-document-bogus.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-entity-body-document-bogus.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-entity-body-get-head-async.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-get-head-async.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-entity-body-get-head-async.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-entity-body-get-head-async.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-entity-body-none.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-none.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-entity-body-none.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-entity-body-none.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-network-error-async-events.sub.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-network-error-async-events.sub.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-network-error-async-events.sub.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-network-error-async-events.sub.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-network-error-sync-events.sub.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-network-error-sync-events.sub.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-network-error-sync-events.sub.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-network-error-sync-events.sub.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-no-response-event-loadend.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-no-response-event-loadend.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-no-response-event-loadend.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-no-response-event-loadend.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-no-response-event-order.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-no-response-event-order.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-no-response-event-order.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-no-response-event-order.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-non-same-origin.sub.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-non-same-origin.sub.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-non-same-origin.sub.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-non-same-origin.sub.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-bogus.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-bogus.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-bogus.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-bogus.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-infinite-sync.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-infinite-sync.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-infinite-sync.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-infinite-sync.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-infinite.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-infinite.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-infinite.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-infinite.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-no-location.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-no-location.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-no-location.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-no-location.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-to-cors.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-to-cors.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-to-cors.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-to-cors.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect-to-non-cors.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect-to-non-cors.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect-to-non-cors.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect-to-non-cors.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-redirect.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-redirect.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-redirect.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-redirect.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/send-response-event-order.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-response-event-order.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/send-response-event-order.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/send-response-event-order.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-name.htm.ini b/tests/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-name.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-name.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-name.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-value.htm.ini b/tests/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-value.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-value.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/setrequestheader-bogus-value.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/setrequestheader-case-insensitive.htm.ini b/tests/wpt/metadata/XMLHttpRequest/setrequestheader-case-insensitive.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/setrequestheader-case-insensitive.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/setrequestheader-case-insensitive.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/setrequestheader-header-allowed.htm.ini b/tests/wpt/metadata/XMLHttpRequest/setrequestheader-header-allowed.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/setrequestheader-header-allowed.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/setrequestheader-header-allowed.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/setrequestheader-header-forbidden.htm.ini b/tests/wpt/metadata/XMLHttpRequest/setrequestheader-header-forbidden.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/setrequestheader-header-forbidden.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/setrequestheader-header-forbidden.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/status-async.htm.ini b/tests/wpt/metadata/XMLHttpRequest/status-async.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/status-async.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/status-async.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/status-basic.htm.ini b/tests/wpt/metadata/XMLHttpRequest/status-basic.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/status-basic.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/status-basic.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/status-error.htm.ini b/tests/wpt/metadata/XMLHttpRequest/status-error.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/status-error.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/status-error.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/timeout-cors-async.htm.ini b/tests/wpt/metadata/XMLHttpRequest/timeout-cors-async.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/timeout-cors-async.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/timeout-cors-async.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/timeout-sync.htm.ini b/tests/wpt/metadata/XMLHttpRequest/timeout-sync.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/timeout-sync.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/timeout-sync.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/withcredentials-wrong-state.htm.ini b/tests/wpt/metadata/XMLHttpRequest/withcredentials-wrong-state.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/withcredentials-wrong-state.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/withcredentials-wrong-state.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error-sync.htm.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error-sync.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error-sync.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error-sync.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error.htm.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error.htm.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error.htm.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-network-error.htm.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html.ini diff --git a/src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html.ini similarity index 100% rename from src/test/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html.ini rename to tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html.ini diff --git a/src/test/wpt/metadata/dom/errors/exceptions.html.ini b/tests/wpt/metadata/dom/errors/exceptions.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/errors/exceptions.html.ini rename to tests/wpt/metadata/dom/errors/exceptions.html.ini diff --git a/src/test/wpt/metadata/dom/historical.html.ini b/tests/wpt/metadata/dom/historical.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/historical.html.ini rename to tests/wpt/metadata/dom/historical.html.ini diff --git a/src/test/wpt/metadata/dom/interface-objects.html.ini b/tests/wpt/metadata/dom/interface-objects.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/interface-objects.html.ini rename to tests/wpt/metadata/dom/interface-objects.html.ini diff --git a/src/test/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/interfaces.html.ini rename to tests/wpt/metadata/dom/interfaces.html.ini diff --git a/src/test/wpt/metadata/dom/lists/DOMTokenList-stringifier.html.ini b/tests/wpt/metadata/dom/lists/DOMTokenList-stringifier.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/lists/DOMTokenList-stringifier.html.ini rename to tests/wpt/metadata/dom/lists/DOMTokenList-stringifier.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Comment-constructor.html.ini b/tests/wpt/metadata/dom/nodes/Comment-constructor.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Comment-constructor.html.ini rename to tests/wpt/metadata/dom/nodes/Comment-constructor.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini rename to tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/DOMImplementation-createDocumentType.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocumentType.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/DOMImplementation-createDocumentType.html.ini rename to tests/wpt/metadata/dom/nodes/DOMImplementation-createDocumentType.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini rename to tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/DOMImplementation-hasFeature.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-hasFeature.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/DOMImplementation-hasFeature.html.ini rename to tests/wpt/metadata/dom/nodes/DOMImplementation-hasFeature.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-characterSet-normalization.html.ini b/tests/wpt/metadata/dom/nodes/Document-characterSet-normalization.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-characterSet-normalization.html.ini rename to tests/wpt/metadata/dom/nodes/Document-characterSet-normalization.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-constructor.html.ini b/tests/wpt/metadata/dom/nodes/Document-constructor.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-constructor.html.ini rename to tests/wpt/metadata/dom/nodes/Document-constructor.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_bmp.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_bmp.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_bmp.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_bmp.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_css.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_css.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_css.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_css.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_gif.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_gif.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_gif.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_gif.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_html.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_html.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_html.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_html.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_jpg.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_jpg.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_jpg.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_jpg.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_03.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_03.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_03.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_03.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_png.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_png.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_png.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_png.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_xml.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_xml.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_xml.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_xml.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html.ini rename to tests/wpt/metadata/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini b/tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini rename to tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createElementNS.html.ini b/tests/wpt/metadata/dom/nodes/Document-createElementNS.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createElementNS.html.ini rename to tests/wpt/metadata/dom/nodes/Document-createElementNS.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createEvent.html.ini b/tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createEvent.html.ini rename to tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-1.xhtml.ini b/tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-1.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-1.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-1.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-2.xhtml.ini b/tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-2.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-2.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction-literal-2.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction.xhtml.ini b/tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createProcessingInstruction.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Document-createProcessingInstruction.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-createTreeWalker.html.ini b/tests/wpt/metadata/dom/nodes/Document-createTreeWalker.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-createTreeWalker.html.ini rename to tests/wpt/metadata/dom/nodes/Document-createTreeWalker.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-getElementById.html.ini b/tests/wpt/metadata/dom/nodes/Document-getElementById.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-getElementById.html.ini rename to tests/wpt/metadata/dom/nodes/Document-getElementById.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-getElementsByTagName.html.ini b/tests/wpt/metadata/dom/nodes/Document-getElementsByTagName.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-getElementsByTagName.html.ini rename to tests/wpt/metadata/dom/nodes/Document-getElementsByTagName.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Document-getElementsByTagName.xhtml.ini b/tests/wpt/metadata/dom/nodes/Document-getElementsByTagName.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Document-getElementsByTagName.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Document-getElementsByTagName.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElement-null.html.ini b/tests/wpt/metadata/dom/nodes/Element-childElement-null.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElement-null.html.ini rename to tests/wpt/metadata/dom/nodes/Element-childElement-null.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElement-null.svg.ini b/tests/wpt/metadata/dom/nodes/Element-childElement-null.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElement-null.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-childElement-null.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElement-null.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-childElement-null.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElement-null.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-childElement-null.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.html.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.html.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.svg.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-add.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.html.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.html.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.svg.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-dynamic-remove.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.html.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.html.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.svg.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount-nochild.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount-nochild.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount.html.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount.html.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount.svg.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-childElementCount.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-childElementCount.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-childElementCount.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-childElementCount.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-children.html.ini b/tests/wpt/metadata/dom/nodes/Element-children.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-children.html.ini rename to tests/wpt/metadata/dom/nodes/Element-children.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-classlist.html.ini b/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-classlist.html.ini rename to tests/wpt/metadata/dom/nodes/Element-classlist.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild-entity.svg.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild-entity.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild-entity.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild-entity.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild-entity.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild-entity.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild-entity.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild-entity.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.html.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.html.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.svg.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild-namespace.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild.html.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild.html.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild.svg.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-firstElementChild.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-firstElementChild.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-firstElementChild.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-firstElementChild.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-lastElementChild.html.ini b/tests/wpt/metadata/dom/nodes/Element-lastElementChild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-lastElementChild.html.ini rename to tests/wpt/metadata/dom/nodes/Element-lastElementChild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-lastElementChild.svg.ini b/tests/wpt/metadata/dom/nodes/Element-lastElementChild.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-lastElementChild.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-lastElementChild.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-lastElementChild.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-lastElementChild.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-lastElementChild.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-lastElementChild.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.html.ini b/tests/wpt/metadata/dom/nodes/Element-nextElementSibling.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.html.ini rename to tests/wpt/metadata/dom/nodes/Element-nextElementSibling.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.svg.ini b/tests/wpt/metadata/dom/nodes/Element-nextElementSibling.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-nextElementSibling.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-nextElementSibling.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-nextElementSibling.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-nextElementSibling.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.html.ini b/tests/wpt/metadata/dom/nodes/Element-previousElementSibling.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.html.ini rename to tests/wpt/metadata/dom/nodes/Element-previousElementSibling.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.svg.ini b/tests/wpt/metadata/dom/nodes/Element-previousElementSibling.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-previousElementSibling.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-previousElementSibling.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-previousElementSibling.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-previousElementSibling.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-removeAttributeNS.html.ini b/tests/wpt/metadata/dom/nodes/Element-removeAttributeNS.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-removeAttributeNS.html.ini rename to tests/wpt/metadata/dom/nodes/Element-removeAttributeNS.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.html.ini b/tests/wpt/metadata/dom/nodes/Element-siblingElement-null.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.html.ini rename to tests/wpt/metadata/dom/nodes/Element-siblingElement-null.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.svg.ini b/tests/wpt/metadata/dom/nodes/Element-siblingElement-null.svg.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.svg.ini rename to tests/wpt/metadata/dom/nodes/Element-siblingElement-null.svg.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.xhtml.ini b/tests/wpt/metadata/dom/nodes/Element-siblingElement-null.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-siblingElement-null.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Element-siblingElement-null.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Element-tagName.html.ini b/tests/wpt/metadata/dom/nodes/Element-tagName.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Element-tagName.html.ini rename to tests/wpt/metadata/dom/nodes/Element-tagName.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-appendChild.html.ini b/tests/wpt/metadata/dom/nodes/Node-appendChild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-appendChild.html.ini rename to tests/wpt/metadata/dom/nodes/Node-appendChild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-compareDocumentPosition.html.ini b/tests/wpt/metadata/dom/nodes/Node-compareDocumentPosition.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-compareDocumentPosition.html.ini rename to tests/wpt/metadata/dom/nodes/Node-compareDocumentPosition.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-contains.html.ini b/tests/wpt/metadata/dom/nodes/Node-contains.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-contains.html.ini rename to tests/wpt/metadata/dom/nodes/Node-contains.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-insertBefore.html.ini b/tests/wpt/metadata/dom/nodes/Node-insertBefore.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-insertBefore.html.ini rename to tests/wpt/metadata/dom/nodes/Node-insertBefore.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-isEqualNode.xhtml.ini b/tests/wpt/metadata/dom/nodes/Node-isEqualNode.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-isEqualNode.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Node-isEqualNode.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-lookupPrefix.xhtml.ini b/tests/wpt/metadata/dom/nodes/Node-lookupPrefix.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-lookupPrefix.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Node-lookupPrefix.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-nodeName.html.ini b/tests/wpt/metadata/dom/nodes/Node-nodeName.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-nodeName.html.ini rename to tests/wpt/metadata/dom/nodes/Node-nodeName.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-nodeName.xhtml.ini b/tests/wpt/metadata/dom/nodes/Node-nodeName.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-nodeName.xhtml.ini rename to tests/wpt/metadata/dom/nodes/Node-nodeName.xhtml.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-parentNode.html.ini b/tests/wpt/metadata/dom/nodes/Node-parentNode.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-parentNode.html.ini rename to tests/wpt/metadata/dom/nodes/Node-parentNode.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-properties.html.ini b/tests/wpt/metadata/dom/nodes/Node-properties.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-properties.html.ini rename to tests/wpt/metadata/dom/nodes/Node-properties.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-removeChild.html.ini b/tests/wpt/metadata/dom/nodes/Node-removeChild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-removeChild.html.ini rename to tests/wpt/metadata/dom/nodes/Node-removeChild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/Node-replaceChild.html.ini b/tests/wpt/metadata/dom/nodes/Node-replaceChild.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/Node-replaceChild.html.ini rename to tests/wpt/metadata/dom/nodes/Node-replaceChild.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini rename to tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/ParentNode-querySelector-All.xht.ini b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.xht.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/ParentNode-querySelector-All.xht.ini rename to tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.xht.ini diff --git a/src/test/wpt/metadata/dom/nodes/attributes.html.ini b/tests/wpt/metadata/dom/nodes/attributes.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/attributes.html.ini rename to tests/wpt/metadata/dom/nodes/attributes.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/case.html.ini b/tests/wpt/metadata/dom/nodes/case.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/case.html.ini rename to tests/wpt/metadata/dom/nodes/case.html.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-12.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-12.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-12.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-12.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-13.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-13.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-13.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-13.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-14.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-14.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-14.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-14.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-18.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-18.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-18.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-18.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-20.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-20.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-20.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-20.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-21.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-21.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-21.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-21.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-22.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-22.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-22.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-22.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-25.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-25.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-25.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-25.htm.ini diff --git a/src/test/wpt/metadata/dom/nodes/getElementsByClassName-31.htm.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-31.htm.ini similarity index 100% rename from src/test/wpt/metadata/dom/nodes/getElementsByClassName-31.htm.ini rename to tests/wpt/metadata/dom/nodes/getElementsByClassName-31.htm.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-attributes.html.ini b/tests/wpt/metadata/dom/ranges/Range-attributes.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-attributes.html.ini rename to tests/wpt/metadata/dom/ranges/Range-attributes.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-cloneContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-cloneContents.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-cloneContents.html.ini rename to tests/wpt/metadata/dom/ranges/Range-cloneContents.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-cloneRange.html.ini b/tests/wpt/metadata/dom/ranges/Range-cloneRange.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-cloneRange.html.ini rename to tests/wpt/metadata/dom/ranges/Range-cloneRange.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-collapse.html.ini b/tests/wpt/metadata/dom/ranges/Range-collapse.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-collapse.html.ini rename to tests/wpt/metadata/dom/ranges/Range-collapse.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-commonAncestorContainer-2.html.ini b/tests/wpt/metadata/dom/ranges/Range-commonAncestorContainer-2.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-commonAncestorContainer-2.html.ini rename to tests/wpt/metadata/dom/ranges/Range-commonAncestorContainer-2.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-commonAncestorContainer.html.ini b/tests/wpt/metadata/dom/ranges/Range-commonAncestorContainer.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-commonAncestorContainer.html.ini rename to tests/wpt/metadata/dom/ranges/Range-commonAncestorContainer.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-compareBoundaryPoints.html.ini b/tests/wpt/metadata/dom/ranges/Range-compareBoundaryPoints.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-compareBoundaryPoints.html.ini rename to tests/wpt/metadata/dom/ranges/Range-compareBoundaryPoints.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-comparePoint-2.html.ini b/tests/wpt/metadata/dom/ranges/Range-comparePoint-2.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-comparePoint-2.html.ini rename to tests/wpt/metadata/dom/ranges/Range-comparePoint-2.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-comparePoint.html.ini b/tests/wpt/metadata/dom/ranges/Range-comparePoint.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-comparePoint.html.ini rename to tests/wpt/metadata/dom/ranges/Range-comparePoint.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-deleteContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-deleteContents.html.ini rename to tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-detach.html.ini b/tests/wpt/metadata/dom/ranges/Range-detach.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-detach.html.ini rename to tests/wpt/metadata/dom/ranges/Range-detach.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-extractContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-extractContents.html.ini rename to tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-insertNode.html.ini b/tests/wpt/metadata/dom/ranges/Range-insertNode.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-insertNode.html.ini rename to tests/wpt/metadata/dom/ranges/Range-insertNode.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-intersectsNode-binding.html.ini b/tests/wpt/metadata/dom/ranges/Range-intersectsNode-binding.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-intersectsNode-binding.html.ini rename to tests/wpt/metadata/dom/ranges/Range-intersectsNode-binding.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-intersectsNode.html.ini b/tests/wpt/metadata/dom/ranges/Range-intersectsNode.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-intersectsNode.html.ini rename to tests/wpt/metadata/dom/ranges/Range-intersectsNode.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-isPointInRange.html.ini b/tests/wpt/metadata/dom/ranges/Range-isPointInRange.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-isPointInRange.html.ini rename to tests/wpt/metadata/dom/ranges/Range-isPointInRange.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-mutations.html.ini b/tests/wpt/metadata/dom/ranges/Range-mutations.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-mutations.html.ini rename to tests/wpt/metadata/dom/ranges/Range-mutations.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-selectNode.html.ini b/tests/wpt/metadata/dom/ranges/Range-selectNode.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-selectNode.html.ini rename to tests/wpt/metadata/dom/ranges/Range-selectNode.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-set.html.ini b/tests/wpt/metadata/dom/ranges/Range-set.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-set.html.ini rename to tests/wpt/metadata/dom/ranges/Range-set.html.ini diff --git a/src/test/wpt/metadata/dom/ranges/Range-surroundContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-surroundContents.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/ranges/Range-surroundContents.html.ini rename to tests/wpt/metadata/dom/ranges/Range-surroundContents.html.ini diff --git a/src/test/wpt/metadata/dom/traversal/NodeFilter-constants.html.ini b/tests/wpt/metadata/dom/traversal/NodeFilter-constants.html.ini similarity index 100% rename from src/test/wpt/metadata/dom/traversal/NodeFilter-constants.html.ini rename to tests/wpt/metadata/dom/traversal/NodeFilter-constants.html.ini diff --git a/src/test/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image.html.ini rename to tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image.html.ini diff --git a/src/test/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-video.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-video.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-video.html.ini rename to tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-video.html.ini diff --git a/src/test/wpt/metadata/html/browsers/browsing-the-web/read-text/load-text-plain.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/read-text/load-text-plain.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/browsing-the-web/read-text/load-text-plain.html.ini rename to tests/wpt/metadata/html/browsers/browsing-the-web/read-text/load-text-plain.html.ini diff --git a/src/test/wpt/metadata/html/browsers/history/the-location-interface/location-stringifier.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-stringifier.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/history/the-location-interface/location-stringifier.html.ini rename to tests/wpt/metadata/html/browsers/history/the-location-interface/location-stringifier.html.ini diff --git a/src/test/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.sub.htm.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.sub.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.sub.htm.ini rename to tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.sub.htm.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-02.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-02.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-02.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/security-window/window-security.sub.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/security-window/window-security.sub.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.sub.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-indexed-properties-strict.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-indexed-properties-strict.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/window-indexed-properties-strict.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/window-indexed-properties-strict.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-indexed-properties.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-indexed-properties.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/window-indexed-properties.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/window-indexed-properties.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-named-properties.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-named-properties.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/window-named-properties.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/window-named-properties.html.ini diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini similarity index 99% rename from src/test/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini index 2afe1779b49..0cf7fcc6d58 100644 --- a/src/test/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini @@ -383,4 +383,3 @@ [Window replaceable attribute: length] expected: FAIL - diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-prototype-chain.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-prototype-chain.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/the-window-object/window-prototype-chain.html.ini rename to tests/wpt/metadata/html/browsers/the-window-object/window-prototype-chain.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-first-created.xhtml.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-first-created.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-first-created.xhtml.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-first-created.xhtml.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-default-name.html.ini b/tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-default-name.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-default-name.html.ini rename to tests/wpt/metadata/html/browsers/windows/browsing-context-names/browsing-context-default-name.html.ini diff --git a/src/test/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini b/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini rename to tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.forms.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.forms.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.forms.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.forms.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.images.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.images.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.images.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.images.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.title-07.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.title-07.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/document.title-07.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/document.title-07.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-01.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-01.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-01.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-02.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-02.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-02.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-03.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-03.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-03.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-03.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-04.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-04.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-04.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-04.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-05.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-05.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-05.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-05.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-06.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-06.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-06.html.ini rename to tests/wpt/metadata/html/dom/documents/dom-tree-accessors/nameditem-06.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-compatmode-06.xhtml.ini b/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-compatmode-06.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-compatmode-06.xhtml.ini rename to tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-compatmode-06.xhtml.ini diff --git a/src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-cookie.html.ini b/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-cookie.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-cookie.html.ini rename to tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-cookie.html.ini diff --git a/src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini b/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini rename to tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/document-dir.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/document-dir.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/document-dir.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/document-dir.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/id-attribute.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/id-attribute.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/id-attribute.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/id-attribute.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/id-name-specialcase.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/id-name-specialcase.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/id-name-specialcase.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/id-name-specialcase.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-001.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-001.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-001.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-001.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-002.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-002.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-002.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-002.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-003.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-003.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-003.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-003.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-004.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-004.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-004.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-004.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-005.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-005.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-005.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-005.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-006.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-006.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-006.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-006.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-007.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-007.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-007.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-007.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-008.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-008.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-008.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-008.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-009.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-009.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-009.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-009.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-010.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-010.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-010.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-lang-attribute-010.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-007.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-007.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-007.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-007.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-008.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-008.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-008.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-008.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-009.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-009.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-009.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-009.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-010.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-010.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-010.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-010.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-011.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-011.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-011.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-011.html.ini diff --git a/src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-012.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-012.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-012.html.ini rename to tests/wpt/metadata/html/dom/elements/global-attributes/the-translate-attribute-012.html.ini diff --git a/src/test/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/interfaces.html.ini rename to tests/wpt/metadata/html/dom/interfaces.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-embedded.html.ini b/tests/wpt/metadata/html/dom/reflection-embedded.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-embedded.html.ini rename to tests/wpt/metadata/html/dom/reflection-embedded.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-forms.html.ini b/tests/wpt/metadata/html/dom/reflection-forms.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-forms.html.ini rename to tests/wpt/metadata/html/dom/reflection-forms.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-grouping.html.ini b/tests/wpt/metadata/html/dom/reflection-grouping.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-grouping.html.ini rename to tests/wpt/metadata/html/dom/reflection-grouping.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-metadata.html.ini b/tests/wpt/metadata/html/dom/reflection-metadata.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-metadata.html.ini rename to tests/wpt/metadata/html/dom/reflection-metadata.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-misc.html.ini b/tests/wpt/metadata/html/dom/reflection-misc.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-misc.html.ini rename to tests/wpt/metadata/html/dom/reflection-misc.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-obsolete.html.ini b/tests/wpt/metadata/html/dom/reflection-obsolete.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-obsolete.html.ini rename to tests/wpt/metadata/html/dom/reflection-obsolete.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-sections.html.ini b/tests/wpt/metadata/html/dom/reflection-sections.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-sections.html.ini rename to tests/wpt/metadata/html/dom/reflection-sections.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-tabular.html.ini b/tests/wpt/metadata/html/dom/reflection-tabular.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-tabular.html.ini rename to tests/wpt/metadata/html/dom/reflection-tabular.html.ini diff --git a/src/test/wpt/metadata/html/dom/reflection-text.html.ini b/tests/wpt/metadata/html/dom/reflection-text.html.ini similarity index 100% rename from src/test/wpt/metadata/html/dom/reflection-text.html.ini rename to tests/wpt/metadata/html/dom/reflection-text.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html.ini b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html.ini rename to tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini rename to tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html.ini b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html.ini rename to tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/radionodelist.html.ini b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/radionodelist.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/radionodelist.html.ini rename to tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/radionodelist.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini b/tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini rename to tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml.ini b/tests/wpt/metadata/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml.ini rename to tests/wpt/metadata/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml.ini diff --git a/src/test/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini rename to tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini diff --git a/src/test/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini rename to tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-02.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-02.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-02.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-03.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-03.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-03.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-03.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-04.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-04.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-04.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-04.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html.ini diff --git a/src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html.ini similarity index 100% rename from src/test/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html.ini rename to tests/wpt/metadata/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html.ini diff --git a/src/test/wpt/metadata/html/semantics/disabled-elements/disabledElement.html.ini b/tests/wpt/metadata/html/semantics/disabled-elements/disabledElement.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/disabled-elements/disabledElement.html.ini rename to tests/wpt/metadata/html/semantics/disabled-elements/disabledElement.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/styling/LinkStyle.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/styling/LinkStyle.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/styling/LinkStyle.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/styling/LinkStyle.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_empty.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_empty.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_empty.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_empty.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_unspecified.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_unspecified.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_unspecified.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_href_unspecified.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_multiple.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_multiple.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-base-element/base_multiple.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-base-element/base_multiple.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-link-element/link-rellist.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-link-element/link-rellist.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-link-element/link-rellist.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-link-element/link-rellist.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-link-element/link-style-error-01.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-link-element/link-style-error-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-link-element/link-style-error-01.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-link-element/link-style-error-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-meta-element/the-lang-attribute-012.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-meta-element/the-lang-attribute-012.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-meta-element/the-lang-attribute-012.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-meta-element/the-lang-attribute-012.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style-error-01.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style-error-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style-error-01.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style-error-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_disabled.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_disabled.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_disabled.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_disabled.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_events.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_events.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_events.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_events.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_media.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_media.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_media.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_media.html.ini diff --git a/src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_scoped.html.ini b/tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_scoped.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/document-metadata/the-style-element/style_scoped.html.ini rename to tests/wpt/metadata/html/semantics/document-metadata/the-style-element/style_scoped.html.ini diff --git a/src/test/wpt/metadata/html/semantics/edits/the-del-element/del_effect.html.ini b/tests/wpt/metadata/html/semantics/edits/the-del-element/del_effect.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/edits/the-del-element/del_effect.html.ini rename to tests/wpt/metadata/html/semantics/edits/the-del-element/del_effect.html.ini diff --git a/src/test/wpt/metadata/html/semantics/edits/the-ins-element/ins_effect.html.ini b/tests/wpt/metadata/html/semantics/edits/the-ins-element/ins_effect.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/edits/the-ins-element/ins_effect.html.ini rename to tests/wpt/metadata/html/semantics/edits/the-ins-element/ins_effect.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-area-element/area-stringifier.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-area-element/area-stringifier.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-area-element/area-stringifier.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-area-element/area-stringifier.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.colour.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.colour.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.colour.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.colour.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.clip.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.clip.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.clip.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.clip.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.different.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.different.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.different.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.different.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.gradient.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.gradient.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.gradient.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.gradient.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.path.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.path.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.path.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.path.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.pattern.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.pattern.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.pattern.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.pattern.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.same.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.same.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.same.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.same.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.transform.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.transform.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.transform.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/initial.reset.transform.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.dataURI.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.dataURI.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.dataURI.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.dataURI.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.1.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.1.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.1.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.2.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.3.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.3.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.arguments.3.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.bogustype.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.bogustype.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.bogustype.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.bogustype.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.default.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.default.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.default.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.default.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.alpha.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.alpha.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.alpha.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.alpha.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.primarycolours.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.primarycolours.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.primarycolours.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.primarycolours.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.basic.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.basic.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.basic.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.basic.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.notnumber.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.notnumber.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.notnumber.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.notnumber.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.outsiderange.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.outsiderange.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.outsiderange.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.jpeg.quality.outsiderange.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.ascii.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.ascii.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.ascii.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.ascii.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.unicode.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.unicode.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.unicode.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.lowercase.unicode.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.nocontext.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.nocontext.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.nocontext.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.nocontext.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.complexcolours.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.complexcolours.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.complexcolours.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.complexcolours.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.primarycolours.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.primarycolours.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.primarycolours.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.png.primarycolours.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.unrecognised.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.unrecognised.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.unrecognised.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.unrecognised.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zeroheight.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zeroheight.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zeroheight.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zeroheight.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerosize.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerosize.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerosize.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerosize.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerowidth.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerowidth.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerowidth.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/toDataURL.zerowidth.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-embed-element/embed-dimension.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-embed-element/embed-dimension.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-embed-element/embed-dimension.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-embed-element/embed-dimension.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-img-element/img.complete.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/img.complete.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-img-element/img.complete.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-img-element/img.complete.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-attributes.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-attributes.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-attributes.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-attributes.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-events.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-events.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-events.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-events.html.ini diff --git a/src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-handler.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-handler.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/embedded-content/the-object-element/object-handler.html.ini rename to tests/wpt/metadata/html/semantics/embedded-content/the-object-element/object-handler.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html.ini b/tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html.ini rename to tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html.ini b/tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html.ini rename to tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formaction.html.ini b/tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formaction.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formaction.html.ini rename to tests/wpt/metadata/html/semantics/forms/attributes-common-to-form-controls/formaction.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-checkValidity.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-checkValidity.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-checkValidity.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-checkValidity.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-reportValidity.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-reportValidity.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-reportValidity.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-reportValidity.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validate.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validate.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validate.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validate.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-badInput.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-badInput.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-badInput.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-badInput.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-customError.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-customError.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-customError.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-customError.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooLong.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooLong.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooLong.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooLong.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooShort.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooShort.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooShort.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-tooShort.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-typeMismatch.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-typeMismatch.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-typeMismatch.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-typeMismatch.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valid.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valid.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valid.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valid.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valueMissing.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valueMissing.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valueMissing.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-valueMissing.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-willValidate.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-willValidate.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/form-validation-willValidate.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/form-validation-willValidate.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/constraints/inputwillvalidate.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/inputwillvalidate.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/constraints/inputwillvalidate.html.ini rename to tests/wpt/metadata/html/semantics/forms/constraints/inputwillvalidate.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini b/tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini rename to tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application-textarea.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application-textarea.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application-textarea.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application-textarea.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-not-application.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/selection.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/selection.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html.ini rename to tests/wpt/metadata/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-button-element/button-events.html.ini b/tests/wpt/metadata/html/semantics/forms/the-button-element/button-events.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-button-element/button-events.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-button-element/button-events.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-button-element/button-validation.html.ini b/tests/wpt/metadata/html/semantics/forms/the-button-element/button-validation.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-button-element/button-validation.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-button-element/button-validation.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-datalist-element/datalistoptions.html.ini b/tests/wpt/metadata/html/semantics/forms/the-datalist-element/datalistoptions.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-datalist-element/datalistoptions.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-datalist-element/datalistoptions.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.html.ini b/tests/wpt/metadata/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-fieldset-element/disabled.html.ini b/tests/wpt/metadata/html/semantics/forms/the-fieldset-element/disabled.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-fieldset-element/disabled.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-fieldset-element/disabled.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-interfaces-01.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-interfaces-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-interfaces-01.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-interfaces-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-matches.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-matches.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-matches.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-matches.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-01.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-01.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-02.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-02.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-elements-nameditem-02.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-form-element/form-nameditem.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-nameditem.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-form-element/form-nameditem.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-form-element/form-nameditem.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/button.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/button.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/button.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/button.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/checked.xhtml.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/checked.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/checked.xhtml.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/checked.xhtml.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/color.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/color.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/color.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/color.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/date.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/date.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/date.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/date.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime-2.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/datetime-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime-2.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/datetime-2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime-local.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/datetime-local.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime-local.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/datetime-local.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/datetime.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/datetime.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/datetime.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/email.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/email.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/email.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/email.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/hidden.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/hidden.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/hidden.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/hidden.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/input-textselection-01.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/input-textselection-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/input-textselection-01.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/input-textselection-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/input-type-button.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-button.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/input-type-button.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-button.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/input-type-checkbox.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-checkbox.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/input-type-checkbox.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-checkbox.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/month.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/month.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/month.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/month.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/number.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/number.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/number.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/number.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/password.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/password.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/password.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/password.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/radio-groupname-case.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio-groupname-case.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/radio-groupname-case.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/radio-groupname-case.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/range-2.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/range-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/range-2.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/range-2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/range.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/range.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/range.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/range.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/reset.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/reset.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/reset.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/reset.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/search_input.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/search_input.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/search_input.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/search_input.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/telephone.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/telephone.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/telephone.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/telephone.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/text.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/text.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/text.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/text.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/time-2.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/time-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/time-2.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/time-2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/time.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/time.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/time.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/time.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/type-change-state.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/type-change-state.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/type-change-state.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/type-change-state.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/url.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/url.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/url.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/url.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/valueMode.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/valueMode.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/valueMode.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/valueMode.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-input-element/week.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/week.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-input-element/week.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-input-element/week.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-label-element/label-attributes.html.ini b/tests/wpt/metadata/html/semantics/forms/the-label-element/label-attributes.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-label-element/label-attributes.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-label-element/label-attributes.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-label-element/labelable-elements.html.ini b/tests/wpt/metadata/html/semantics/forms/the-label-element/labelable-elements.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-label-element/labelable-elements.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-label-element/labelable-elements.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-meter-element/meter.html.ini b/tests/wpt/metadata/html/semantics/forms/the-meter-element/meter.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-meter-element/meter.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-meter-element/meter.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-backslash.html.ini b/tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-backslash.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-backslash.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-backslash.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-recurse.html.ini b/tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-recurse.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-recurse.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-recurse.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-spaces.html.ini b/tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-spaces.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-option-element/option-text-spaces.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-option-element/option-text-spaces.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-output-element/output.html.ini b/tests/wpt/metadata/html/semantics/forms/the-output-element/output.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-output-element/output.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-output-element/output.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-progress-element/progress-2.html.ini b/tests/wpt/metadata/html/semantics/forms/the-progress-element/progress-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-progress-element/progress-2.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-progress-element/progress-2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-progress-element/progress.html.ini b/tests/wpt/metadata/html/semantics/forms/the-progress-element/progress.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-progress-element/progress.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-progress-element/progress.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-select-element/select-named-getter.html.ini b/tests/wpt/metadata/html/semantics/forms/the-select-element/select-named-getter.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-select-element/select-named-getter.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-select-element/select-named-getter.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-select-element/select-remove.html.ini b/tests/wpt/metadata/html/semantics/forms/the-select-element/select-remove.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-select-element/select-remove.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-select-element/select-remove.html.ini diff --git a/src/test/wpt/metadata/html/semantics/forms/the-textarea-element/textarea-type.html.ini b/tests/wpt/metadata/html/semantics/forms/the-textarea-element/textarea-type.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/forms/the-textarea-element/textarea-type.html.ini rename to tests/wpt/metadata/html/semantics/forms/the-textarea-element/textarea-type.html.ini diff --git a/src/test/wpt/metadata/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html.ini rename to tests/wpt/metadata/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html.ini diff --git a/src/test/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini rename to tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini diff --git a/src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/grouping-ol.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/grouping-ol.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/grouping-ol.html.ini rename to tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/grouping-ol.html.ini diff --git a/src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-1.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-1.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-1.html.ini rename to tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-1.html.ini diff --git a/src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2.html.ini rename to tests/wpt/metadata/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2.html.ini diff --git a/src/test/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini rename to tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini diff --git a/src/test/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-close.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-close.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-close.html.ini rename to tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-close.html.ini diff --git a/src/test/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html.ini rename to tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html.ini diff --git a/src/test/wpt/metadata/html/semantics/interfaces.html.ini b/tests/wpt/metadata/html/semantics/interfaces.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/interfaces.html.ini rename to tests/wpt/metadata/html/semantics/interfaces.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_001.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_001.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_001.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_001.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_002.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_002.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_002.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_002.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_003.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_003.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_003.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_003.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_004.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_004.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_004.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_004.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_005.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_005.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_005.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_005.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_006.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_006.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_006.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_006.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_007.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_007.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_007.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_007.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_008.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_008.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_008.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_008.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_009.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_009.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_009.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_009.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_010.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_010.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_010.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_010.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_011.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_011.htm.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/async_011.htm.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/async_011.htm.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-before-after-events.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-before-after-events.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-before-after-events.html.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-before-after-events.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.html.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.xhtml.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.xhtml.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-event.xhtml.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-onload.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-onload.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-onload.html.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-for-onload.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onload-string.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onload-string.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onload-string.html.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onload-string.html.ini diff --git a/src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-text.xhtml.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-text.xhtml.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/scripting-1/the-script-element/script-text.xhtml.ini rename to tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-text.xhtml.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/checked.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/checked.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/checked.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/checked.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/default.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/default.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/default.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/default.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/dir.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/dir.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/dir01.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/dir01.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/enabled.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/enabled.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/enabled.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/enabled.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/focus.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/focus.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/focus.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/focus.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/indeterminate.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/indeterminate.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/indeterminate.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/indeterminate.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/readwrite-readonly.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/readwrite-readonly.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/readwrite-readonly.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/readwrite-readonly.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/required-optional.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/required-optional.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/required-optional.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/required-optional.html.ini diff --git a/src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/valid-invalid.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/valid-invalid.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/selectors/pseudo-classes/valid-invalid.html.ini rename to tests/wpt/metadata/html/semantics/selectors/pseudo-classes/valid-invalid.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-caption-element/caption_001.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-caption-element/caption_001.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-caption-element/caption_001.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-caption-element/caption_001.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/caption-methods.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/caption-methods.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/caption-methods.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/caption-methods.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/createTBody.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/createTBody.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/createTBody.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/createTBody.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-01.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-01.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-01.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-01.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-02.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-02.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-02.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/insertRow-method-02.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/tBodies.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/tBodies.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/tBodies.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/tBodies.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/table-insertRow.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/table-insertRow.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/table-insertRow.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/table-insertRow.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/table-rows.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-table-element/table-rows.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-table-element/table-rows.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-table-element/table-rows.html.ini diff --git a/src/test/wpt/metadata/html/semantics/tabular-data/the-tr-element/rowIndex.html.ini b/tests/wpt/metadata/html/semantics/tabular-data/the-tr-element/rowIndex.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/tabular-data/the-tr-element/rowIndex.html.ini rename to tests/wpt/metadata/html/semantics/tabular-data/the-tr-element/rowIndex.html.ini diff --git a/src/test/wpt/metadata/html/semantics/text-level-semantics/the-a-element/a-stringifier.html.ini b/tests/wpt/metadata/html/semantics/text-level-semantics/the-a-element/a-stringifier.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/text-level-semantics/the-a-element/a-stringifier.html.ini rename to tests/wpt/metadata/html/semantics/text-level-semantics/the-a-element/a-stringifier.html.ini diff --git a/src/test/wpt/metadata/html/semantics/text-level-semantics/the-time-element/001.html.ini b/tests/wpt/metadata/html/semantics/text-level-semantics/the-time-element/001.html.ini similarity index 100% rename from src/test/wpt/metadata/html/semantics/text-level-semantics/the-time-element/001.html.ini rename to tests/wpt/metadata/html/semantics/text-level-semantics/the-time-element/001.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/events/event-handler-spec-example.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-spec-example.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/events/event-handler-spec-example.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/events/event-handler-spec-example.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-compile-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-cross-origin.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-data-url.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-data-url.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-data-url.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-data-url.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-attribute.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-attribute.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-attribute.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-attribute.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-same-origin.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-same-origin.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-same-origin.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error-same-origin.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/compile-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-data-url.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-data-url.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-data-url.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-data-url.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-attribute.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-attribute.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-attribute.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-attribute.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-body-onerror.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-body-onerror.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-body-onerror.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-body-onerror.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-window-onerror.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-window-onerror.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-window-onerror.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-in-window-onerror.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-same-origin.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-same-origin.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-same-origin.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error-same-origin.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/runtime-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-parse-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-parse-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-parse-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-parse-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error.html.ini rename to tests/wpt/metadata/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error.html.ini diff --git a/src/test/wpt/metadata/html/webappapis/timers/evil-spec-example.html.ini b/tests/wpt/metadata/html/webappapis/timers/evil-spec-example.html.ini similarity index 100% rename from src/test/wpt/metadata/html/webappapis/timers/evil-spec-example.html.ini rename to tests/wpt/metadata/html/webappapis/timers/evil-spec-example.html.ini diff --git a/src/test/wpt/metadata/workers/MessagePort_initial_disabled.htm.ini b/tests/wpt/metadata/workers/MessagePort_initial_disabled.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/MessagePort_initial_disabled.htm.ini rename to tests/wpt/metadata/workers/MessagePort_initial_disabled.htm.ini diff --git a/src/test/wpt/metadata/workers/MessagePort_onmessage_start.htm.ini b/tests/wpt/metadata/workers/MessagePort_onmessage_start.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/MessagePort_onmessage_start.htm.ini rename to tests/wpt/metadata/workers/MessagePort_onmessage_start.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_colno.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_colno.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_colno.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_colno.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_filename.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_filename.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_filename.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_filename.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_lineno.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_lineno.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_lineno.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_lineno.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_message.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_message.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_message.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_ErrorEvent_message.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_close.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_close.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_close.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_close.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_importScripts_NetworkErr.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_importScripts_NetworkErr.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_importScripts_NetworkErr.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_importScripts_NetworkErr.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_setInterval.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_setInterval.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_setInterval.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_setInterval.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerGlobalScope_setTimeout.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_setTimeout.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerGlobalScope_setTimeout.htm.ini rename to tests/wpt/metadata/workers/WorkerGlobalScope_setTimeout.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerLocation.htm.ini b/tests/wpt/metadata/workers/WorkerLocation.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerLocation.htm.ini rename to tests/wpt/metadata/workers/WorkerLocation.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerLocation_pathname.htm.ini b/tests/wpt/metadata/workers/WorkerLocation_pathname.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerLocation_pathname.htm.ini rename to tests/wpt/metadata/workers/WorkerLocation_pathname.htm.ini diff --git a/src/test/wpt/metadata/workers/WorkerLocation_port.htm.ini b/tests/wpt/metadata/workers/WorkerLocation_port.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/WorkerLocation_port.htm.ini rename to tests/wpt/metadata/workers/WorkerLocation_port.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_ErrorEvent_filename.htm.ini b/tests/wpt/metadata/workers/Worker_ErrorEvent_filename.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_ErrorEvent_filename.htm.ini rename to tests/wpt/metadata/workers/Worker_ErrorEvent_filename.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_ErrorEvent_lineno.htm.ini b/tests/wpt/metadata/workers/Worker_ErrorEvent_lineno.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_ErrorEvent_lineno.htm.ini rename to tests/wpt/metadata/workers/Worker_ErrorEvent_lineno.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_ErrorEvent_message.htm.ini b/tests/wpt/metadata/workers/Worker_ErrorEvent_message.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_ErrorEvent_message.htm.ini rename to tests/wpt/metadata/workers/Worker_ErrorEvent_message.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_ErrorEvent_type.htm.ini b/tests/wpt/metadata/workers/Worker_ErrorEvent_type.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_ErrorEvent_type.htm.ini rename to tests/wpt/metadata/workers/Worker_ErrorEvent_type.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_cross_origin_security_err.htm.ini b/tests/wpt/metadata/workers/Worker_cross_origin_security_err.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_cross_origin_security_err.htm.ini rename to tests/wpt/metadata/workers/Worker_cross_origin_security_err.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_dispatchEvent_ErrorEvent.htm.ini b/tests/wpt/metadata/workers/Worker_dispatchEvent_ErrorEvent.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_dispatchEvent_ErrorEvent.htm.ini rename to tests/wpt/metadata/workers/Worker_dispatchEvent_ErrorEvent.htm.ini diff --git a/src/test/wpt/metadata/workers/Worker_terminate_event_queue.htm.ini b/tests/wpt/metadata/workers/Worker_terminate_event_queue.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/Worker_terminate_event_queue.htm.ini rename to tests/wpt/metadata/workers/Worker_terminate_event_queue.htm.ini diff --git a/src/test/wpt/metadata/workers/constructors/Worker/AbstractWorker.onerror.html.ini b/tests/wpt/metadata/workers/constructors/Worker/AbstractWorker.onerror.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/constructors/Worker/AbstractWorker.onerror.html.ini rename to tests/wpt/metadata/workers/constructors/Worker/AbstractWorker.onerror.html.ini diff --git a/src/test/wpt/metadata/workers/constructors/Worker/DedicatedWorkerGlobalScope-members.html.ini b/tests/wpt/metadata/workers/constructors/Worker/DedicatedWorkerGlobalScope-members.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/constructors/Worker/DedicatedWorkerGlobalScope-members.html.ini rename to tests/wpt/metadata/workers/constructors/Worker/DedicatedWorkerGlobalScope-members.html.ini diff --git a/src/test/wpt/metadata/workers/constructors/Worker/same-origin.html.ini b/tests/wpt/metadata/workers/constructors/Worker/same-origin.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/constructors/Worker/same-origin.html.ini rename to tests/wpt/metadata/workers/constructors/Worker/same-origin.html.ini diff --git a/src/test/wpt/metadata/workers/constructors/Worker/terminate.html.ini b/tests/wpt/metadata/workers/constructors/Worker/terminate.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/constructors/Worker/terminate.html.ini rename to tests/wpt/metadata/workers/constructors/Worker/terminate.html.ini diff --git a/src/test/wpt/metadata/workers/constructors/Worker/unexpected-self-properties.html.ini b/tests/wpt/metadata/workers/constructors/Worker/unexpected-self-properties.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/constructors/Worker/unexpected-self-properties.html.ini rename to tests/wpt/metadata/workers/constructors/Worker/unexpected-self-properties.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.html.ini b/tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.html.ini rename to tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html.ini b/tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html.ini rename to tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html.ini b/tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html.ini rename to tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.ini b/tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.ini rename to tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html.ini b/tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html.ini rename to tests/wpt/metadata/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/getting.html.ini b/tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/getting.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/getting.html.ini rename to tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/getting.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/setting.html.ini b/tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/setting.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/setting.html.ini rename to tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/name/setting.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/onconnect.html.ini b/tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/onconnect.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/onconnect.html.ini rename to tests/wpt/metadata/workers/interfaces/SharedWorkerGlobalScope/onconnect.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/incoming-message.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/incoming-message.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/incoming-message.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/incoming-message.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/sending-messages.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/sending-messages.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/sending-messages.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/sending-messages.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setInterval.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setInterval.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setInterval.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setInterval.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setTimeout.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setTimeout.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setTimeout.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/close/setTimeout.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/redirect.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/redirect.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/redirect.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/redirect.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/handled.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/handled.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/handled.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/handled.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/001.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/001.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/001.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/001.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/003.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/003.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/003.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/WindowTimers/003.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/004.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/004.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/004.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/004.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/005.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/005.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/005.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/005.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/006.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/006.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/006.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/importScripts/006.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/navigator/001.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/navigator/001.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/navigator/001.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/navigator/001.html.ini diff --git a/src/test/wpt/metadata/workers/interfaces/WorkerUtils/navigator/007.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerUtils/navigator/007.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/interfaces/WorkerUtils/navigator/007.html.ini rename to tests/wpt/metadata/workers/interfaces/WorkerUtils/navigator/007.html.ini diff --git a/src/test/wpt/metadata/workers/postMessage_DataCloneErr.htm.ini b/tests/wpt/metadata/workers/postMessage_DataCloneErr.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_DataCloneErr.htm.ini rename to tests/wpt/metadata/workers/postMessage_DataCloneErr.htm.ini diff --git a/src/test/wpt/metadata/workers/postMessage_clone_port.htm.ini b/tests/wpt/metadata/workers/postMessage_clone_port.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_clone_port.htm.ini rename to tests/wpt/metadata/workers/postMessage_clone_port.htm.ini diff --git a/src/test/wpt/metadata/workers/postMessage_clone_port_error.htm.ini b/tests/wpt/metadata/workers/postMessage_clone_port_error.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_clone_port_error.htm.ini rename to tests/wpt/metadata/workers/postMessage_clone_port_error.htm.ini diff --git a/src/test/wpt/metadata/workers/postMessage_event_properties.htm.ini b/tests/wpt/metadata/workers/postMessage_event_properties.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_event_properties.htm.ini rename to tests/wpt/metadata/workers/postMessage_event_properties.htm.ini diff --git a/src/test/wpt/metadata/workers/postMessage_ports_readonly_array.htm.ini b/tests/wpt/metadata/workers/postMessage_ports_readonly_array.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_ports_readonly_array.htm.ini rename to tests/wpt/metadata/workers/postMessage_ports_readonly_array.htm.ini diff --git a/src/test/wpt/metadata/workers/postMessage_target_source.htm.ini b/tests/wpt/metadata/workers/postMessage_target_source.htm.ini similarity index 100% rename from src/test/wpt/metadata/workers/postMessage_target_source.htm.ini rename to tests/wpt/metadata/workers/postMessage_target_source.htm.ini diff --git a/src/test/wpt/metadata/workers/semantics/encodings/002.html.ini b/tests/wpt/metadata/workers/semantics/encodings/002.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/encodings/002.html.ini rename to tests/wpt/metadata/workers/semantics/encodings/002.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/encodings/004.html.ini b/tests/wpt/metadata/workers/semantics/encodings/004.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/encodings/004.html.ini rename to tests/wpt/metadata/workers/semantics/encodings/004.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/interface-objects/001.html.ini b/tests/wpt/metadata/workers/semantics/interface-objects/001.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/interface-objects/001.html.ini rename to tests/wpt/metadata/workers/semantics/interface-objects/001.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/interface-objects/002.html.ini b/tests/wpt/metadata/workers/semantics/interface-objects/002.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/interface-objects/002.html.ini rename to tests/wpt/metadata/workers/semantics/interface-objects/002.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/interface-objects/003.html.ini b/tests/wpt/metadata/workers/semantics/interface-objects/003.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/interface-objects/003.html.ini rename to tests/wpt/metadata/workers/semantics/interface-objects/003.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/interface-objects/004.html.ini b/tests/wpt/metadata/workers/semantics/interface-objects/004.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/interface-objects/004.html.ini rename to tests/wpt/metadata/workers/semantics/interface-objects/004.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/001.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/001.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/001.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/001.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/004.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/004.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/004.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/004.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/005.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/006.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/006.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/006.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/006.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/007.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/007.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/007.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/007.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/multiple-workers/008.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/008.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/multiple-workers/008.html.ini rename to tests/wpt/metadata/workers/semantics/multiple-workers/008.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/run-a-worker/002.html.ini b/tests/wpt/metadata/workers/semantics/run-a-worker/002.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/run-a-worker/002.html.ini rename to tests/wpt/metadata/workers/semantics/run-a-worker/002.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/run-a-worker/003.html.ini b/tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/run-a-worker/003.html.ini rename to tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/001.html.ini b/tests/wpt/metadata/workers/semantics/xhr/001.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/001.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/001.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/002.html.ini b/tests/wpt/metadata/workers/semantics/xhr/002.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/002.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/002.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/003.html.ini b/tests/wpt/metadata/workers/semantics/xhr/003.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/003.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/003.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/004.html.ini b/tests/wpt/metadata/workers/semantics/xhr/004.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/004.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/004.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/005.html.ini b/tests/wpt/metadata/workers/semantics/xhr/005.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/005.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/005.html.ini diff --git a/src/test/wpt/metadata/workers/semantics/xhr/006.html.ini b/tests/wpt/metadata/workers/semantics/xhr/006.html.ini similarity index 100% rename from src/test/wpt/metadata/workers/semantics/xhr/006.html.ini rename to tests/wpt/metadata/workers/semantics/xhr/006.html.ini diff --git a/src/test/wpt/run.py b/tests/wpt/run.py similarity index 96% rename from src/test/wpt/run.py rename to tests/wpt/run.py index f624ae5b091..5696ce55998 100644 --- a/src/test/wpt/run.py +++ b/tests/wpt/run.py @@ -5,7 +5,7 @@ import sys, os, argparse here = os.path.split(__file__)[0] -servo_root = os.path.abspath(os.path.join(here, "..", "..", "..")) +servo_root = os.path.abspath(os.path.join(here, "..", "..")) def wptsubdir(*args): return os.path.join(here, *args) diff --git a/src/test/wpt/run.sh b/tests/wpt/run.sh similarity index 52% rename from src/test/wpt/run.sh rename to tests/wpt/run.sh index c1b4350000e..6d29d443636 100755 --- a/src/test/wpt/run.sh +++ b/tests/wpt/run.sh @@ -4,22 +4,21 @@ set -e -servo_root="$1" -objdir="$2" -shift 2 +servo_root=$(pwd) -cd $objdir/.. -test -d _virtualenv || virtualenv _virtualenv -p $(which $PYTHON) -test -d $servo_root/src/test/wpt/metadata || mkdir -p $servo_root/src/test/wpt/metadata -test -d $servo_root/src/test/wpt/prefs || mkdir -p $servo_root/src/test/wpt/prefs +PYTHON=$(which python2.7 2> /dev/null || echo python) + +test -d _virtualenv || virtualenv _virtualenv -p $PYTHON +test -d $servo_root/tests/wpt/metadata || mkdir -p $servo_root/tests/wpt/metadata +test -d $servo_root/tests/wpt/prefs || mkdir -p $servo_root/tests/wpt/prefs source _virtualenv/bin/activate if [[ $* == *--update-manifest* ]]; then (python -c "import html5lib" &>/dev/null) || pip install html5lib fi (python -c "import wptrunner" &>/dev/null) || pip install 'wptrunner==1.0' -python $servo_root/src/test/wpt/run.py \ - --config $servo_root/src/test/wpt/config.ini \ - --binary $objdir/../servo \ +python $servo_root/tests/wpt/run.py \ + --config $servo_root/tests/wpt/config.ini \ + --binary target/servo \ --log-mach - \ "$@" diff --git a/src/test/wpt/web-platform-tests b/tests/wpt/web-platform-tests similarity index 100% rename from src/test/wpt/web-platform-tests rename to tests/wpt/web-platform-tests diff --git a/travis.linux.before_script.sh b/travis.linux.before_script.sh deleted file mode 100755 index ae878510ba6..00000000000 --- a/travis.linux.before_script.sh +++ /dev/null @@ -1,4 +0,0 @@ -/usr/bin/Xorg :1 -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./src/test/ci/xorg.conf & - -# Patch the broken font config files on ubuntu 12.04 lts - this should be removed when travis moves to ubuntu 14.04 lts -sudo cp src/test/ci/fontconfig/* /etc/fonts/conf.avail/ diff --git a/travis.linux.install.deps.sh b/travis.linux.install.deps.sh deleted file mode 100755 index 1e2fc827c2b..00000000000 --- a/travis.linux.install.deps.sh +++ /dev/null @@ -1,6 +0,0 @@ -sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y -sudo apt-get update -q -sudo apt-get install -qq --force-yes -y xserver-xorg-input-void xserver-xorg-video-dummy xpra -sudo apt-get install -qq --force-yes -y autoconf2.13 gperf libxxf86vm-dev libglfw-dev libstdc++6-4.7-dev -echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections -sudo apt-get install ttf-mscorefonts-installer > /dev/null diff --git a/travis.linux.script.sh b/travis.linux.script.sh deleted file mode 100755 index f4c2fb21c28..00000000000 --- a/travis.linux.script.sh +++ /dev/null @@ -1,27 +0,0 @@ -set -e -export DISPLAY=:1.0 -export RUST_TEST_TASKS=1 -case $1 in -content) - make check-content -;; -ref) - make check-ref-cpu -;; -unit-doc) - make check-servo - - mv x86_64-unknown-linux-gnu/rust_snapshot/rust-*/doc . - cp ../src/etc/doc.servo.org/* doc - make doc - - if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] - then - echo '' > doc/index.html - sudo pip install ghp-import - ghp-import -n doc - git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages - fi -;; -*) echo "Task $1 not enabled for Linux" -esac diff --git a/travis.osx.before_script.sh b/travis.osx.before_script.sh deleted file mode 100755 index 25bc2d90965..00000000000 --- a/travis.osx.before_script.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Placeholder for OS X - diff --git a/travis.osx.install.deps.sh b/travis.osx.install.deps.sh deleted file mode 100755 index 538db74d8fc..00000000000 --- a/travis.osx.install.deps.sh +++ /dev/null @@ -1,4 +0,0 @@ -brew install https://raw.github.com/Homebrew/homebrew-versions/master/autoconf213.rb -brew install automake libtool pkg-config -brew install python -pip install virtualenv diff --git a/travis.osx.script.sh b/travis.osx.script.sh deleted file mode 100755 index ca1a6fb24c1..00000000000 --- a/travis.osx.script.sh +++ /dev/null @@ -1,9 +0,0 @@ -set -e -case $1 in -unit) make check-servo ;; -content) make check-content ;; -ref) make check-ref-cpu ;; -wpt1) WPTARGS="--processes=4 --total-chunks=2 --this-chunk=1" make check-wpt ;; -wpt2) WPTARGS="--processes=4 --total-chunks=2 --this-chunk=2" make check-wpt ;; -*) echo "Task $1 not enabled for OSX" -esac