summaryrefslogtreecommitdiffstats
path: root/chinook_3.0.2.xml
blob: 4026a56804b7df7789f648688cbb85de7f824938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="https://github.com/01org/" name="01org"/>
  <remote fetch="https://gerrit.automotivelinux.org/gerrit/" name="agl" pushurl="ssh://gerrit.automotivelinux.org:29418" review="https://gerrit.automotivelinux.org/gerrit/"/>
  <remote fetch="git://git.freescale.com/imx" name="fsl-release"/>
  <remote fetch="https://github.com/" name="github"/>
  <remote fetch="git://git.openembedded.org/" name="openembedded"/>
  <remote fetch="git://git.yoctoproject.org/" name="yocto"/>
  
  <default remote="agl" revision="refs/tags/3.0.2" sync-j="4"/>
  
  <project name="AGL/meta-agl" path="meta-agl" revision="f12cf6c411837028425754deb5d7d92260880722" upstream="refs/tags/3.0.2"/>
  <project name="AGL/meta-agl-demo" path="meta-agl-demo" revision="3ee3e6b6336b17986964b22fd8f9c36e98955139" upstream="refs/tags/3.0.2"/>
  <project name="AGL/meta-agl-devel" path="meta-agl-devel" revision="134e5f446b52f6a02f38212b9bde076adad798f8" upstream="refs/tags/3.0.2"/>
  <project name="AGL/meta-agl-extra" path="meta-agl-extra" revision="27fc9de4aa4d0684a0441cb55a9dafce760f2f68" upstream="refs/tags/3.0.2"/>
  <project name="AGL/meta-renesas" path="meta-renesas" revision="90122dd63d72061b93bd3cbe3a7b520aaa531a19" upstream="refs/tags/3.0.2"/>
  <project name="CogentEmbedded/meta-rcar" path="meta-rcar" remote="github" revision="419bc8d2375c756ed0877972d5a2323207781e57" upstream="v2.12.0"/>
  <project name="Freescale/meta-fsl-arm-extra" path="meta-fsl-arm-extra" remote="github" revision="e95f4ae61fdaf6452d6dfa9cb59dbdf9cdf73c99" upstream="krogoth"/>
  <project name="meta-fsl-arm" remote="yocto" revision="e2254e7b2ded0c2b66b1226f879b3a6d52037b2d" upstream="krogoth"/>
  <project name="meta-intel" remote="yocto" revision="1f8dd1b00ce9c72d73583c405ec392690d9b08b7" upstream="krogoth"/>
  <project name="meta-intel-iot-security" remote="01org" revision="20bbb97f6d5400b126ae96ef446c3e60c7e16285"/>
  <project name="meta-oic" remote="yocto" revision="0bdd959e0dee4f63098702c302d1d214ac3d808a"/>
  <project name="meta-openembedded" remote="openembedded" revision="55c8a76da5dc099a7bc3838495c672140cedb78e" upstream="krogoth"/>
  <project name="meta-qcom" remote="yocto" revision="3bfe83535358289aa7f7342ed0977c076e7550c8" upstream="krogoth"/>
  <project name="meta-qt5/meta-qt5" path="meta-qt5" remote="github" revision="3601fd2c5306ac6d5d0d536e0be8cbb90da9b4c1" upstream="morty"/>
  <project name="meta-raspberrypi" remote="yocto" revision="a5f9b07a820d50ae5fb62e07306cd4e72d8638a9" upstream="krogoth"/>
  <project name="meta-rust/meta-rust" path="meta-rust" remote="github" revision="d0663639a08ed60bb83fd6eb99e3e2045b21b53c"/>
  <project name="meta-security-isafw" remote="01org" revision="834272c2471a86aca826170036598889b5dd552a" upstream="master"/>
  <project name="meta-ti" remote="yocto" revision="2a474f9f2cc6972f337f09805f0af17b371033d5" upstream="krogoth"/>
  <project name="poky" remote="yocto" revision="ae9b341ecfcc60e970f29cfe04306411ad26c0cf" upstream="krogoth"/>
  <project name="tripzero/meta-amb" path="meta-amb" remote="github" revision="ef3495bb8d6543709f6d1f7b657cb894d32c1757" upstream="master"/>
