Skip to content

Commit

Permalink
Only build the grpc tests that we're going to run to save time in CI (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhop authored and dougch committed Jan 30, 2024
1 parent d1f62e1 commit 64adb03
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/ci/integration/run_grpc_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ aws_lc_build "$SRC_ROOT" "$AWS_LC_BUILD_FOLDER" "$AWS_LC_INSTALL_FOLDER" -DBUILD

mkdir -p "${GRPC_SRC_FOLDER}/cmake/build"
cd "${GRPC_SRC_FOLDER}/cmake/build"
cmake -GNinja -DgRPC_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DgRPC_SSL_PROVIDER=package -DBUILD_SHARED_LIBS=ON -DOPENSSL_ROOT_DIR="${AWS_LC_INSTALL_FOLDER}" ../..
ninja
time cmake -GNinja -DgRPC_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DgRPC_SSL_PROVIDER=package -DBUILD_SHARED_LIBS=ON -DOPENSSL_ROOT_DIR="${AWS_LC_INSTALL_FOLDER}" ../..
grpc_tests=$(grep add_executable ../../CMakeLists.txt | grep _test | grep -E '(tls|ssl|cert)' | cut -d '(' -f2)
echo Building $grpc_tests
time ninja $grpc_tests

# grpc tests expect to use relative paths to certificates and test files
cd "${GRPC_SRC_FOLDER}"
python3 tools/run_tests/start_port_server.py
for file in cmake/build/*; do
if [[ -x "$file" && ( "$file" == *ssl* || "$file" == *tls* || "$file" == *cert* ) ]]; then
./"$file"
fi
for test in $grpc_tests; do
"./cmake/build/${test}"
done

ldd "${GRPC_SRC_FOLDER}/cmake/build/libgrpc.so" | grep "${AWS_LC_INSTALL_FOLDER}/lib/libcrypto.so" || exit 1
Expand Down

0 comments on commit 64adb03

Please sign in to comment.