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

Fix ReFrame test step for RISC-V #201

Merged
merged 6 commits into from
Mar 8, 2024
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile.bootstrap-prefix-debian-sid
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM debian:sid-20240211-slim
COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh

RUN apt-get update
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget rustc
RUN apt-get install -y git python3-pip python3-cryptography python3-venv
RUN python3 -m venv --system-site-packages /opt/ansible && \
. /opt/ansible/bin/activate && \
Expand Down
3 changes: 3 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
virtualenv_command: python3 -m venv
state: forcereinstall
when: reframe_exists.rc != 0
tags:
- test

- name: Copy ReFrame test file
ansible.builtin.copy:
Expand All @@ -30,6 +32,7 @@
ansible.builtin.command:
cmd: "{{ reframe_venv_dir + '/bin/' if reframe_exists.rc != 0 else '' }}reframe -r -v -c {{ reframe_venv_dir }}/compat_layer.py"
environment:
EESSI_REPO_DIR: "/cvmfs/{{ cvmfs_repository }}"
EESSI_VERSION: "{{ eessi_version }}"
EESSI_OS: "{{ eessi_host_os }}"
EESSI_ARCH: "{{ eessi_host_arch }}"
Expand Down
15 changes: 9 additions & 6 deletions test/compat_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class RunInGentooPrefixTestError(rfm.core.exceptions.ReframeError):


class RunInGentooPrefixTest(rfm.RunOnlyRegressionTest):
eessi_repo_dir = parameter(
os.environ.get('EESSI_REPO_DIR', EESSI_REPO_DIR)
)
eessi_version = parameter(
os.environ.get('EESSI_VERSION', 'latest').split(',')
)
Expand All @@ -27,12 +30,12 @@ def __init__(self):
self.valid_prog_environs = ['*']
if self.eessi_version == 'latest':
# resolve the "latest" symlink to the actual version
self.eessi_version = os.readlink(os.path.join(EESSI_REPO_DIR, 'latest'))
self.eessi_version = os.readlink(os.path.join(eessi_repo_dir, 'latest'))
# 2021.06 did not have the 'versions' subdirectory yet
if self.eessi_version == '2021.06':
self.eessi_repo_dir = EESSI_REPO_DIR
self.eessi_repo_dir = eessi_repo_dir
else:
self.eessi_repo_dir = os.path.join(EESSI_REPO_DIR, 'versions')
self.eessi_repo_dir = os.path.join(eessi_repo_dir, 'versions')

self.compat_dir = os.path.join(
self.eessi_repo_dir,
Expand Down Expand Up @@ -195,7 +198,7 @@ def __init__(self):
sn.assert_found(f'\n/{self.symlink_to_host}\n', self.stdout),
])


@rfm.simple_test
class GentooOverlayGitTest(RunInGentooPrefixTest):
def __init__(self):
Expand All @@ -214,7 +217,7 @@ def __init__(self):

self.sanity_patterns = sn.assert_found(gentoo_git_repo_info, self.stdout)


@rfm.simple_test
class GlibcEnvFileTest(RunInGentooPrefixTest):
def __init__(self):
Expand All @@ -226,7 +229,7 @@ def __init__(self):
self.command = 'equery has --package glibc EXTRA_EMAKE'

trusted_dir = os.path.join(
EESSI_REPO_DIR,
eessi_repo_dir,
'host_injections',
self.eessi_version,
'compat',
Expand Down
Loading