system-tests: make docker abortable and use colors

This commit is contained in:
André Roth
2024-06-08 12:41:26 +02:00
parent 3e1485faf5
commit 34c1c1f83a
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends curl gnupg &
RUN echo deb http://deb.debian.org/debian bookworm-backports main > /etc/apt/sources.list.d/backports.list
RUN apt-get update && \
apt-get install -y --no-install-recommends apg bzip2 xz-utils ca-certificates golang/bookworm-backports golang-go/bookworm-backports golang-doc/bookworm-backports golang-src/bookworm-backports make git python3 python3-requests-unixsocket && \
apt-get install -y --no-install-recommends apg bzip2 xz-utils ca-certificates golang/bookworm-backports golang-go/bookworm-backports golang-doc/bookworm-backports golang-src/bookworm-backports make git python3 python3-requests-unixsocket python3-termcolor && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -m --shell /bin/sh --home-dir /var/lib/aptly aptly
+3 -3
View File
@@ -81,7 +81,7 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non
if not matches:
continue
sys.stdout.write("%s:%s... " % (test, o.__name__))
sys.stdout.write(colored("%s:%s... ", color="yellow", attrs=["bold"]) % (test, o.__name__))
sys.stdout.flush()
t = o()
@@ -105,9 +105,9 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non
typ, val, tb = sys.exc_info()
fails.append((test, t, typ, val, tb, testModule))
traceback.print_exception(typ, val, tb)
sys.stdout.write(colored("FAIL\n", color="red"))
sys.stdout.write(colored("FAIL\n", color="red", attrs=["bold"]))
else:
sys.stdout.write(colored("OK\n", color="green"))
sys.stdout.write(colored("OK\n", color="green", attrs=["bold"]))
t.shutdown()