diff --git a/common.mk b/common.mk index a0c41e04e0..0a88bd249c 100644 --- a/common.mk +++ b/common.mk @@ -1666,8 +1666,8 @@ no-test-bundler-parallel: # The annocheck supports ELF format binaries compiled for any OS and for any # architecture. It is designed to be independent of the host OS and the # architecture. The test-annocheck.sh requires docker or podman. -test-annocheck: $(PROGRAM) - $(tooldir)/test-annocheck.sh $(PROGRAM) +test-annocheck: $(PROGRAM) $(LIBRUBY_SO) + $(tooldir)/test-annocheck.sh $(PROGRAM) $(LIBRUBY_SO) GEM = up sync-default-gems: diff --git a/tool/annocheck/Dockerfile-copy b/tool/annocheck/Dockerfile-copy index e658d12ddc..0a79f3a50a 100644 --- a/tool/annocheck/Dockerfile-copy +++ b/tool/annocheck/Dockerfile-copy @@ -1,7 +1,6 @@ FROM docker.io/fedora:latest -ARG FILES +ARG IN_DIR RUN dnf -y install annobin-annocheck -RUN mkdir /work -COPY ${FILES} /work +COPY ${IN_DIR} /work WORKDIR /work diff --git a/tool/test-annocheck.sh b/tool/test-annocheck.sh index 0224152d00..92b3c9adae 100755 --- a/tool/test-annocheck.sh +++ b/tool/test-annocheck.sh @@ -15,6 +15,7 @@ set -x DOCKER="$(command -v docker || command -v podman)" TAG=ruby-fedora-annocheck TOOL_DIR=$(dirname "${0}") +TMP_DIR="tmp/annocheck" DOCKER_RUN_VOLUME_OPTS= if [ -z "${CI-}" ]; then @@ -27,7 +28,13 @@ else # volume in container in container on GitHub Actions # <.github/workflows/compilers.yml>. TAG="${TAG}-copy" - "${DOCKER}" build --rm -t "${TAG}" --build-arg=FILES="${*}" -f ${TOOL_DIR}/annocheck/Dockerfile-copy . + rm -rf "${TMP_DIR}" + mkdir -p "${TMP_DIR}" + for file in "${@}"; do + cp -p "${file}" "${TMP_DIR}" + done + "${DOCKER}" build --rm -t "${TAG}" --build-arg=IN_DIR="${TMP_DIR}" -f ${TOOL_DIR}/annocheck/Dockerfile-copy . + rm -rf "${TMP_DIR}" fi "${DOCKER}" run --rm -t ${DOCKER_RUN_VOLUME_OPTS} "${TAG}" annocheck --verbose ${TEST_ANNOCHECK_OPTS-} "${@}"