From acdede50cebf7d247e55356be828ebaba43c0d3d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 28 Aug 2018 22:13:34 +0200 Subject: test: Dump $NVIM_LOG_FILE contents (#8926) Do this at the test-framework level instead of CI (Travis) scripts. Then it works for QuickBuild and AppVeyor. ref eb6dd3e42dc38460e8624dc5faef894e21c6aa26 --- busted/outputHandlers/TAP.lua | 6 ++++-- busted/outputHandlers/nvim.lua | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'busted') diff --git a/busted/outputHandlers/TAP.lua b/busted/outputHandlers/TAP.lua index ff93a7cc75..612e633576 100644 --- a/busted/outputHandlers/TAP.lua +++ b/busted/outputHandlers/TAP.lua @@ -1,7 +1,8 @@ --- TODO(jkeyes): remove this and use the upstream version as soon as it is --- available in a release of busted. +-- TODO(jkeyes): Use the upstream version when busted releases it. (But how to +-- inject our call to global_helpers.read_nvim_log() ?) local pretty = require 'pl.pretty' +local global_helpers = require('test.helpers') return function(options) local busted = require 'busted' @@ -18,6 +19,7 @@ return function(options) end handler.suiteEnd = function() + io.write(global_helpers.read_nvim_log()) print('1..' .. counter) io.flush() return nil, true diff --git a/busted/outputHandlers/nvim.lua b/busted/outputHandlers/nvim.lua index b612ead070..d137300a7e 100644 --- a/busted/outputHandlers/nvim.lua +++ b/busted/outputHandlers/nvim.lua @@ -1,6 +1,7 @@ local s = require 'say' local pretty = require 'pl.pretty' local term = require 'term' +local global_helpers = require('test.helpers') local colors @@ -200,6 +201,7 @@ return function(options) local tests = (testCount == 1 and 'test' or 'tests') local files = (fileCount == 1 and 'file' or 'files') io.write(globalTeardown) + io.write(global_helpers.read_nvim_log()) io.write(suiteEndString:format(testCount, tests, fileCount, files, elapsedTime_ms)) io.write(getSummaryString()) io.flush() -- cgit