aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2015-04-17 15:31:02 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-04-17 15:43:17 +0000
commita8628bfffa72994759e4ac8bb45f317c4f33c05d (patch)
tree8f02a328a4e7d238aa126885808208cad39cfb0f /src/test
parent666762c7d1681e16acea75f4eef850b93fe91098 (diff)
Added py_test rule to Bazel
py_test rule enable to use a test written in Python. A py_test is basically a py_binary that returns a non null on failure. Extraneous support is need to have nice output (see //src/test/shell/unittest.bash for the kind of support neeeded). Actually the py_test code was already there but it was just missing the necessary glue code. Also added an integration test for py_* rules in Bazel. -- MOS_MIGRATED_REVID=91407748
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/bazel_example_test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_example_test.sh b/src/test/shell/bazel/bazel_example_test.sh
index 4165846bbc..4b127c21af 100755
--- a/src/test/shell/bazel/bazel_example_test.sh
+++ b/src/test/shell/bazel/bazel_example_test.sh
@@ -97,6 +97,12 @@ function test_genrule_and_genquery() {
}
}
+function test_native_python() {
+ assert_build "//examples/py_native:bin"
+ assert_test_ok "//examples/py_native:test"
+ assert_test_fails "//examples/py_native:fail"
+}
+
#
# Skylark rules
#