</manifest>
/a> 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674
--[[
    Copyright (C) 2018 "IoT.bzh"
    Author Romain Forlot <romain.forlot@iot.bzh>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


    NOTE: strict mode: every global variables should be prefixed by '_'
--]]

local lu = require('luaunit')
lu.LuaUnit:setOutputType('TAP')

_AFT = {
	exit = {0, code},
	context = _ctx,
	bindingRootDir = nil,
	tests_list = {},
	event_history = false,
	monitored_events = {},
	beforeEach = nil,
	afterEach = nil,
	beforeAll = nil,
	afterAll = nil,
}

function _AFT.enableEventHistory()
	_AFT.event_history = true
end

function _AFT.setJunitFile(filePath)
	lu.LuaUnit.fname = filePath
end

function _AFT.setOutputFile(filePath)
	local fileName = string.gsub(filePath, "(.*)%..*$", "%1")
	local file = nil

	-- Set the file output according the output type chosen.
	-- JUNIT produces 2 files, the first one using TXT format and a second
	-- one using xUnit XML format.
	if lu.LuaUnit.outputType.__class__ == 'TapOutput' then
		file = assert(io.open(fileName..".tap", "w+"))
	elseif lu.LuaUnit.outputType.__class__ == 'JunitOutput' then
		file = assert(io.open(fileName..".txt", "w+"))
		lu.LuaUnit.fname = fileName..".xml"
	elseif lu.LuaUnit.outputType.__class__ == 'TextOutput' then
		file = assert(io.open(fileName..".txt", "w+"))
	else
		file = assert(io.open(filePath, "w+"))
	end

	io.output(file)
	io.stdout = file
end

function _AFT.exitAtEnd(code)
	_AFT.exit = {1, code}
end

-- Use our own print function to redirect it to a file in the workdir of the
-- binder instead of the standard output.
_standard_print = print
print = function(...)
	io.write(... .. '\n')
	_standard_print(...)
end

--[[
  Events listener and assertion functions to test correctness of received
  event data.

  Check are in 2 times. First you need to register the event that you want to
  monitor then you test that it has been correctly received.

  Notice that there is a difference between log and event. Logs are daemon
  messages normally handled by the host log system (journald, syslog...) and
  events are generated by the apis to communicate and send informations to the
  subscribed listeners.
]]

function _AFT.addEventToMonitor(eventName, callback)
	_AFT.monitored_events[eventName] = { cb = callback, receivedCount = 0 }
end

function _AFT.incrementCount(dict)
	if dict.receivedCount then
		dict.receivedCount = dict.receivedCount + 1
	else
		dict.receivedCount = 1
	end
end

function _AFT.registerData(dict, eventData)
	local dataCpy = deep_copy(eventData)
	if dict.data and type(dict.data) == 'table' then
		if _AFT.event_history == true then
			table.insert(dict.data, dataCpy)
		else
			dict.data[1] = dataCpy
		end
	else
		dict.data = {}
		table.insert(dict.data, dataCpy)
	end
end

function _AFT.triggerEvtCallback(eventName)
	if _AFT.monitored_events[eventName].cb then
		if _AFT.monitored_events[eventName].data ~= nil then
			local data_n = table_size(_AFT.monitored_events[eventName].data)
			if _AFT.event_history == true then
				_AFT.monitored_events[eventName].cb(eventName, _AFT.monitored_events[eventName].data[data_n], _AFT.monitored_events[eventName].data)
			else
				_AFT.monitored_events[eventName].cb(eventName, _AFT.monitored_events[eventName].data[data_n])
			end
		end
	end
end

function _AFT.bindingEventHandler(eventObj, uid)
	local eventName = nil
	local eventListeners = nil
	local data = nil

	if uid then
		eventName = uid
		data = eventObj
	elseif eventObj.event.name then
		eventName = eventObj.event.name
		eventListeners = eventObj.data.result
		-- Remove from event to hold the bare event data and be able to assert it
		eventObj.data.result = nil
		data = eventObj.data.data
	end

	if type(_AFT.monitored_events[eventName]) == 'table' then
		if eventListeners then
			_AFT.monitored_events[eventName].eventListeners = eventListeners
		end

		_AFT.incrementCount(_AFT.monitored_events[eventName])
		_AFT.registerData(_AFT.monitored_events[eventName], data)
	end
