aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-04-29 15:22:14 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-04-29 16:06:46 +0530
commit23cc6aa414b922de2ffbe1681d123d622e983ba3 (patch)
treed6c979587af475ece6f22b0d477861071da3865b /src
parentafae6a3c71a722258e204ba51551a2a6143920d5 (diff)
downloadservo-23cc6aa414b922de2ffbe1681d123d622e983ba3.tar.gz
servo-23cc6aa414b922de2ffbe1681d123d622e983ba3.zip
Make manifest updates/html5lib non mandatory
Diffstat (limited to 'src')
-rw-r--r--src/test/wpt/run.py17
-rwxr-xr-xsrc/test/wpt/run.sh4
2 files changed, 14 insertions, 7 deletions
diff --git a/src/test/wpt/run.py b/src/test/wpt/run.py
index 0e73262f9c4..8987b949e25 100644
--- a/src/test/wpt/run.py
+++ b/src/test/wpt/run.py
@@ -16,13 +16,15 @@ sys.path.append(wptsubdir("web-platform-tests", "tools", "scripts"))
from wptrunner import wptrunner, wptcommandline
import manifest
-def ensure_manifest():
- if not os.path.isfile(wptsubdir("metadata", "MANIFEST.json")):
- opts = argparse.Namespace(rebuild=False, experimental_include_local_changes=True,
- path=wptsubdir("metadata", "MANIFEST.json"))
- manifest.update_manifest(wptsubdir("web-platform-tests"), opts)
+def update_manifest():
+ opts = argparse.Namespace(rebuild=False, experimental_include_local_changes=True,
+ path=wptsubdir("metadata", "MANIFEST.json"))
+ manifest.update_manifest(wptsubdir("web-platform-tests"), opts)
+ return True
def run_tests(**kwargs):
+ if not os.path.isfile(wptsubdir("metadata", "MANIFEST.json")):
+ raise Exception("Manifest not found. Please use --update-manifest in WPTARGS to create one")
wptrunner.setup_logging(kwargs, {"raw": sys.stdout})
return wptrunner.run_tests(**kwargs)
@@ -35,9 +37,12 @@ def set_defaults(args):
return vars(args)
def main():
- ensure_manifest()
parser = wptcommandline.create_parser(False)
+ parser.add_argument('--update-manifest', dest='update_manifest', action='store_true')
args = parser.parse_args()
+ if args.update_manifest:
+ update_manifest()
+ return True
kwargs = set_defaults(args)
return run_tests(**kwargs)
diff --git a/src/test/wpt/run.sh b/src/test/wpt/run.sh
index 2174f6d34e7..c17cb7e0092 100755
--- a/src/test/wpt/run.sh
+++ b/src/test/wpt/run.sh
@@ -11,7 +11,9 @@ test -d _virtualenv || virtualenv _virtualenv
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
source _virtualenv/bin/activate
-(python -c "import html5lib" &>/dev/null) || pip install html5lib
+if [[ $* == *--update-manifest* ]]; then
+ (python -c "import html5lib" &>/dev/null) || pip install html5lib
+fi
(python -c "import wptrunner" &>/dev/null) || pip install wptrunner
python $servo_root/src/test/wpt/run.py --binary $objdir/../servo "$@"