From 3bdac4bb64005f38ee768df6388e5415598b032f Mon Sep 17 00:00:00 2001 From: Stanca Pop Date: Thu, 2 Nov 2023 10:53:31 +0200 Subject: [PATCH] test: Remove unwanted files --- test/DemoTests.m | 74 --------------------------------------------- test/NonHWTest.m | 28 ----------------- test/runDemoTests.m | 44 --------------------------- test/runNonHWTest.m | 39 ------------------------ 4 files changed, 185 deletions(-) delete mode 100755 test/DemoTests.m delete mode 100755 test/NonHWTest.m delete mode 100755 test/runDemoTests.m delete mode 100755 test/runNonHWTest.m diff --git a/test/DemoTests.m b/test/DemoTests.m deleted file mode 100755 index a2f7d88..0000000 --- a/test/DemoTests.m +++ /dev/null @@ -1,74 +0,0 @@ -classdef DemoTests < matlab.uitest.TestCase - - properties - root = ''; - end - - methods(TestClassSetup) - function addpaths(testCase) - here = mfilename('fullpath'); - here = strsplit(here,'/'); - here = fullfile('/',here{1:end-2}); - testCase.root = here; - addpath(genpath(fullfile(here,'hdl'))); - end - function setupVivado(~) - v=ver('matlab'); Release = v.Release; - switch Release - case '(R2017a)' - vivado = '2016.2'; - case '(R2017b)' - vivado = '2017.4'; - case '(R2018b)' - vivado = '2017.4'; - case '(R2019a)' - vivado = '2018.2'; - case '(R2019b)' - vivado = '2018.2'; - case '(R2020a)' - vivado = '2018.2'; - case '(R2020b)' - vivado = '2018.2'; - case '(R2021a)' - vivado = '2018.2'; - case '(R2021b)' - vivado = '2021.1'; - case '(R2022a)' - vivado = '2022.2'; - end - if ispc - hdlsetuptoolpath('ToolName', 'Xilinx Vivado', ... - 'ToolPath', ['C:\Xilinx\Vivado\',vivado,'\bin\vivado.bat']); - elseif isunix - hdlsetuptoolpath('ToolName', 'Xilinx Vivado', ... - 'ToolPath', ['/opt/Xilinx/Vivado/',vivado,'/bin/vivado']); - end - - end - end - - methods(TestMethodTeardown) - function cleanup_hdl_prj(testCase) - dir = fullfile(testCase.root,'test','hdl_prj'); - if exist(dir, 'dir') - rmdir(fullfile(testCase.root,'test','hdl_prj'), 's'); - end - end - end - - methods(Test) - %function buildHDLDAQ2ZCU102_BOOTBIN(testCase) - % cd(fullfile(testCase.root,'test')); - % out = hdlworkflow_daq2_zcu102_rx('2018.2'); - % if ~isempty(out) - % disp(out.message); - % end - % % Check for BOOT.BIN - % if exist('hdl_prj/vivado_ip_prj/boot/BOOT.BIN', 'file') ~= 2 - % error('BOOT.BIN Failed'); - % end - %end - end - -end - diff --git a/test/NonHWTest.m b/test/NonHWTest.m deleted file mode 100755 index 4e04fc9..0000000 --- a/test/NonHWTest.m +++ /dev/null @@ -1,28 +0,0 @@ -classdef NonHWTest < matlab.unittest.TestCase - - properties(TestParameter) - rootClasses = {... - {'AD9081',{'Rx','Tx'}},... - {'AD9144',{'Tx'}},... - {'AD9152',{'Tx'}},... - {'AD9467',{'Rx'}},... - {'AD9680',{'Rx'}},... - {'DAQ2',{'Rx','Tx'}},... - {'QuadMxFE',{'Rx','Tx'}}... - }; - end - - methods (Test) - - function call_constructors(testCase,rootClasses) - for trx = rootClasses{2} - sdr = eval(['adi.',rootClasses{1},'.',trx{:},'()']); - testCase.assertEqual(class(sdr),['adi.',rootClasses{1},'.',trx{:}]); - end - end - - end - - -end - diff --git a/test/runDemoTests.m b/test/runDemoTests.m deleted file mode 100755 index e93f62d..0000000 --- a/test/runDemoTests.m +++ /dev/null @@ -1,44 +0,0 @@ -function suite = runDemoTests(name) - -import matlab.unittest.TestRunner; -import matlab.unittest.TestSuite; -import matlab.unittest.plugins.TestReportPlugin; -import matlab.unittest.plugins.XMLPlugin -import matlab.unittest.plugins.DiagnosticsValidationPlugin - -suite = testsuite({'DemoTests'}); -xmlFile = 'BSPDemoTests.xml'; - -if nargin > 0 - xmlFile = [name,'_DemoTests.xml']; - suite = suite.selectIf('Name',['*',name,'*']); -end - - -try - runner = matlab.unittest.TestRunner.withTextOutput('OutputDetail',1); - runner.addPlugin(DiagnosticsValidationPlugin) - - xmlFile = 'BSPDemoTests.xml'; - plugin = XMLPlugin.producingJUnitFormat(xmlFile); - runner.addPlugin(plugin); - - results = runner.run(suite); - - t = table(results); - disp(t); - disp(repmat('#',1,80)); - for test = results - if test.Failed - disp(test.Name); - end - end -catch e - disp(getReport(e,'extended')); - bdclose('all'); - exit(1); -end - -save(['BSPInstallerTest_',datestr(now,'dd_mm_yyyy-HH:MM:SS'),'.mat'],'t'); -bdclose('all'); -exit(any([results.Failed])); diff --git a/test/runNonHWTest.m b/test/runNonHWTest.m deleted file mode 100755 index c3561c1..0000000 --- a/test/runNonHWTest.m +++ /dev/null @@ -1,39 +0,0 @@ -function suite = runNonHWTest() - -import matlab.unittest.TestRunner; -import matlab.unittest.TestSuite; -import matlab.unittest.plugins.TestReportPlugin; -import matlab.unittest.plugins.XMLPlugin -import matlab.unittest.plugins.DiagnosticsValidationPlugin - -suite = testsuite({'NonHWTest'}); -xmlFile = 'BSPDemoTests.xml'; - - -try - runner = matlab.unittest.TestRunner.withTextOutput('OutputDetail',1); - runner.addPlugin(DiagnosticsValidationPlugin) - - xmlFile = 'BSPDemoTests.xml'; - plugin = XMLPlugin.producingJUnitFormat(xmlFile); - runner.addPlugin(plugin); - - results = runner.run(suite); - - t = table(results); - disp(t); - disp(repmat('#',1,80)); - for test = results - if test.Failed - disp(test.Name); - end - end -catch e - disp(getReport(e,'extended')); - bdclose('all'); - exit(1); -end - -save(['BSPInstallerTest_',datestr(now,'dd_mm_yyyy-HH:MM:SS'),'.mat'],'t'); -bdclose('all'); -exit(any([results.Failed]));