end

function _evt_catcher_(source, action, eventObj)
	local uid = AFB:getuid(source)
	if uid == "monitor/trace" then
		if eventObj.type == "event" then
			_AFT.bindingEventHandler(eventObj)
		end
	--else
	--	_AFT.bindingEventHandler(eventObj, uid)
	end
end

function _AFT.lockWait(eventName, timeout)
	if type(eventName) ~= "string" then
		print("Error: wrong argument given to wait an event. 1st argument should be a string")
		return 0
	end

	local count = 0
	if _AFT.monitored_events[eventName].receivedCount and timeout then
		count = _AFT.monitored_events[eventName].receivedCount
	end

	while timeout > 0 do
		timeout = AFB:lockwait(_AFT.context, timeout)
		AFB:lockwait(_AFT.context, 0) --without it _evt_catcher_ cannot received event

		if _AFT.monitored_events[eventName].receivedCount == count + 1 then
		return 1
		end
	end
	return 0
end

function _AFT.lockWaitGroup(eventGroup, timeout)
	if type(eventGroup) ~= "table" then
		print("Error: wrong argument given to wait a group of events. 1st argument should be a table")
		return 0
	end

	-- Copy and compute the expected as it may have already received events
	-- you should add the expected count to the actual received counter to be
	-- accurate.
	local eventGroupCpy = {}
	for event,expectedCount in pairs(eventGroup) do
		eventGroupCpy[event] = expectedCount + _AFT.monitored_events[event].receivedCount
	end

	local total = 0
	local matched = nil
	while timeout > 0 do
		timeout = AFB:lockwait(_AFT.context, timeout)
		AFB:lockwait(_AFT.context, 0) --without it _evt_catcher_ cannot received event

		for name,expectedCount in pairs(eventGroupCpy) do
			if _AFT.monitored_events[name].receivedCount >= expectedCount then
				total = total + _AFT.monitored_events[name].receivedCount
				matched = name
			end
		end
		if matched then
			eventGroupCpy[matched] = nil
			matched = nil
		end
		if table_size(eventGroupCpy) == 0 then return total end
	end
	return 0
end

--[[
  Assert and test functions about the event part.
]]

function _AFT.assertEvtGrpNotReceived(eventGroup, timeout)
		local count = 0
		local expected = 0
		local eventName = ""

		if timeout then
			count = _AFT.lockWaitGroup(eventGroup, timeout)
		else
			for event in pairs(eventGroup) do
				count = count + _AFT.monitored_events[event].receivedCount
			end
		end

		for event,expectedCount in pairs(eventGroup) do
			eventName = eventName .. " " .. event
			expected = expected + expectedCount
		end
		_AFT.assertIsTrue(count <= expected, "One of the following events has been received: '".. eventName .."' but it shouldn't")

		for event in pairs(eventGroup) do
			_AFT.triggerEvtCallback(event)
		end
	end

function _AFT.assertEvtGrpReceived(eventGroup, timeout)
	local count = 0
	local expected = 0
	local eventName = ""

	if timeout then
		count = _AFT.lockWaitGroup(eventGroup, timeout)
	else
		for event in pairs(eventGroup) do
			count = count + _AFT.monitored_events[event].receivedCount
		end
	end

	for event,expectedCount in pairs(eventGroup) do
		eventName = eventName .. " " .. event
		expected = expected + expectedCount
	end

	_AFT.assertIsTrue(count >= expected, "None or one of the following events: '".. eventName .."' has not been received")

	for event in pairs(eventGroup) do
		_AFT.triggerEvtCallback(event)
	end
end

function _AFT.assertEvtNotReceived(eventName, timeout)
		local count = _AFT.monitored_events[eventName].receivedCount
		if timeout then
			count = _AFT.lockWait(eventName, timeout)
		end

		_AFT.assertIsTrue(count == 0, "Event '".. eventName .."' received but it shouldn't")

		_AFT.triggerEvtCallback(eventName)
	end

function _AFT.assertEvtReceived(eventName, timeout)
	local count = _AFT.monitored_events[eventName].receivedCount
	if timeout then
		count = _AFT.lockWait(eventName, timeout)
	end

	_AFT.assertIsTrue(count > 0, "No event '".. eventName .."' received")

	_AFT.triggerEvtCallback(eventName)
