def test_non_default_opts(self): """non-default options""" l = libsim(mpi=False, system_cmake=False, system_python=False, thirdparty=False, version='2.13.3') self.assertEqual( str(l), r'''# VisIt libsim version 2.13.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ gzip \ make \ patch \ tar \ wget \ zlib1g-dev \ libxt-dev \ libgl1-mesa-dev \ libglu1-mesa-dev && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/tmp/visit && wget -q -nc --no-check-certificate -P /var/tmp/visit http://portal.nersc.gov/project/visit/releases/2.13.3/build_visit2_13_3 && \ cd /var/tmp/visit && bash build_visit2_13_3 --xdb --server-components-only --makeflags -j$(nproc) --prefix /usr/local/visit && \ rm -rf /var/tmp/visit ENV LD_LIBRARY_PATH=/usr/local/visit/2.13.3/linux-x86_64/lib:/usr/local/visit/2.13.3/linux-x86_64/libsim/V2/lib:$LD_LIBRARY_PATH \ PATH=/usr/local/visit/bin:$PATH''')
def test_runtime(self): """Runtime""" l = libsim() r = l.runtime() self.assertEqual(r, r'''# VisIt libsim RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ libgl1-mesa-glx \ libglu1-mesa \ libxt6 \ zlib1g && \ rm -rf /var/lib/apt/lists/* COPY --from=0 /usr/local/visit /usr/local/visit ENV LD_LIBRARY_PATH=/usr/local/visit/2.13.3/linux-x86_64/lib:/usr/local/visit/2.13.3/linux-x86_64/libsim/V2/lib:$LD_LIBRARY_PATH \ PATH=/usr/local/visit/bin:$PATH''')
def test_defaults_ubuntu(self): """Default libsim building block""" l = libsim() self.assertEqual(str(l), r'''# VisIt libsim version 2.13.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ gzip \ libgl1-mesa-dev \ libglu1-mesa-dev \ libxt-dev \ make \ patch \ tar \ wget \ zlib1g-dev && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/tmp/visit && wget -q -nc --no-check-certificate -P /var/tmp/visit http://portal.nersc.gov/project/visit/releases/2.13.3/build_visit2_13_3 && \ mkdir -p /usr/local/visit/third-party && \ cd /var/tmp/visit && PAR_COMPILER=mpicc bash build_visit2_13_3 --xdb --server-components-only --parallel --no-icet --makeflags -j$(nproc) --prefix /usr/local/visit --system-cmake --system-python --thirdparty-path /usr/local/visit/third-party && \ rm -rf /var/tmp/visit ENV LD_LIBRARY_PATH=/usr/local/visit/2.13.3/linux-x86_64/lib:/usr/local/visit/2.13.3/linux-x86_64/libsim/V2/lib:$LD_LIBRARY_PATH \ PATH=/usr/local/visit/bin:$PATH''')
def test_ldconfig(self): """ldconfig option""" l = libsim(ldconfig=True, version='2.13.3') self.assertEqual(str(l), r'''# VisIt libsim version 2.13.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ gzip \ libgl1-mesa-dev \ libglu1-mesa-dev \ libxt-dev \ make \ patch \ tar \ wget \ zlib1g-dev && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/tmp/visit && wget -q -nc --no-check-certificate -P /var/tmp/visit http://portal.nersc.gov/project/visit/releases/2.13.3/build_visit2_13_3 && \ mkdir -p /usr/local/visit/third-party && \ cd /var/tmp/visit && PAR_COMPILER=mpicc bash build_visit2_13_3 --xdb --server-components-only --parallel --no-icet --makeflags -j$(nproc) --prefix /usr/local/visit --system-cmake --system-python --thirdparty-path /usr/local/visit/third-party && \ echo "/usr/local/visit/2.13.3/linux-x86_64/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig && \ echo "/usr/local/visit/2.13.3/linux-x86_64/libsim/V2/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig && \ rm -rf /var/tmp/visit ENV PATH=/usr/local/visit/bin:$PATH''')
def test_defaults_centos(self): """Default libsim building block""" l = libsim() self.assertEqual(str(l), r'''# VisIt libsim version 2.13.3 RUN yum install -y \ gzip \ libXt-devel \ libglvnd-devel \ make \ mesa-libGL-devel \ mesa-libGLU-devel \ patch \ tar \ wget \ which \ zlib-devel && \ rm -rf /var/cache/yum/* RUN mkdir -p /var/tmp/visit && wget -q -nc --no-check-certificate -P /var/tmp/visit http://portal.nersc.gov/project/visit/releases/2.13.3/build_visit2_13_3 && \ mkdir -p /usr/local/visit/third-party && \ cd /var/tmp/visit && PAR_COMPILER=mpicc bash build_visit2_13_3 --xdb --server-components-only --parallel --no-icet --makeflags -j$(nproc) --prefix /usr/local/visit --system-cmake --system-python --thirdparty-path /usr/local/visit/third-party && \ rm -rf /var/tmp/visit ENV LD_LIBRARY_PATH=/usr/local/visit/2.13.3/linux-x86_64/lib:/usr/local/visit/2.13.3/linux-x86_64/libsim/V2/lib:$LD_LIBRARY_PATH \ PATH=/usr/local/visit/bin:$PATH''')