ESP is built using Bazel build tool. Install Bazel version 0.3.2, following the Bazel documentation.
Clone the ESP GitHub repository, initialize Git submodules, and build ESP using Bazel:
# Clone the ESP repository
git clone https://github.com/cloudendpoints/esp
cd esp
# Initialize Git submodules
git submodule update --init --recursive
# Build ESP binary
bazel build //src/nginx/main:nginx-esp
The ESP binary location is:
./bazel-bin/src/nginx/main/nginx-esp
# Run ESP unit and integration tests
bazel test //src/... //third_party:all
ASAN works on both Linux and Mac, but TSAN only works on Linux.
# Run ASAN
bazel test --config=asan --test_tag_filters=-no_asan \
//src/... //third_party:all
# Run TSAN
bazel test --config=tsan --test_tag_filters=-no_tsan \
//src/... //third_party:all
If you know a test is not going to work under TSAN or ASAN, please add the
no_tsan
or no_asan
flags to your test targets as well as a reference
to the existing bug.