Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sparse checkout configs #226

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions CI/run_reframe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ fi
if [ -z "${EESSI_TESTSUITE_BRANCH}" ]; then
EESSI_TESTSUITE_BRANCH='v0.4.0'
fi
if [ -z "${EESSI_CONFIGS_TESTSUITE_URL}" ]; then
EESSI_CONFIGS_TESTSUITE_URL="${EESSI_TESTSUITE_URL}"
fi
if [ -z "${EESSI_CONFIGS_TESTSUITE_BRANCH}" ]; then
EESSI_CONFIGS_TESTSUITE_BRANCH="${EESSI_TESTSUITE_BRANCH}"
fi
if [ -z "${USE_EESSI_SOFTWARE_STACK}" ] || [ "$USE_EESSI_SOFTWARE_STACK" == "True" ]; then
export USE_EESSI_SOFTWARE_STACK=True
if [ -z "${EESSI_CVMFS_REPO}" ]; then
Expand All @@ -65,7 +71,7 @@ if [ -z "${USE_EESSI_SOFTWARE_STACK}" ] || [ "$USE_EESSI_SOFTWARE_STACK" == "Tru
fi
fi
if [ -z "${RFM_CONFIG_FILES}" ]; then
export RFM_CONFIG_FILES="${TEMPDIR}/test-suite/config/${EESSI_CI_SYSTEM_NAME}.py"
export RFM_CONFIG_FILES="${TEMPDIR}/configs/config/${EESSI_CI_SYSTEM_NAME}.py"
fi
if [ -z "${RFM_CHECK_SEARCH_PATH}" ]; then
export RFM_CHECK_SEARCH_PATH="${TEMPDIR}/test-suite/eessi/testsuite/tests/"
Expand Down Expand Up @@ -100,6 +106,22 @@ echo "Cloning ReFrame repo: git clone ${REFRAME_CLONE_ARGS}"
git clone ${REFRAME_CLONE_ARGS}
export PYTHONPATH="${PYTHONPATH}":"${TEMPDIR}"/reframe

# Clone configs from test suite repo
EESSI_CONFIGS_CLONE_ARGS="-n --filter=tree:0 ${EESSI_CONFIGS_TESTSUITE_URL} --branch ${EESSI_CONFIGS_TESTSUITE_BRANCH} --depth 1 ${TEMPDIR}/configs"
echo "Cloning configs from EESSI test suite repo:"
echo "git clone ${EESSI_CONFIGS_CLONE_ARGS}"
git clone ${EESSI_CONFIGS_CLONE_ARGS}
echo "cd ${TEMPDIR}/configs"
cd ${TEMPDIR}/configs
echo "git sparse-checkout set --no-cone config"
git sparse-checkout set --no-cone config
echo "git checkout"
git checkout
# Return to TEMPDIR
echo "cd ${TEMPDIR}"
cd ${TEMPDIR}


# Clone test suite repo
EESSI_CLONE_ARGS="${EESSI_TESTSUITE_URL} --branch ${EESSI_TESTSUITE_BRANCH} --depth 1 ${TEMPDIR}/test-suite"
echo "Cloning EESSI repo: git clone ${EESSI_CLONE_ARGS}"
Expand Down Expand Up @@ -139,6 +161,8 @@ echo "TEMPDIR: ${TEMPDIR}"
echo "PYTHONPATH: ${PYTHONPATH}"
echo "EESSI test suite URL: ${EESSI_TESTSUITE_URL}"
echo "EESSI test suite version: ${EESSI_TESTSUITE_BRANCH}"
echo "EESSI test suite URL for configs: ${EESSI_CONFIGS_TESTSUITE_URL}"
echo "EESSI test suite version for configs: ${EESSI_CONFIGS_TESTSUITE_BRANCH}"
echo "HPCtestlib from ReFrame URL: ${REFRAME_URL}"
echo "HPCtestlib from ReFrame branch: ${REFRAME_BRANCH}"
echo "ReFrame executable: $(which reframe)"
Expand All @@ -159,7 +183,7 @@ reframe ${REFRAME_ARGS} --list

# Run
echo "Run tests:"
timeout -v --preserve-status -s SIGTERM ${REFRAME_TIMEOUT} reframe ${REFRAME_ARGS} --run
timeout -v --preserve-status -s SIGTERM ${REFRAME_TIMEOUT} reframe ${REFRAME_ARGS} --run --setvar EESSI_CONFIGS_URL=${EESSI_CONFIGS_TESTSUITE_URL} --setvar EESSI_CONFIGS_BRANCH=${EESSI_CONFIGS_TESTSUITE_BRANCH}

# Cleanup
rm -rf "${TEMPDIR}"
3 changes: 3 additions & 0 deletions eessi/testsuite/eessi_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class EESSI_Mixin(RegressionMixin):
cvmfs_repo_name = variable(str, value='None')
cvmfs_software_subdir = variable(str, value='None')
full_modulepath = variable(str, value='None')
# These are optionally set in CI on the command line
EESSI_CONFIGS_URL = variable(str, value='None')
EESSI_CONFIGS_BRANCH = variable(str, value='None')

# Make sure the version of the EESSI test suite gets logged in the ReFrame report
eessi_testsuite_version = variable(str, value=testsuite_version)
Expand Down
Loading