diff options
author | Primiano Tucci <primiano@google.com> | 2019-10-04 15:55:52 +0100 |
---|---|---|
committer | Primiano Tucci <primiano@google.com> | 2019-10-04 15:55:52 +0100 |
commit | 036cb11b4f8c23165ce2f541b57cadcd65d46d8c (patch) | |
tree | 5dd142f8f705383aa068b45e7935fdd98a08d77a | |
parent | f77a4786a334c8fd83ece3177f00634ee7e019b5 (diff) | |
download | perfetto-036cb11b4f8c23165ce2f541b57cadcd65d46d8c.tar.gz |
bazel: add smoke tests running the produced binaries
We don't have support for unittests as we don't roll gtest (yet).
At least check that the binaries are not crashing.
Also remove the TODO about using --disk_cache. Looks like a bazel
build takes 2 mins on the CI, not worth the complexity.
Bug: 140126865
Change-Id: I79c728a7ddf4887f170c4b02d56c6338b068eecf
-rwxr-xr-x | test/ci/android_tests.sh | 1 | ||||
-rwxr-xr-x | test/ci/bazel_tests.sh | 15 | ||||
-rwxr-xr-x | test/ci/fuzzer_tests.sh | 1 | ||||
-rwxr-xr-x | test/ci/linux_tests.sh | 1 | ||||
-rwxr-xr-x | test/ci/ui_tests.sh | 1 |
5 files changed, 15 insertions, 4 deletions
diff --git a/test/ci/android_tests.sh b/test/ci/android_tests.sh index 8c637c209..9c9fcf069 100755 --- a/test/ci/android_tests.sh +++ b/test/ci/android_tests.sh @@ -15,6 +15,7 @@ set -eux -o pipefail +# cd into the project root (two levels up from /test/ci). cd $(dirname ${BASH_SOURCE[0]})/../.. OUT_PATH="out/dist" diff --git a/test/ci/bazel_tests.sh b/test/ci/bazel_tests.sh index e2b001d76..a7a435905 100755 --- a/test/ci/bazel_tests.sh +++ b/test/ci/bazel_tests.sh @@ -15,9 +15,16 @@ set -eux -o pipefail +# cd into the project root (two levels up from /test/ci). cd $(dirname ${BASH_SOURCE[0]})/../.. -# TODO(primiano): Add --disk_cache=/ci/cache/bazel-$(hostname) to speed up -# builds. That requires a daily cleanup of the cache though because bazel -# otherwise grows it indefinitely. -bazel build //:all +bazel build //:all --verbose_failures + +# Smoke test that processes run without crashing. +./bazel-bin/traced & +./bazel-bin/traced_probes & +sleep 5 +TRACE=/ci/artifacts/bazel.trace +./bazel-bin/perfetto -c :test -o $TRACE +kill $(jobs -p) +./bazel-bin/trace_processor_shell -q <(echo 'select count(1) from sched') $TRACE diff --git a/test/ci/fuzzer_tests.sh b/test/ci/fuzzer_tests.sh index 6736857b9..0ed6f8b50 100755 --- a/test/ci/fuzzer_tests.sh +++ b/test/ci/fuzzer_tests.sh @@ -15,6 +15,7 @@ set -eux -o pipefail +# cd into the project root (two levels up from /test/ci). cd $(dirname ${BASH_SOURCE[0]})/../.. OUT_PATH="out/dist" diff --git a/test/ci/linux_tests.sh b/test/ci/linux_tests.sh index 7d984922c..571ad535f 100755 --- a/test/ci/linux_tests.sh +++ b/test/ci/linux_tests.sh @@ -15,6 +15,7 @@ set -eux -o pipefail +# cd into the project root (two levels up from /test/ci). cd $(dirname ${BASH_SOURCE[0]})/../.. OUT_PATH="out/dist" diff --git a/test/ci/ui_tests.sh b/test/ci/ui_tests.sh index 8fbd627c0..ef54437a4 100755 --- a/test/ci/ui_tests.sh +++ b/test/ci/ui_tests.sh @@ -15,6 +15,7 @@ set -eux -o pipefail +# cd into the project root (two levels up from /test/ci). cd $(dirname ${BASH_SOURCE[0]})/../.. OUT_PATH="out/dist" |