Ejemplo n.º 1
0
    def test_defaults_centos(self):
        """Default cmake building block"""
        c = cmake()
        self.assertEqual(str(c),
r'''# CMake version 3.11.1
RUN yum install -y \
        wget && \
    rm -rf /var/cache/yum/*
RUN mkdir -p /tmp && wget -q --no-check-certificate -P /tmp https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh && \
    /bin/sh /tmp/cmake-3.11.1-Linux-x86_64.sh --prefix=/usr/local && \
    rm -rf /tmp/cmake-3.11.1-Linux-x86_64.sh''')
Ejemplo n.º 2
0
    def test_version(self):
        """Version option"""
        c = cmake(eula=True, version='3.10.3')
        self.assertEqual(str(c),
r'''# CMake version 3.10.3
RUN apt-get update -y && \
    apt-get install -y --no-install-recommends \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp && wget -q --no-check-certificate -P /tmp https://cmake.org/files/v3.10/cmake-3.10.3-Linux-x86_64.sh && \
    /bin/sh /tmp/cmake-3.10.3-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
    rm -rf /tmp/cmake-3.10.3-Linux-x86_64.sh''')
Ejemplo n.º 3
0
    def test_defaults_ubuntu(self):
        """Default cmake building block"""
        c = cmake()
        self.assertEqual(str(c),
r'''# CMake version 3.11.1
RUN apt-get update -y && \
    apt-get install -y --no-install-recommends \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp && wget -q --no-check-certificate -P /tmp https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh && \
    /bin/sh /tmp/cmake-3.11.1-Linux-x86_64.sh --prefix=/usr/local && \
    rm -rf /tmp/cmake-3.11.1-Linux-x86_64.sh''')
Ejemplo n.º 4
0
    def test_eula(self):
        """Accept EULA"""
        c = cmake(eula=True)
        self.assertEqual(str(c),
r'''# CMake version 3.11.1
RUN apt-get update -y && \
    apt-get install -y --no-install-recommends \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh && \
    /bin/sh /var/tmp/cmake-3.11.1-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
    rm -rf /var/tmp/cmake-3.11.1-Linux-x86_64.sh''')