diff options
author | Luca Ceresoli <luca@lucaceresoli.net> | 2017-05-10 23:33:44 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-05-10 23:42:13 +0200 |
commit | 08151c6aec559b68c0991dadf0147673cbae851f (patch) | |
tree | a4f0a6161b35cb829125b62815cc2ae7e2bbf89e /support/testing/infra/basetest.py | |
parent | 583f59702bdd2baa040a37eef061530973269880 (diff) | |
download | buildroot-08151c6aec559b68c0991dadf0147673cbae851f.tar.gz buildroot-08151c6aec559b68c0991dadf0147673cbae851f.zip |
support/testing: show messages in a more readable format
Currently messages from run-tests are quite unpleasant:
[br-tests/TestPostScripts/2017-05-09 15:51:57] Building
[br-tests/TestPostScripts/2017-05-09 15:52:23] Building done
[br-tests/TestPostScripts/2017-05-09 15:52:23] Cleaning up
.[br-tests/TestNoTimezone/2017-05-09 15:52:23] Starting
[br-tests/TestNoTimezone/2017-05-09 15:52:23] Building
[br-tests/TestNoTimezone/2017-05-09 15:53:17] Building done
[br-tests/TestNoTimezone/2017-05-09 15:53:22] Cleaning up
.[br-tests/TestGlibcNonDefaultLimitedTimezone/2017-05-09 15:53:22] Starting
[br-tests/TestGlibcNonDefaultLimitedTimezone/2017-05-09 15:53:22] Building
[br-tests/TestGlibcNonDefaultLimitedTimezone/2017-05-09 15:54:33] Building done
[br-tests/TestGlibcNonDefaultLimitedTimezone/2017-05-09 15:54:37] Cleaning up
[...]
Change them in a more readable way by removing the date and using a
columnar style:
15:12:22 TestPostScripts Starting
15:12:25 TestPostScripts Building
15:12:48 TestPostScripts Building done
15:12:48 TestPostScripts Cleaning up
.15:12:48 TestNoTimezone Starting
15:12:54 TestNoTimezone Building
15:13:44 TestNoTimezone Building done
15:13:49 TestNoTimezone Cleaning up
.15:13:49 TestGlibcNonDefaultLimitedTimezone Starting
15:14:00 TestGlibcNonDefaultLimitedTimezone Building
15:14:56 TestGlibcNonDefaultLimitedTimezone Building done
15:15:01 TestGlibcNonDefaultLimitedTimezone Cleaning up
[...]
Note the '.' and other characters presented by nose2 are still
printed. They are not affected by this change.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/testing/infra/basetest.py')
-rw-r--r-- | support/testing/infra/basetest.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py index eb9da90119..cb5d2100f4 100644 --- a/support/testing/infra/basetest.py +++ b/support/testing/infra/basetest.py @@ -36,10 +36,8 @@ class BRTest(unittest.TestCase): keepbuilds = False def show_msg(self, msg): - print "[%s/%s/%s] %s" % (os.path.basename(self.__class__.outputdir), - self.testname, - datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), - msg) + print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"), + self.testname, msg) def setUp(self): self.testname = self.__class__.__name__ self.builddir = os.path.join(self.__class__.outputdir, self.testname) |