aboutsummaryrefslogtreecommitdiffhomepage
path: root/kokoro/linux
diff options
context:
space:
mode:
Diffstat (limited to 'kokoro/linux')
-rwxr-xr-xkokoro/linux/bazel/build.sh12
-rw-r--r--kokoro/linux/bazel/continuous.cfg5
-rw-r--r--kokoro/linux/bazel/presubmit.cfg5
-rwxr-xr-xkokoro/linux/benchmark/build.sh15
4 files changed, 32 insertions, 5 deletions
diff --git a/kokoro/linux/bazel/build.sh b/kokoro/linux/bazel/build.sh
new file mode 100755
index 00000000..e0c1ee42
--- /dev/null
+++ b/kokoro/linux/bazel/build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+git submodule update --init --recursive
+bazel test :protobuf_test
+
+cd examples
+bazel build :all
diff --git a/kokoro/linux/bazel/continuous.cfg b/kokoro/linux/bazel/continuous.cfg
new file mode 100644
index 00000000..13cfef15
--- /dev/null
+++ b/kokoro/linux/bazel/continuous.cfg
@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/bazel/build.sh"
+timeout_mins: 15
diff --git a/kokoro/linux/bazel/presubmit.cfg b/kokoro/linux/bazel/presubmit.cfg
new file mode 100644
index 00000000..13cfef15
--- /dev/null
+++ b/kokoro/linux/bazel/presubmit.cfg
@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/bazel/build.sh"
+timeout_mins: 15
diff --git a/kokoro/linux/benchmark/build.sh b/kokoro/linux/benchmark/build.sh
index 750c3e5c..af5b299e 100755
--- a/kokoro/linux/benchmark/build.sh
+++ b/kokoro/linux/benchmark/build.sh
@@ -27,8 +27,8 @@ cd $oldpwd
./configure CXXFLAGS="-fPIC -O2"
make -j8
cd python
-python setup.py -q build --cpp_implementation
-pip install .
+python setup.py build --cpp_implementation
+pip install . --user
# build and run Python benchmark
@@ -41,10 +41,10 @@ echo "benchmarking pure python..."
./python-pure-python-benchmark --json --behavior_prefix="pure-python-benchmark" $datasets >> tmp/python_result.json
echo "," >> "tmp/python_result.json"
echo "benchmarking python cpp reflection..."
-env LD_PRELOAD="$oldpwd/gperftools/.libs/libtcmalloc.so" ./python-cpp-reflection-benchmark --json --behavior_prefix="cpp-reflection-benchmark" $datasets >> tmp/python_result.json
+env LD_PRELOAD="$oldpwd/gperftools/.libs/libtcmalloc.so" LD_LIBRARY_PATH="$oldpwd/src/.libs" ./python-cpp-reflection-benchmark --json --behavior_prefix="cpp-reflection-benchmark" $datasets >> tmp/python_result.json
echo "," >> "tmp/python_result.json"
echo "benchmarking python cpp generated code..."
-env LD_PRELOAD="$oldpwd/gperftools/.libs/libtcmalloc.so" ./python-cpp-generated-code-benchmark --json --behavior_prefix="cpp-generated-code-benchmark" $datasets >> tmp/python_result.json
+env LD_PRELOAD="$oldpwd/gperftools/.libs/libtcmalloc.so" LD_LIBRARY_PATH="$oldpwd/src/.libs" ./python-cpp-generated-code-benchmark --json --behavior_prefix="cpp-generated-code-benchmark" $datasets >> tmp/python_result.json
echo "]" >> "tmp/python_result.json"
cd $oldpwd
@@ -52,6 +52,11 @@ cd $oldpwd
./configure
make clean && make -j8
+# build Java protobuf
+cd java
+mvn package
+cd ..
+
# build CPP benchmark
cd benchmarks
mv tmp/python_result.json . && make clean && make -j8 cpp-benchmark && mv python_result.json tmp
@@ -81,7 +86,7 @@ echo "benchmarking java..."
# upload result to bq
make python_add_init
-python util/run_and_upload.py -cpp="../tmp/cpp_result.json" -java="../tmp/java_result.json" \
+env LD_LIBRARY_PATH="$oldpwd/src/.libs" python util/run_and_upload.py -cpp="../tmp/cpp_result.json" -java="../tmp/java_result.json" \
-python="../tmp/python_result.json" -go="../tmp/go_result.txt"
cd $oldpwd