Add unittests
diff --git a/tools/ci/decision.py b/tools/ci/decision.py index 18d0df4..8a78593 100644 --- a/tools/ci/decision.py +++ b/tools/ci/decision.py
@@ -109,6 +109,16 @@ cmd_args["options_str"] = "\n".join(" %s" % item for item in options_args) + install_str = ""; + install_packages = task.get("install") + if install_packages: + install_items = ["apt update -qqy"] + install_items.extend("apt install -qqy %s" % item + for item in install_packages) + install_str = "\n".join("sudo %s;" % item for item in install_items) + + cmd_args["install_cmd"] = install_str + return ["/bin/bash", "--login", "-c", @@ -116,6 +126,7 @@ ~/start.sh %(repo_url)s %(fetch_rev)s; +%(install_str)s cd web-platform-tests; ./tools/ci/run_tc.py %(options_str)s
diff --git a/tools/ci/tasks/test.yml b/tools/ci/tasks/test.yml index d497f35..198b2e5 100644 --- a/tools/ci/tasks/test.yml +++ b/tools/ci/tasks/test.yml
@@ -218,3 +218,22 @@ - update_built command: "tools/ci/ci_built_diff.sh" + - tools/unittests (Python 2): + description: >- + Unit tests for tools running under Python 2.7, excluding wptrunner + command: tools/ci/ci_tools_unittest.sh + env: + - TOXENV=py27; + - HYPOTHESIS_PROFILE=ci; + - PY_COLORS=0; + + - tools/unittests (Python 3): + description: >- + Unit tests for tools running under Python 3, excluding wptrunner + command: tools/ci/ci_tools_unittest.sh + env: + - TOXENV=py36; + - HYPOTHESIS_PROFILE=ci; + - PY_COLORS=0; + install: + - python3-pip