Skip to content

Commit

Permalink
Per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Nov 24, 2023
1 parent 33af885 commit d551452
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tests/ci/common_posix_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ elif [ "$(basename "${SRC_ROOT}")" != 'aws-lc' ]; then
SRC_ROOT="${SCRIPT_DIR}/../.."
fi
SRC_ROOT="$(readlink -f "${SRC_ROOT}")"
echo "$SRC_ROOT"
echo SRC_ROOT="$SRC_ROOT"

SYS_ROOT="$(readlink -f "${SRC_ROOT}/..")"
echo "$SYS_ROOT"
echo SYS_ROOT="$SYS_ROOT"

cd $SRC_ROOT

BUILD_ROOT="${SRC_ROOT}/test_build_dir"
echo "$BUILD_ROOT"
echo BUILD_ROOT="$BUILD_ROOT"

PLATFORM=$(uname -m)

Expand Down
7 changes: 6 additions & 1 deletion tests/ci/gtest_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ function shard_gtest() {
GTEST_TOTAL_SHARDS=4
fi

echo shard_gtest-Command: ${1}
PIDS=()
COUNTER=0
while [ $COUNTER -lt $GTEST_TOTAL_SHARDS ]; do
export GTEST_SHARD_INDEX=$COUNTER
echo shard_gtest-Command: ${1}
${1} &
PIDS[${COUNTER}]=$!
COUNTER=$(( COUNTER+1 ))
done

RESULT=0
for PID in ${PIDS[*]}; do
wait -f $PID
if "${?}" -ne "0"; then
RESULT=${?}
fi
done
return $RESULT
}
27 changes: 20 additions & 7 deletions tests/ci/run_cross_ppc64_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ mkdir -p "${SCRATCH_FOLDER}"

pushd "${SCRATCH_FOLDER}"

wget https://aws-libcrypto.s3.us-west-2.amazonaws.com/cross-compile-toolchains/host-x86_64-pc-linux-gnu/ppc64-x-tools.tar.xz
tar Jxvf ppc64-x-tools.tar.xz --no-same-owner --no-same-permissions
wget -q https://aws-libcrypto.s3.us-west-2.amazonaws.com/cross-compile-toolchains/host-x86_64-pc-linux-gnu/ppc64-x-tools.tar.xz
tar Jxf ppc64-x-tools.tar.xz --no-same-owner --no-same-permissions

cat <<EOF > ppc64.cmake
# Specify the target system
Expand All @@ -42,14 +42,27 @@ set(ENABLE_EXPERIMENTAL_BIG_ENDIAN_SUPPORT true)
set(CMAKE_GENERATOR Ninja)
EOF

export QEMU_LD_PREFIX="${SCRATCH_FOLDER}/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sysroot"
export LD_LIBRARY_PATH="${SCRATCH_FOLDER}/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sysroot/lib"

echo "Testing AWS-LC shared library for PPC64 big-endian."

run_build -DCMAKE_TOOLCHAIN_FILE="${SCRATCH_FOLDER}/ppc64.cmake"
BUILD_OPTIONS=()
BUILD_OPTIONS+=("-DCMAKE_BUILD_TYPE=Release")
BUILD_OPTIONS+=("-DCMAKE_BUILD_TYPE=Release -DFIPS=1 -DBUILD_SHARED_LIBS=1")

export QEMU_LD_PREFIX="${SCRATCH_FOLDER}/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sysroot"
export LD_LIBRARY_PATH="${SCRATCH_FOLDER}/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sysroot/lib"
for BO in "${BUILD_OPTIONS[@]}"; do
run_build -DCMAKE_TOOLCHAIN_FILE="${SCRATCH_FOLDER}/ppc64.cmake" ${BO}

shard_gtest "${BUILD_ROOT}/crypto/crypto_test --gtest_also_run_disabled_tests"
shard_gtest ${BUILD_ROOT}/crypto/urandom_test
shard_gtest ${BUILD_ROOT}/crypto/mem_test
shard_gtest ${BUILD_ROOT}/crypto/mem_set_test

shard_gtest ${BUILD_ROOT}/crypto/crypto_test
shard_gtest ${BUILD_ROOT}/ssl/ssl_test
shard_gtest ${BUILD_ROOT}/ssl/ssl_test
shard_gtest ${BUILD_ROOT}/ssl/integration_test

# Due to its special linkage, this is now a Google Test
${BUILD_ROOT}/crypto/dynamic_loading_test
done
popd

0 comments on commit d551452

Please sign in to comment.