mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-12 06:30:35 +00:00
system-tests: make docker abortable and use colors
This commit is contained in:
+1
-1
@@ -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
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user