Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: mojo/tools/mojob.sh

Issue 225403010: Mojo: Add a "pytest" to mojob.sh that runs Python unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
;;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698