end

function _AFT.testEvtNotReceived(testName, eventName, timeout, setUp, tearDown)
	table.insert(_AFT.tests_list, {testName, function()
		if _AFT.beforeEach then _AFT.beforeEach() end
		_AFT.assertEvtNotReceived(eventName, timeout)
		if _AFT.afterEach then _AFT.afterEach() end
	end})
end

function _AFT.testEvtReceived(testName, eventName, timeout, setUp, tearDown)
	table.insert(_AFT.tests_list, {testName, function()
		if _AFT.beforeEach then _AFT.beforeEach() end
		_AFT.assertEvtReceived(eventName, timeout)
		if _AFT.afterEach then _AFT.afterEach() end
	end})
end

function _AFT.testEvtGrpReceived(testName, eventGroup, timeout, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertEvtGrpReceived(eventGroup, timeout)
	end, setUp, tearDown)
end

function _AFT.testEvtGrpNotReceived(testName, eventGroup, timeout, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertEvtGrpNotReceived(eventGroup, timeout)
	end, setUp, tearDown)
end

--[[
  Assert function meant to tests API Verbs calls
]]

local function assertVerbCallParameters(src, api, verb, args)
	_AFT.assertIsUserdata(src, "Source must be an opaque userdata pointer which will be passed to the binder")
	_AFT.assertIsString(api, "API and Verb must be string")
	_AFT.assertIsString(verb, "API and Verb must be string")
	_AFT.assertIsTable(args, "Arguments must use LUA Table (event empty)")
end

function _AFT.callVerb(api, verb, args)
	AFB:servsync(_AFT.context, api, verb, args)
end

function _AFT.assertVerb(api, verb, args, cb)
	assertVerbCallParameters(_AFT.context, api, verb, args)
	local err,responseJ = AFB:servsync(_AFT.context, api, verb, args)
	_AFT.assertIsFalse(err)
	_AFT.assertStrContains(responseJ.request.status, "success", nil, nil, "Call for API/Verb failed.")

	local tcb = type(cb)
	if cb then
		if tcb == 'function' then
			cb(responseJ)
		elseif tcb == 'table' then
			_AFT.assertEquals(responseJ.response, cb)
		elseif tcb == 'string' or tcb == 'number' then
			_AFT.assertEquals(responseJ.response, cb)
		else
			_AFT.assertIsTrue(false, "Wrong parameter passed to assertion. Last parameter should be function, table representing a JSON object or nil")
		end
	end
end

function _AFT.assertVerbError(api, verb, args, cb)
	assertVerbCallParameters(_AFT.context, api, verb, args)
	local err,responseJ = AFB:servsync(_AFT.context, api, verb, args)
	_AFT.assertIsTrue(err)
	_AFT.assertNotStrContains(responseJ.request.status, "success", nil, nil, "Call for API/Verb succeed but it shouldn't.")

	local tcb = type(cb)
	if cb then
		if tcb == 'function' then
			cb(responseJ)
		elseif tcb == 'string' then
			_AFT.assertNotEquals(responseJ.request.info, cb)
		else
			_AFT.assertIsFalse(false, "Wrong parameter passed to assertion. Last parameter should be a string representing the failure informations")
		end
	end
end

function _AFT.testVerbCb(testName, api, verb, args, cb, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertVerb(api, verb, args, cb)
	end, setUp, tearDown)
end

function _AFT.testVerbCbError(testName, api, verb, args, cb, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertVerbError(api, verb, args, cb)
	end, setUp, tearDown)
end

function _AFT.testVerb(testName, api, verb, args, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertVerb(api, verb, args)
	end, setUp, tearDown)
end

function _AFT.testVerbError(testName, api, verb, args, setUp, tearDown)
	_AFT.describe(testName, function()
		_AFT.assertVerbError(api, verb, args)
	end, setUp, tearDown)
end

function _AFT.describe(testName, testFunction, setUp, tearDown)
	local aTest = {}

	if type(testFunction) == 'function' then
		function aTest:testFunction() testFunction() end
	else
		print('ERROR: #2 argument isn\'t of type function. Aborting...')
		os.exit(1)
	end
	function aTest:setUp()
		if _AFT.beforeEach then _AFT.beforeEach() end
		if type(setUp) == 'function' then setUp() end
	end
	function aTest:tearDown()
		if type(tearDown) == 'function' then tearDown() end
		if _AFT.afterEach then _AFT.afterEach() end
	end

	table.insert(_AFT.tests_list, {testName, aTest})
