Esempio n. 1
0
    def test_runtime(self):
        """Runtime"""
        x = xpmem()
        r = x.runtime()
        self.assertEqual(
            r, r'''# XPMEM
COPY --from=0 /usr/local/xpmem /usr/local/xpmem
ENV CPATH=/usr/local/xpmem/include:$CPATH \
    LD_LIBRARY_PATH=/usr/local/xpmem/lib:$LD_LIBRARY_PATH \
    LIBRARY_PATH=/usr/local/xpmem/lib:$LIBRARY_PATH''')
    def test_defaults_centos(self):
        """Default xpmem building block"""
        x = xpmem()
        self.assertEqual(
            str(x), r'''# XPMEM branch master
RUN yum install -y \
        autoconf \
        automake \
        ca-certificates \
        file \
        git \
        libtool \
        make && \
    rm -rf /var/cache/yum/*
RUN mkdir -p /var/tmp && cd /var/tmp && git clone --depth=1 --branch master https://gitlab.com/hjelmn/xpmem.git xpmem && cd - && \
    cd /var/tmp/xpmem && autoreconf --install && \
    cd /var/tmp/xpmem &&   ./configure --prefix=/usr/local/xpmem --disable-kernel-module && \
    make -j$(nproc) && \
    make -j$(nproc) install && \
    rm -rf /var/tmp/xpmem
ENV CPATH=/usr/local/xpmem/include:$CPATH \
    LD_LIBRARY_PATH=/usr/local/xpmem/lib:$LD_LIBRARY_PATH \
    LIBRARY_PATH=/usr/local/xpmem/lib:$LIBRARY_PATH''')