From a96d2104792ed1f41ed276e7d25d99a677b8e729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:21:31 +0100 Subject: [PATCH 1/6] pass repo dir to test script --- ansible/playbooks/roles/compatibility_layer/tasks/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml index 3f95fda6..c9483e1c 100644 --- a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml +++ b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml @@ -30,6 +30,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_repo }}" EESSI_VERSION: "{{ eessi_version }}" EESSI_OS: "{{ eessi_host_os }}" EESSI_ARCH: "{{ eessi_host_arch }}" From 03ddffa9329ba16bf5194fc8f127429df565c153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:21:52 +0100 Subject: [PATCH 2/6] add missing test tag --- ansible/playbooks/roles/compatibility_layer/tasks/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml index c9483e1c..c9e39b19 100644 --- a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml +++ b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml @@ -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: From 29bc730822fc4bc20c5e3e3c80a7ae67c3659367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:22:29 +0100 Subject: [PATCH 3/6] cvmfs_repo -> cvmfs_repository --- ansible/playbooks/roles/compatibility_layer/tasks/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml index c9e39b19..81c0cf93 100644 --- a/ansible/playbooks/roles/compatibility_layer/tasks/test.yml +++ b/ansible/playbooks/roles/compatibility_layer/tasks/test.yml @@ -32,7 +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_repo }}" + EESSI_REPO_DIR: "/cvmfs/{{ cvmfs_repository }}" EESSI_VERSION: "{{ eessi_version }}" EESSI_OS: "{{ eessi_host_os }}" EESSI_ARCH: "{{ eessi_host_arch }}" From c5229b7d341d5d4aa90c8e8762fc2f6fe889a2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:24:42 +0100 Subject: [PATCH 4/6] use variable for cvmfs repo dir --- test/compat_layer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/compat_layer.py b/test/compat_layer.py index c0ce726a..fa0230c9 100644 --- a/test/compat_layer.py +++ b/test/compat_layer.py @@ -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(',') ) From ca7a8c109d3bbeb1b0ded6e4e112a81750eb4c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:25:15 +0100 Subject: [PATCH 5/6] install rustc, required for building maturin (dep of reframe) on risc-v --- Dockerfile.bootstrap-prefix-debian-sid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.bootstrap-prefix-debian-sid b/Dockerfile.bootstrap-prefix-debian-sid index 2a9e70ff..88270738 100644 --- a/Dockerfile.bootstrap-prefix-debian-sid +++ b/Dockerfile.bootstrap-prefix-debian-sid @@ -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 && \ From 941ce7e80aca472fd0110cfbf71dcb28bb8ad590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 8 Mar 2024 13:34:58 +0100 Subject: [PATCH 6/6] use the new variable for the repo dir everywhere --- test/compat_layer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/compat_layer.py b/test/compat_layer.py index fa0230c9..cfab80a0 100644 --- a/test/compat_layer.py +++ b/test/compat_layer.py @@ -30,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, @@ -198,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): @@ -217,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): @@ -229,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',