From a911265c12f1b42b64cba509e6d5c2b521c06ea7 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 20 Jan 2015 16:46:08 +0100 Subject: [PATCH] [FIX] Packaging: RedHat: prompt overriden in docker RPM packages did not pass the tests because the centos prompt changed and thus did not match the regexp anymore. We now explicitely specify the prompt in our Dockerfiles to prevent such issues. --- setup/package.dfcentos | 6 ++++-- setup/package.dfdebian | 2 ++ setup/package.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/setup/package.dfcentos b/setup/package.dfcentos index eb986347afb..16e959d62b5 100644 --- a/setup/package.dfcentos +++ b/setup/package.dfcentos @@ -17,9 +17,11 @@ RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noar yum clean all && \ pip install xlwt http://download.gna.org/pychart/PyChart-1.39.tar.gz -# Manual start of postgres +# Postgres configuration RUN mkdir -p /var/lib/postgres/data RUN chown -R postgres:postgres /var/lib/postgres/data RUN chmod 0700 /var/lib/postgres/data RUN su postgres -c "initdb -D /var/lib/postgres/data -E UTF-8" -RUN cp /usr/share/pgsql/postgresql.conf.sample /var/lib/postgres/data/postgresql.conf \ No newline at end of file +RUN cp /usr/share/pgsql/postgresql.conf.sample /var/lib/postgres/data/postgresql.conf + +RUN echo "PS1=\"[\u@nightly-tests] # \"" > ~/.bashrc diff --git a/setup/package.dfdebian b/setup/package.dfdebian index 148f5513cee..bf9489a88c0 100644 --- a/setup/package.dfdebian +++ b/setup/package.dfdebian @@ -64,3 +64,5 @@ RUN apt-get update -qq && \ python-xlwt \ python-yaml -y && \ rm -rf /var/lib/apt/lists/* + +RUN echo "PS1=\"[\u@nightly-tests] # \"" > ~/.bashrc diff --git a/setup/package.py b/setup/package.py index 779a49902ea..c9f60ed81f1 100755 --- a/setup/package.py +++ b/setup/package.py @@ -145,7 +145,7 @@ class OdooDocker(object): def __init__(self): self.log_file = NamedTemporaryFile(mode='w+b', prefix="bash", suffix=".txt", delete=False) self.port = 8069 # TODO sle: reliable way to get a free port? - self.prompt_re = '(\r\nroot@|bash-).*# ' + self.prompt_re = '\[root@nightly-tests\] #' self.timeout = 1000 def system(self, command):