end

function _AFT.setBefore(testName, beforeTestFunction)
	if type(beforeTestFunction) == "function" then
		for _,item in pairs(_AFT.tests_list) do
			if item[1] == testName then
				local setUp_old = item[2].setup
				item[2].setUp = function()
					beforeTestFunction()
					if setUp_old then setUp_old() end
				end
			end
		end
	else
		print("Wrong 'before' function defined. It isn't detected as a function type")
	end
end

function _AFT.setAfter(testName, afterTestFunction)
	if type(afterTestFunction) == "function" then
		for _,item in pairs(_AFT.tests_list) do
			if item[1] == testName then
				local tearDown_old = item[2].tearDown
				item[2].tearDown = function()
					if tearDown_old then tearDown_old() end
					afterTestFunction()
				end
			end
		end
	else
		print("Wrong 'after' function defined. It isn't detected as a function type")
	end
end

function _AFT.setBeforeEach(beforeEachTestFunction)
	if type(beforeEachTestFunction) == "function" then
		_AFT.beforeEach = beforeEachTestFunction
	else
		print("Wrong beforeEach function defined. It isn't detected as a function type")
	end
end

function _AFT.setAfterEach(afterEachTestFunction)
	if type(afterEachTestFunction) == "function" then
		_AFT.afterEach = afterEachTestFunction
	else
		print("Wrong afterEach function defined. It isn't detected as a function type")
	end
end

function _AFT.setBeforeAll(beforeAllTestsFunctions)
	if type(beforeAllTestsFunctions) == "function" then
		_AFT.beforeAll = beforeAllTestsFunctions
	else
		print("Wrong beforeAll function defined. It isn't detected as a function type")
	end
end

function _AFT.setAfterAll(afterAllTestsFunctions)
	if type(afterAllTestsFunctions) == "function" then
		_AFT.afterAll = afterAllTestsFunctions
	else
		print("Wrong afterAll function defined. It isn't detected as a function type")
	end
end

--[[
	Make all assertions accessible using _AFT and declare some convenients
	aliases.
]]

local luaunit_list_of_assert = {
	--  official function name from luaunit test framework

	-- general assertions
	'assertEquals',
	'assertItemsEquals',
	'assertNotEquals',
	'assertAlmostEquals',
	'assertNotAlmostEquals',
	'assertEvalToTrue',
	'assertEvalToFalse',
	'assertStrContains',
	'assertStrIContains',
	'assertNotStrContains',
	'assertNotStrIContains',
	'assertStrMatches',
	'assertError',
	'assertErrorMsgEquals',
	'assertErrorMsgContains',
	'assertErrorMsgMatches',
	'assertIs',
	'assertNotIs',

	-- type assertions: assertIsXXX -> assert_is_xxx
	'assertIsNumber',
	'assertIsString',
	'assertIsTable',
	'assertIsBoolean',
	'assertIsNil',
	'assertIsTrue',
	'assertIsFalse',
	'assertIsNaN',
	'assertIsInf',
	'assertIsPlusInf',
	'assertIsMinusInf',
	'assertIsPlusZero',
	'assertIsMinusZero',
	'assertIsFunction',
	'assertIsThread',
	'assertIsUserdata',

	-- type assertions: assertNotIsXXX -> assert_not_is_xxx
	'assertNotIsNumber',
	'assertNotIsString',
	'assertNotIsTable',
	'assertNotIsBoolean',
	'assertNotIsNil',
	'assertNotIsTrue',
	'assertNotIsFalse',
	'assertNotIsNaN',
	'assertNotIsInf',
	'assertNotIsPlusInf',
	'assertNotIsMinusInf',
	'assertNotIsPlusZero',
	'assertNotIsMinusZero',
	'assertNotIsFunction',
	'assertNotIsThread',
	'assertNotIsUserdata',
}

local luaunit_list_of_functions = {
	"setOutputType",
}

