Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 69ad490
  • /
  • .github
  • /
  • workflows
  • /
  • make-test
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:247b4c61bd46d3359c16b8ba410d1d6d87908c53
directory badge Iframe embedding
swh:1:dir:bfbd96923b4ed75585d705572b1a6b8ce0fabcea
make-test
#!/usr/bin/env bash
set -eo pipefail

cleanup() {
    # Remove if nothing was generated.
    [ -d artifacts ] && find artifacts -type d -empty -delete
}
trap cleanup EXIT

# Make a central directory to store all output artifacts of our test run to
# avoid having to configure multiple upload-artifacts steps in the workflow
# file.
OSSL_CI_ARTIFACTS_PATH="artifacts/"
if [ -n "${GITHUB_RUN_NUMBER}" ]; then
    OSSL_CI_ARTIFACTS_PATH="artifacts/github-${GITHUB_JOB}-${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ID}/"
fi
mkdir -p "$OSSL_CI_ARTIFACTS_PATH"
export OSSL_CI_ARTIFACTS_PATH="$(cd "$OSSL_CI_ARTIFACTS_PATH"; pwd)"

# Run the tests. This might fail, but we need to capture artifacts anyway.
set +e
make test HARNESS_JOBS=${HARNESS_JOBS:-4} "$@"
RESULT=$?
set -e

# Move an interesting subset of the test-runs data we want into the artifacts
# staging directory.
for test_name in quic_multistream; do
    if [ -d "test-runs/test_${test_name}" ]; then
        mv "test-runs/test_${test_name}" "$OSSL_CI_ARTIFACTS_PATH/"
    fi
done

# Log the artifact tree.
echo "::group::List of artifact files generated"
echo "Test suite exited with $RESULT, artifacts path is $OSSL_CI_ARTIFACTS_PATH"
(cd "$OSSL_CI_ARTIFACTS_PATH"; find . -type f | sort)
echo "::endgroup::"

exit $RESULT

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top