public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Minimise CI test log
@ 2021-10-28 15:28 Anton Mikanovich
  2021-10-28 15:28 ` [PATCH 1/2] CI: Trace test only Anton Mikanovich
  2021-10-28 15:28 ` [PATCH 2/2] CI: Ignore POLLHUP events in log Anton Mikanovich
  0 siblings, 2 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-10-28 15:28 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

There are some redundant output parts in Avocado logs we can remove.

Anton Mikanovich (2):
  CI: Trace test only
  CI: Ignore POLLHUP events in log

 scripts/ci_build.sh               | 6 +++---
 testsuite/build_test/cibuilder.py | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] CI: Trace test only
  2021-10-28 15:28 [PATCH 0/2] Minimise CI test log Anton Mikanovich
@ 2021-10-28 15:28 ` Anton Mikanovich
  2021-10-28 15:28 ` [PATCH 2/2] CI: Ignore POLLHUP events in log Anton Mikanovich
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-10-28 15:28 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

No minimise test log hide traces of prepare operations.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 scripts/ci_build.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 32054c4..ff219d6 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -114,9 +114,6 @@ if [ -z "$REPRO_BUILD" ]; then
     TAGS="$TAGS,-repro"
 fi
 
-# the real stuff starts here, trace commands from now on
-set -x
-
 # Provide working path
 mkdir -p .config/avocado
 cat <<EOF > .config/avocado/avocado.conf
@@ -128,6 +125,9 @@ logs_dir = $BUILD_DIR/job-results
 EOF
 export VIRTUAL_ENV="./"
 
+# the real stuff starts here, trace commands from now on
+set -x
+
 avocado $VERBOSE run "$BUILD_TEST_DIR/build_test.py" \
     -t $TAGS --test-runner=runner --disable-sysinfo \
     -p build_dir="$BUILD_DIR" -p quiet=$QUIET -p cross=$CROSS_BUILD
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] CI: Ignore POLLHUP events in log
  2021-10-28 15:28 [PATCH 0/2] Minimise CI test log Anton Mikanovich
  2021-10-28 15:28 ` [PATCH 1/2] CI: Trace test only Anton Mikanovich
@ 2021-10-28 15:28 ` Anton Mikanovich
  2021-10-28 18:26   ` Henning Schild
  1 sibling, 1 reply; 4+ messages in thread
From: Anton Mikanovich @ 2021-10-28 15:28 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Print only POLLIN event buffers to not show empty lines at POLLHUP
events at the end of execution.
This will reduce test log size.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 testsuite/build_test/cibuilder.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testsuite/build_test/cibuilder.py b/testsuite/build_test/cibuilder.py
index baa7185..529e6ff 100644
--- a/testsuite/build_test/cibuilder.py
+++ b/testsuite/build_test/cibuilder.py
@@ -92,9 +92,9 @@ class CIBuilder(Test):
             while p1.poll() is None:
                 events = poller.poll(1000)
                 for fd, event in events:
-                    if fd == p1.stdout.fileno():
+                    if fd == p1.stdout.fileno() and event == select.POLLIN:
                         self.log.info(p1.stdout.readline().rstrip())
-                    if fd == p1.stderr.fileno():
+                    if fd == p1.stderr.fileno() and event == select.POLLIN:
                         app_log.error(p1.stderr.readline().rstrip())
             p1.wait()
             if p1.returncode:
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] CI: Ignore POLLHUP events in log
  2021-10-28 15:28 ` [PATCH 2/2] CI: Ignore POLLHUP events in log Anton Mikanovich
@ 2021-10-28 18:26   ` Henning Schild
  0 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2021-10-28 18:26 UTC (permalink / raw)
  To: Anton Mikanovich; +Cc: isar-users

Am Thu, 28 Oct 2021 18:28:49 +0300
schrieb Anton Mikanovich <amikan@ilbers.de>:

> Print only POLLIN event buffers to not show empty lines at POLLHUP
> events at the end of execution.
> This will reduce test log size.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  testsuite/build_test/cibuilder.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testsuite/build_test/cibuilder.py
> b/testsuite/build_test/cibuilder.py index baa7185..529e6ff 100644
> --- a/testsuite/build_test/cibuilder.py
> +++ b/testsuite/build_test/cibuilder.py
> @@ -92,9 +92,9 @@ class CIBuilder(Test):
>              while p1.poll() is None:
>                  events = poller.poll(1000)
>                  for fd, event in events:
> -                    if fd == p1.stdout.fileno():
> +                    if fd == p1.stdout.fileno() and event ==
> select.POLLIN: self.log.info(p1.stdout.readline().rstrip())
> -                    if fd == p1.stderr.fileno():
> +                    if fd == p1.stderr.fileno() and event ==
> select.POLLIN: app_log.error(p1.stderr.readline().rstrip())
>              p1.wait()
>              if p1.returncode:

if event.POLLIN:
	case 1:
	case 2:

Henning

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-28 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 15:28 [PATCH 0/2] Minimise CI test log Anton Mikanovich
2021-10-28 15:28 ` [PATCH 1/2] CI: Trace test only Anton Mikanovich
2021-10-28 15:28 ` [PATCH 2/2] CI: Ignore POLLHUP events in log Anton Mikanovich
2021-10-28 18:26   ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox