timewarrior/test/docker/debiantesting
Shaun Ruffell 8e99c07d85 Introduce AtomicFiles
Introduce AtomicFile and a test of this module to the code.

AtomicFile is like File, except all writes go to temporary files until
the class method finalize_all () is called and the temporary files are
copied over the real files. If any writes fail, like when there is no
more space on the filesystem, none of the files in the database will be
modified.

Since we need version 1.00 of libfiu, I have only added it to the debian
testing container, which includes libfiu-1.00 in the default repository.

Related to #155
2020-02-23 19:03:40 +01:00

42 lines
1.1 KiB
Text

FROM debian:testing
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
cmake \
fiu-utils=1.00-* \
g++ \
git \
libfiu-dev=1.00-* \
locales \
man \
python3 \
python3-dateutil \
tzdata \
&& rm -fr /var/lib/apt/lists/*
# Setup environment
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
RUN ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime
RUN dpkg-reconfigure -f noninteractive tzdata
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
RUN locale-gen en_US.UTF-8
# Setup timewarrior
ADD . /root/code/
WORKDIR /root/code/
RUN git clean -dfx
RUN git submodule init
RUN git submodule update
RUN cmake -DCMAKE_BUILD_TYPE=debug .
RUN make -j2
RUN make install
# Setup tests
WORKDIR /root/code/test/
RUN make
CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version"]