Skip to content

Commit

Permalink
Pass arguments directly instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatnghiho committed Jan 2, 2025
1 parent 336fdbd commit 2d4b00d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,7 @@ batch:
compute-type: BUILD_GENERAL1_MEDIUM
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_openldap_integration.sh"
OPENLDAP_BRANCH: "master"
OPENLDAP_RELEASE: "OPENLDAP_REL_ENG_2_5"
AWS_LC_CI_TARGET: "tests/ci/integration/run_openldap_integration.sh master OPENLDAP_REL_ENG_2_5"

- identifier: cyrus_sasl_integration_x86_64
buildspec: tests/ci/codebuild/common/run_simple_target.yml
Expand Down
2 changes: 1 addition & 1 deletion tests/ci/codebuild/common/run_simple_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ env:
phases:
build:
commands:
- "./${AWS_LC_CI_TARGET}"
- ./${AWS_LC_CI_TARGET}
18 changes: 9 additions & 9 deletions tests/ci/integration/run_openldap_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AWS_LC_INSTALL_FOLDER="${SCRATCH_FOLDER}/aws-lc-install"

function openldap_build() {
local branch=${1}
pushd "$OPENLDAP_BRANCH"
pushd ${branch}
# Modify CFLAGS and LDFLAGS so compiler and linker can find AWS-LC's artifacts
export STRICT_C_COMPILER="gcc"
export CPPFLAGS="-I$AWS_LC_INSTALL_FOLDER/include"
Expand All @@ -57,22 +57,22 @@ function openldap_build() {

function openldap_run_tests() {
local branch=${1}
pushd "$OPENLDAP_BRANCH"
pushd ${branch}
make -j ${NUM_CPU_THREADS} test
popd
}

function openldap_patch() {
local branch=${1}
local src_dir="${OPENLDAP_SRC_FOLDER}/$OPENLDAP_BRANCH"
local patch_dir="${OPENLDAP_PATCH_FOLDER}/$OPENLDAP_BRANCH"
local src_dir="${OPENLDAP_SRC_FOLDER}/${branch}"
local patch_dir="${OPENLDAP_PATCH_FOLDER}/${branch}"
if [[ ! $(find -L ${patch_dir} -type f -name '*.patch') ]]; then
echo "No patch for $OPENLDAP_BRANCH!"
echo "No patch for ${branch}!"
exit 1
fi
git clone https://github.com/openldap/openldap.git ${src_dir} \
--depth 1 \
--branch "$OPENLDAP_BRANCH"
--branch ${branch}
for patchfile in $(find -L ${patch_dir} -type f -name '*.patch'); do
echo "Apply patch ${patchfile}..."
cat ${patchfile} \
Expand Down Expand Up @@ -103,9 +103,9 @@ pushd ${OPENLDAP_SRC_FOLDER}

# NOTE: As we add more versions to support, we may want to parallelize here
for branch in "$@"; do
openldap_patch $OPENLDAP_BRANCH
openldap_build $OPENLDAP_BRANCH
openldap_run_tests $OPENLDAP_BRANCH
openldap_patch ${branch}
openldap_build ${branch}
openldap_run_tests ${branch}
done

popd

0 comments on commit 2d4b00d

Please sign in to comment.