| Index: PRESUBMIT.py
|
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..e0887978786b5ecd85ba6eed93f335cb78d4cc54
|
| --- /dev/null
|
| +++ b/PRESUBMIT.py
|
| @@ -0,0 +1,20 @@
|
| +#!/usr/bin/env python
|
| +
|
| +import os
|
| +import re
|
| +import subprocess
|
| +import sys
|
| +
|
| +def CommonChecks(input_api, output_api):
|
| + def tests(*path):
|
| + return input_api.canned_checks.GetUnitTestsInDirectory(
|
| + input_api,
|
| + output_api,
|
| + input_api.os_path.join(*path),
|
| + whitelist=[r'.+_test\.py'])
|
| + return input_api.RunTests(
|
| + tests('recipe_engine', 'unittests') +
|
| + tests('unittests'))
|
| +
|
| +CheckChangeOnUpload = CommonChecks
|
| +CheckChangeOnCommit = CommonChecks
|
|
|