Skip to content

Commit a8f57b0

Browse files
author
Vasileios Karakasis
committed
Address PR comments
1 parent 4bacd12 commit a8f57b0

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

ci-scripts/dockerfiles/Lmod.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN \
1515
apt-get -y install gcc && \
1616
apt-get -y install make && \
1717
apt-get -y install git && \
18-
apt-get -y install python3
18+
apt-get -y install python3 python3-pip
1919

2020
# Required utilities
2121
RUN apt-get -y install wget
@@ -33,9 +33,7 @@ ENV BASH_ENV=/usr/local/lmod/lmod/init/profile
3333

3434
# Install ReFrame from the current directory
3535
COPY . /root/reframe/
36-
RUN \
37-
cd reframe \
38-
./bootstrap.sh
36+
RUN cd reframe && ./bootstrap.sh
3937

4038
WORKDIR /root/reframe
4139
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]

ci-scripts/dockerfiles/Tmod32.dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ RUN yum -y install environment-modules
2121

2222
# Install ReFrame from the current directory
2323
COPY . /root/reframe/
24-
RUN \
25-
cd reframe \
26-
./bootstrap.sh
24+
RUN cd reframe && ./bootstrap.sh
2725

2826
WORKDIR /root/reframe
2927
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod32.py -v"]

ci-scripts/dockerfiles/Tmod4.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN \
1515
apt-get -y install gcc && \
1616
apt-get -y install make && \
1717
apt-get -y install git && \
18-
apt-get -y install python3
18+
apt-get -y install python3 python3-pip
1919

2020
# Required utilities
2121
RUN apt-get -y install wget
@@ -33,9 +33,7 @@ ENV BASH_ENV=/usr/local/Modules/init/profile.sh
3333

3434
# Install ReFrame from the current directory
3535
COPY . /root/reframe/
36-
RUN \
37-
cd reframe \
38-
./bootstrap.sh
36+
RUN cd reframe && ./bootstrap.sh
3937

4038
WORKDIR /root/reframe
4139
CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod4.py -v"]

unittests/test_modules.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,19 @@ def test_searchpath(modules_system):
4848

4949

5050
@pytest.fixture
51-
def module_collection(modules_system, tmp_path):
52-
import secrets
53-
51+
def module_collection(modules_system, tmp_path, monkeypatch):
5452
if modules_system.name not in ['tmod4', 'lmod']:
5553
pytest.skip(f'test unsupported with {modules_system.name!r}')
5654

57-
# Generate a "random" name for the collection, because it is going to be
58-
# placed under the $HOME/.module or $HOME/.lmod.d
59-
coll_name = secrets.token_hex(8)
60-
coll_name = 'lala'
55+
# Both Lmod and Tmod4 place collections under the user's HOME directory,
56+
# that's why we monkeypatch it
57+
monkeypatch.setenv('HOME', str(tmp_path))
58+
coll_name = 'test_collection'
6159

6260
# Create modules collections with conflicting modules
6361
modules_system.load_module('testmod_base')
6462
modules_system.load_module('testmod_foo')
6563
modules_system.execute('save', coll_name)
66-
# completed = osext.run_command(f'module save {coll_name}', shell=True)
67-
# print(completed.stderr)
68-
# print(completed.stdout)
6964
modules_system.unload_module('testmod_foo')
7065
modules_system.unload_module('testmod_base')
7166

0 commit comments

Comments
 (0)