local _AFT_list_of_funcs = {
	-- AF Binder generic assertions
	{ 'addEventToMonitor', 'resetEventReceivedCount' },
	{ 'assertVerb',      'assertVerbStatusSuccess' },
	{ 'assertVerb',      'assertVerbResponseEquals' },
	{ 'assertVerb',      'assertVerbCb' },
	{ 'assertVerbError', 'assertVerbStatusError' },
	{ 'assertVerbError', 'assertVerbResponseEqualsError' },
	{ 'assertVerbError', 'assertVerbCbError' },
	{ 'testVerb',      'testVerbStatusSuccess' },
	{ 'testVerb',      'testVerbResponseEquals' },
	{ 'testVerbError', 'testVerbStatusError' },
	{ 'testVerbError', 'testVerbResponseEqualsError' },
}

-- Import all luaunit assertion function to _AFT object
for _, v in pairs( luaunit_list_of_assert ) do
	local funcname = v
	_AFT[funcname] = lu[funcname]
end

-- Import specific luaunit configuration functions to _AFT object
for _, v in pairs( luaunit_list_of_functions ) do
	local funcname = v
	_AFT[funcname] = lu.LuaUnit[funcname]
end

-- Create all aliases in _AFT
for _, v in pairs( _AFT_list_of_funcs ) do
	local funcname, alias = v[1], v[2]
	_AFT[alias] = _AFT[funcname]
end

local function call_tests()
	AFB:success(_AFT.context, { info = "Launching tests"})
	lu.LuaUnit:runSuiteByInstances(_AFT.tests_list)

	local success ="Success : "..tostring(lu.LuaUnit.result.passedCount)
	local failures="Failures : "..tostring(lu.LuaUnit.result.testCount-lu.LuaUnit.result.passedCount)

	local evtHandle = AFB:evtmake(_AFT.context, 'results')
	--if type(evtHandle) == "userdata" then
	--	AFB:subscribe(_AFT.context,evtHandle)
	--	AFB:evtpush(_AFT.context,evtHandle,{info = success.." "..failures})
	--end
end

local function process_tests()
	-- Execute the test within a context if given. We assume that the before
	-- function success returning '0' else we abort the whole test procedure
	if _AFT.beforeAll then
		if _AFT.beforeAll() == 0 then
			call_tests()
		else
			AFB:fail(_AFT.context, { info = "Can't set the context to execute the tests correctly. Look at the log and retry."})
		end
	else
		call_tests()
	end

	-- Keep the context unset function to be executed after all no matter if
	-- tests have been executed or not.
	if _AFT.afterAll then
		if _AFT.afterAll() ~= 0 then
			print('Unsetting the tests context failed.')
		end
	end
end

local function readOneFile(f)
	local cmdHandle = io.popen('find "'.. _AFT.bindingRootDir..'" -name "'..f..'"')
	local filehandle = cmdHandle:read()
	if filehandle then
		dofile(filehandle)
	else
		print('Error: file not found ', f)
	end
	cmdHandle:close()
end

function _launch_test(context, args)
	_AFT.context = context
	_AFT.bindingRootDir = AFB:getrootdir(_AFT.context)

	-- Prepare the tests execution configuring the monitoring and loading
	-- lua test files to execute in the Framework.
	AFB:servsync(_AFT.context, "monitor", "set", { verbosity = "debug" })
	if type(args.trace) == "string" then
		AFB:servsync(_AFT.context, "monitor", "trace", { add = { request = "vverbose", event = "push_after", pattern = args.trace.."/*" }})
	elseif type(args.trace) == "table" then
		for _,v in pairs(args.trace) do
			if type(v) == "string" then
				AFB:servsync(_AFT.context, "monitor", "trace", { add = { request = "vverbose", event = "push_after", pattern = v.."/*" }})
			end
		end
	end

	if args.files and type(args.files) == 'table' then
		for _,f in pairs(args.files) do
			_AFT.setOutputFile(f)
			readOneFile(f)
			process_tests()
			_AFT.beforeEach = nil
			_AFT.afterEach = nil
			_AFT.beforeAll = nil
			_AFT.afterAll = nil
			_AFT.tests_list = {}
		end
	elseif type(args.files) == 'string' then
		_AFT.setOutputFile(args.files)
		readOneFile(args.files)
		process_tests()
	end

	if _AFT.exit[1] == 1 then os.exit(_AFT.exit[2]) end
end