From 0a611494763624cb0da0331eb91d47e0aaebaa7e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 25 Jan 2021 16:29:56 +0200 Subject: [PATCH] tests: implement `VTEST_SHOW_START=1 v test vlib/math` --- cmd/tools/modules/testing/common.v | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index 494a91d408..264b1ad354 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -10,6 +10,8 @@ import v.util.vtest const github_job = os.getenv('GITHUB_JOB') +const show_start = os.getenv('VTEST_SHOW_START') == '1' + pub struct TestSession { pub mut: files []string @@ -33,6 +35,7 @@ enum MessageKind { ok fail skip + info sentinel } @@ -131,7 +134,7 @@ pub fn new_test_session(_vargs string) TestSession { skip_files << 'examples/x/websocket/client-server/client.v' // requires OpenSSL skip_files << 'examples/x/websocket/client-server/server.v' // requires OpenSSL } - if github_job != 'ubuntu-tcc' { + if testing.github_job != 'ubuntu-tcc' { skip_files << 'examples/wkhtmltopdf.v' // needs installation of wkhtmltopdf from https://github.com/wkhtmltopdf/packaging/releases // the ttf_test.v is not interactive, but needs X11 headers to be installed, which is done only on ubuntu-tcc for now skip_files << 'vlib/x/ttf/ttf_test.v' @@ -276,6 +279,9 @@ fn worker_trunner(mut p sync.PoolProcessor, idx int, thread_id int) voidptr { return sync.no_result } } else { + if testing.show_start { + ts.append_message(.info, ' starting $relative_file ...') + } r := os.exec(cmd) or { ts.failed = true ts.benchmark.fail()