Index: mojo/tools/mojob.sh |
diff --git a/mojo/tools/mojob.sh b/mojo/tools/mojob.sh |
index 7cf4066a93030761488b603caff543ea3f4ca5df..e4f9697a339f1ea6af9ca68c5892326e18ca551d 100755 |
--- a/mojo/tools/mojob.sh |
+++ b/mojo/tools/mojob.sh |
@@ -18,7 +18,8 @@ Usage: $(basename "$0") [command|option ...] |
command should be one of: |
build - Build. |
test - Run unit tests (does not build). |
- perftest - Run Release and Debug perf tests (does not build). |
+ perftest - Run perf tests (does not build). |
+ pytest - Run Python unit tests. |
gyp - Run gyp for mojo (does not sync), with clang. |
sync - Sync using gclient (does not run gyp). |
show-bash-alias - Outputs an appropriate bash alias for mojob. In bash do: |
@@ -59,6 +60,12 @@ do_perftests() { |
"out/$1/mojo_public_system_perftests" || exit 1 |
} |
+do_pytests() { |
+ echo "Running Python unit tests under mojo/public/tools/bindings/pylib ..." |
+ python -m unittest \ |
+ discover -s mojo/public/tools/bindings/pylib -p "*_unittest.py" |
+} |
+ |
do_gyp() { |
local gyp_defines="$(make_gyp_defines)" |
echo "Running gyp with GYP_DEFINES=$gyp_defines ..." |
@@ -144,6 +151,9 @@ for arg in "$@"; do |
should_do_Debug && do_perftests Debug |
should_do_Release && do_perftests Release |
;; |
+ pytest) |
+ do_pytests |
+ ;; |
gyp) |
do_gyp |
;; |