On Thu, Aug 31, 2023 at 05:45:05PM +0100, Daniel P. Berrangé wrote: > On Fri, Aug 25, 2023 at 07:55:09PM +0200, Erik Skultety wrote: > > These are common variables we wish to use in containerized environments > > both in GitLab and locally. Having these defined in a single place > > rather than twice is highly preferable. > > > > Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx> > > --- > > ci/build.sh | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/ci/build.sh b/ci/build.sh > > index ed9b1f4473..d5586f457c 100644 > > --- a/ci/build.sh > > +++ b/ci/build.sh > > @@ -2,7 +2,12 @@ > > > > cd "$CI_CONT_SRCDIR" > > > > -export VIR_TEST_DEBUG=1 > > +export CCACHE_BASEDIR="$(pwd)" > > +export CCACHE_DIR="$CCACHE_BASEDIR/ccache" > > +export CCACHE_MAXSIZE="500M" > > +export PATH="$CCACHE_WRAPPERSDIR:$PATH" > > +export VIR_TEST_VERBOSE="1" > > +export VIR_TEST_DEBUG="1" > > These last two vars are good for CI, because in a non-interactive env we > need the verbose / debug output upfront to stand a chance of diagnosing > problems from logs after the fact > > If I'm running a build locally with our ci/Makefile, I don't especially > want it to be forced into verbose mode by default, as I have an interactive > shell I can do that as & when needed myself. > > Perhaps we can do > > if ! test -t 1 > then > export VIR_TEST_VERBOSE="1" > export VIR_TEST_DEBUG="1" > fi This uncovered an interesting bug in the ci/helper + lcitool combo. In lcitool we explicitly always ask for a TTY with --tty on podman/docker CLI. If I drop the argument and interrupt the execution I'll get an unhandled OSError exception from lcitool and a stacktrace from ci/helper which is nicely interlaced with meson's own stacktrace if you interrupt the setup phase. I need to look into lcitool whether there's an easy fix. The other temporary solution until we incorporate the ci/helper logic into lcitool would be to set another variable inside the temporary crafted script by ci/helper that would serve the same purpose. Erik