Skip to content

Commit

Permalink
skip the simple project build on graalpy
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Aug 15, 2023
1 parent d1fc534 commit a5e288a
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,24 @@ for PYTHON in /opt/python/*/bin/python; do
test "${LINK_VERSION}" = "${REAL_VERSION}"

# check a simple project can be built
SRC_DIR=/tmp/forty-two-${IMPLEMENTATION}${PYVERS}
DIST_DIR=/tmp/dist-${IMPLEMENTATION}${PYVERS}
cp -rf ${MY_DIR}/forty-two ${SRC_DIR}
PY_ABI_TAGS=$(basename $(dirname $(dirname $PYTHON)))
EXPECTED_WHEEL_NAME=forty_two-0.1.0-${PY_ABI_TAGS}-linux_${AUDITWHEEL_ARCH}.whl
${PYTHON} -m build -w -o ${DIST_DIR} ${SRC_DIR}
if [ ! -f ${DIST_DIR}/${EXPECTED_WHEEL_NAME} ]; then
echo "unexcpected wheel built: '$(basename $(find ${DIST_DIR} -name '*.whl'))' instead of '${EXPECTED_WHEEL_NAME}'"
exit 1
fi
auditwheel repair --only-plat -w ${DIST_DIR} ${DIST_DIR}/${EXPECTED_WHEEL_NAME}
REPAIRED_WHEEL=$(find ${DIST_DIR} -name "forty_two-0.1.0-${PY_ABI_TAGS}-*${AUDITWHEEL_POLICY}_${AUDITWHEEL_ARCH}*.whl")
if [ ! -f "${REPAIRED_WHEEL}" ]; then
echo "invalid repaired wheel name"
exit 1
fi
if [ "${IMPLEMENTATION}" != "graalpy" ]; then
SRC_DIR=/tmp/forty-two-${IMPLEMENTATION}${PYVERS}
DIST_DIR=/tmp/dist-${IMPLEMENTATION}${PYVERS}
cp -rf ${MY_DIR}/forty-two ${SRC_DIR}
PY_ABI_TAGS=$(basename $(dirname $(dirname $PYTHON)))
EXPECTED_WHEEL_NAME=forty_two-0.1.0-${PY_ABI_TAGS}-linux_${AUDITWHEEL_ARCH}.whl
${PYTHON} -m build -w -o ${DIST_DIR} ${SRC_DIR}
if [ ! -f ${DIST_DIR}/${EXPECTED_WHEEL_NAME} ]; then
echo "unexcpected wheel built: '$(basename $(find ${DIST_DIR} -name '*.whl'))' instead of '${EXPECTED_WHEEL_NAME}'"
exit 1
fi
auditwheel repair --only-plat -w ${DIST_DIR} ${DIST_DIR}/${EXPECTED_WHEEL_NAME}
REPAIRED_WHEEL=$(find ${DIST_DIR} -name "forty_two-0.1.0-${PY_ABI_TAGS}-*${AUDITWHEEL_POLICY}_${AUDITWHEEL_ARCH}*.whl")
if [ ! -f "${REPAIRED_WHEEL}" ]; then
echo "invalid repaired wheel name"
exit 1
fi

${PYTHON} -m pip install ${REPAIRED_WHEEL}
if [ "$(${PYTHON} -c 'import forty_two; print(forty_two.answer())')" != "42" ]; then
echo "invalid answer, expecting 42"
Expand Down

0 comments on commit a5e288a

Please sign in to comment.