From cdd9b9fc5f01cf4306dce4393295bdfe3573c044 Mon Sep 17 00:00:00 2001 From: vandita Date: Fri, 16 Aug 2024 23:09:04 +0530 Subject: [PATCH 01/55] initial --- .circleci/test-deploy.yml | 242 +++--------------- my_genscript.m | 35 +++ src/commands/run-tests.yml | 17 +- src/scripts/run-tests.sh | 69 ++--- tests/BaseClassWithMethodsToBeOverridden.m | 58 +++++ tests/BaseTestCase.m | 69 +++++ tests/ClassTestWithNotATestMethod.m | 15 ++ tests/ClassWithNonAlphaNumericTestTags.m | 64 +++++ tests/Copy_2_of_testModelSim.m | 59 +++++ ...sTagsButHasTestMethodsWithAndWithoutTags.m | 17 ++ tests/HasSealedTestTags.m | 10 + tests/HasUnsealedTestTags.m | 10 + tests/SimpleTestCase.m | 54 ++++ tests/SuperclassHasTestMethodTestTags.m | 10 + tests/SuperclassHasTestMethodWithNoTestTags.m | 10 + tests/dummyClassName.m | 13 + tests/sampleFunctionTest.m | 12 + tests/sampleModel.slx | Bin 0 -> 21064 bytes 18 files changed, 504 insertions(+), 260 deletions(-) create mode 100644 my_genscript.m create mode 100644 tests/BaseClassWithMethodsToBeOverridden.m create mode 100644 tests/BaseTestCase.m create mode 100644 tests/ClassTestWithNotATestMethod.m create mode 100644 tests/ClassWithNonAlphaNumericTestTags.m create mode 100644 tests/Copy_2_of_testModelSim.m create mode 100644 tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m create mode 100644 tests/HasSealedTestTags.m create mode 100644 tests/HasUnsealedTestTags.m create mode 100644 tests/SimpleTestCase.m create mode 100644 tests/SuperclassHasTestMethodTestTags.m create mode 100644 tests/SuperclassHasTestMethodWithNoTestTags.m create mode 100644 tests/dummyClassName.m create mode 100644 tests/sampleFunctionTest.m create mode 100644 tests/sampleModel.slx diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 9a1118a..430ae2c 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -11,8 +11,9 @@ filters: &filters integration-tests: &integration-tests [ orb-tools/pack, - integration-test-install, - integration-test-install-release, + #integration-test-install, + # integration-test-install-release, + #integration-test-install-release-macos-intel-on-arm, integration-test-run-command, integration-test-run-tests ] @@ -22,6 +23,10 @@ executors: machine: image: ubuntu-2204:2024.01.1 macos: + macos: + xcode: 15.1.0 + resource_class: macos.x86.medium.gen2 + macos-arm: macos: xcode: 15.3.0 resource_class: macos.m1.medium.gen1 @@ -124,209 +129,27 @@ jobs: executor: type: executor executor: <> + parallelism: 2 steps: + - checkout # Setup for Integ tests for matlab/run-tests - matlab/install: products: Simulink Simulink_Test Simulink_Coverage Parallel_Computing_Toolbox no-output-timeout: 30m - - run: - command: | - echo 'myvar = 123' > startup.m - mkdir src - echo 'function c=add(a,b);c=a+b;' > src/add.m - mkdir tests - echo "%% StartupTest" > tests/mytest.m - echo "evalin('base','assert(myvar==123)')" >> tests/mytest.m - echo "%% FirstTest" >> tests/mytest.m - echo "assert(add(1,2)==3)" >> tests/mytest.m - mkdir tests/filteredTest - echo "%% simpleTest" >> tests/filteredTest/filtertest.m - echo "assert(2==2)" >> tests/filteredTest/filtertest.m - printf "%% FilterByTag\n" >> tests/filteredTest/TaggedTest.m - printf "classdef (TestTags = {'FILTERED'}) TaggedTest < matlab.unittest.TestCase\n" >> tests/filteredTest/TaggedTest.m - printf "methods (Test)\n function testTag (testCase)\n assert(2==2);\n end\n end\n end" >> tests/filteredTest/TaggedTest.m - shell: bash - - # Integ tests for matlab/run-tests - - matlab/run-tests: - source-folder: src - startup-options: -logfile console.log - - matlab/run-tests: - test-results-junit: test-results/matlab/results.xml - code-coverage-cobertura: code-coverage/coverage.xml - source-folder: src - - matlab/run-tests: - test-results-html: test-results/matlab/html - code-coverage-html: code-coverage/html - source-folder: src - - matlab/run-tests: - test-results-junit: test-results/matlab/filterdtestresult.xml - select-by-folder: tests/filteredTest - - matlab/run-tests: - test-results-junit: test-results/matlab/filterdtagresult.xml - select-by-tag: FILTERED - - - run: - name: Verify tests ran with startup options - command: | - set -e - grep mytest console.log - grep TaggedTest console.log - grep filtertest console.log - rm console.log - shell: bash - - run: - name: Verify test results file was created - command: | - set -e - grep -q FirstTest test-results/matlab/results.xml - shell: bash - - run: - name: Verify HTML test results report was created - command: | - set -e - grep -q FirstTest test-results/matlab/html/index.html - shell: bash - - run: - name: Verify code coverage file was created - command: | - set -e - grep -q add code-coverage/coverage.xml - shell: bash - - run: - name: Verify HTML code coverage report was created - command: | - set -e - grep -q CoverageSummary code-coverage/html/index.html - shell: bash - - run: - name: Verify filtered test results file was created - command: | - set -e - grep -q simpleTest test-results/matlab/filterdtestresult.xml - grep -v FirstTest test-results/matlab/filterdtestresult.xml - shell: bash - - run: - name: Verify filter by tag test results file was created - command: | - set -e - grep -q TaggedTest test-results/matlab/filterdtagresult.xml - grep -v FirstTest test-results/matlab/filterdtagresult.xml - grep -v simpleTest test-results/matlab/filterdtagresult.xml - shell: bash - - - run: - name: Set up diary for logging - command: | - echo 'diary console.log' >> startup.m - shell: bash - - matlab/run-tests: - strict: true - source-folder: src - - run: - name: Verify tests ran with strict checks - command: | - set -e - grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log - rm console.log - shell: bash - - matlab/run-tests: - use-parallel: true - source-folder: src - - run: - name: Verify tests ran in parallel - command: | - set -e - grep -q "parallel pool" console.log - rm console.log - shell: bash - - matlab/run-tests: - output-detail: Detailed - source-folder: src - - run: - name: Verify tests ran with detailed display level for event details - command: | - set -e - grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log - rm console.log - shell: bash + - matlab/run-tests: - logging-level: Detailed - source-folder: src - - run: - name: Verify tests ran with detailed verbosity level for logged diagnostics - command: | - set -e - grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log - rm console.log - shell: bash + select-by-folder: 'tests' + select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" + test-results-junit: results + + # - store_test_results: + # path: results.xml - # Set up for model coverage artifact tests - - when: - condition: - equal: [*linux-executor, <>] - steps: - - run: - command: | - mkdir simtests - cat \<<'_EOF' >> "simtests/createModelAndTest.m" - model = 'simple_model'; - evalin('base','bdclose all'); - if exist('simple_model.slx', 'file') == 0 - new_system(model); - load_system(model); - add_block('built-in/Constant', [model, '/Constant']); - save_system(model); - close_system(model); - sltest.testmanager.clear; - sltest.testmanager.clearResults; - tf = sltest.testmanager.TestFile('test.mldatx'); - cs = tf.getCoverageSettings; - cs.RecordCoverage = true; - cs.MdlRefCoverage = true; - cs.MetricSettings = 'd'; - ts = tf.getTestSuites; - tc = ts.getTestCases; - tc.setProperty('model', model); - tf.saveToFile; - tf.close; - sltest.testmanager.close; - end - disp('Created Model and Simulink Test file to simulate the model.'); - _EOF - shell: bash - - matlab/run-command: - command: cd simtests;createModelAndTest; - - matlab/run-tests: - select-by-folder: simtests - model-coverage-cobertura: model-coverage/coverage.xml - model-coverage-html: model-coverage/html - test-results-pdf: test-results/matlab/pdfresults.pdf - test-results-simulink-test: test-results/matlab/simulinkTest.mldatx - - run: - name: Verify pdf test report file generation - command: | - set -e - test -f test-results/matlab/pdfresults.pdf - shell: bash - - run: - name: Verify Simulink Test result file generation - command: | - set -e - test -f test-results/matlab/simulinkTest.mldatx - shell: bash - - run: - name: Verify model coverage file was created - command: | - set -e - grep -q simple_model model-coverage/coverage.xml - shell: bash - - run: - name: Verify HTML model coverage report was created - command: | - set -e - grep -r "simple_model Coverage Report" --include="*.html" model-coverage/html - shell: bash + # - store_artifacts: + # path: results.xml + # destination: test-results/results.xml + + integration-test-run-build: parameters: @@ -458,28 +281,33 @@ workflows: - integration-test-install: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] + + # - integration-test-install-release: + # matrix: + # parameters: + # executor: [linux] + # release: [R2023bU1] - integration-test-install-release: - matrix: - parameters: - executor: [linux, windows, macos] - release: [R2023bU1] + name: integration-test-install-release-macos-intel-on-arm + executor: macos-arm + release: R2023aU1 - integration-test-run-command: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - integration-test-run-tests: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - integration-test-run-build: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - orb-tools/pack: filters: *filters @@ -493,4 +321,4 @@ workflows: tags: only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ branches: - ignore: /.*/ + ignore: /.*/ \ No newline at end of file diff --git a/my_genscript.m b/my_genscript.m new file mode 100644 index 0000000..0a51198 --- /dev/null +++ b/my_genscript.m @@ -0,0 +1,35 @@ +function scriptText = my_genscript(varargin) + %GENSCRIPT Generate a MATLAB script for running tests. + TestFiles= varargin{35}; + testFilesStr = strjoin(cellfun(@(x) ['''', x, ''''], TestFiles, 'UniformOutput', false), ', '); + scriptText = join([ ... + "import matlab.unittest.TestRunner;", ... + "import matlab.unittest.plugins.XMLPlugin;", ... + "import matlab.unittest.TestSuite;", ... + newline, ... + "suite = testsuite('tests', 'IncludingSubfolders', true);", ... + "TestFiles = {" + testFilesStr + "};", ... + "suites = {};", ... + "for i = 1:length(TestFiles)", ... + " suites{end+1} = TestSuite.fromFile(TestFiles{i});",... + "end", ... + "suite = [suites{:}];", ... + newline, ... + "runner = TestRunner.withTextOutput();", ... + "runner.addPlugin(XMLPlugin.producingJUnitFormat('results.xml'));", ... + newline, ... + "results = runner.run(suite);", ... + "display(results);", ... + newline, ... + "assertSuccess(results);" ... + ], newline); + + % Convert to character array + scriptText = char(scriptText); + disp('Running MATLAB script with contents:'); + disp('__________'); + disp(scriptText); + disp('__________'); + + eval(scriptText); +end \ No newline at end of file diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index dfd7e88..6d4f06c 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -14,6 +14,13 @@ parameters: folders using a colon-separated or semicolon-separated list. type: string default: '' + select-by-files: + description: > + Location of the folder used to select test suite elements, relative to the project root folder. + To create a test suite, MATLAB uses only the tests in the specified folder and its subfolders. + You can specify multiple folders using a colon-separated or semicolon-separated list. + type: string + default: '' select-by-folder: description: > Location of the folder used to select test suite elements, relative to the project root folder. @@ -40,6 +47,11 @@ parameters: parameter requires a Parallel Computing Toolbox license. type: boolean default: false + split-type: + description: > + Option to use CircleCI Test Split feature. + type: string + default: '' output-detail: description: > Amount of event detail displayed for the test run, specified as `none`, `terse`, `concise`, `detailed`, @@ -110,7 +122,6 @@ parameters: https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html. type: string default: "" - steps: - run: name: Run MATLAB tests @@ -128,9 +139,11 @@ steps: PARAM_TEST_RESULTS_PDF: <> PARAM_STRICT: <> PARAM_USE_PARALLEL: <> + PARAM_SPLIT_TYPE: <> + PARAM_SELECT_BY_FILES: <> PARAM_OUTPUT_DETAIL: <> PARAM_LOGGING_LEVEL: <> PARAM_STARTUP_OPTIONS: <> command: <> shell: bash - no_output_timeout: <> + no_output_timeout: <> \ No newline at end of file diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 2cb5698..ea5d25d 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -1,68 +1,36 @@ -#!/bin/bash - -# Exit script if you try to use an uninitialized variable. -set -o nounset - -# Exit script if a statement returns a non-true return value. -set -o errexit - -# Use the error status of the first failure, rather than that of the last item in a pipeline. -set -o pipefail - -sudoIfAvailable() { - if command -v sudo >/dev/null 2>&1; then - sudo -E bash "$@" - else - bash "$@" - fi -} - -stream() { - local url="$1" - if command -v wget >/dev/null 2>&1; then - wget --retry-connrefused --waitretry=5 -qO- "$url" - elif command -v curl >/dev/null 2>&1; then - curl --retry 5 --retry-connrefused --retry-delay 5 -sSL "$url" - else - echo "Could not find wget or curl command" >&2 - return 1 - fi -} - -download() { - local url="$1" - local filename="$2" - if command -v wget >/dev/null 2>&1; then - wget --retry-connrefused --waitretry=5 -qO "$filename" "$url" 2>&1 - elif command -v curl >/dev/null 2>&1; then - curl --retry 5 --retry-connrefused --retry-delay 5 -sSLo "$filename" "$url" +downloadAndRun() { + url=$1 + shift + if [[ -x $(command -v sudo) ]]; then + curl -sfL $url | sudo -E bash -s -- "$@" else - echo "Could not find wget or curl command" >&2 - return 1 + curl -sfL $url | bash -s -- "$@" fi } tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'run-tests') # install run-matlab-command -stream https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh | sudoIfAvailable -s -- "${tmpdir}/bin" +downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh "${tmpdir}/bin" # download script generator -download https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip "${tmpdir}/scriptgen.zip" +curl -sfLo "${tmpdir}/scriptgen.zip" https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip unzip -qod "${tmpdir}/scriptgen" "${tmpdir}/scriptgen.zip" # form OS appropriate paths for MATLAB os=$(uname) -gendir="$tmpdir" +gendir=$tmpdir binext="" -if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then +if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi +echo "Command to be executed: $PARAM_SELECT_BY_FILES" +TESTFILES=$(eval echo "$PARAM_SELECT_BY_FILES") +TESTFILES="{${TESTFILES}}" "${tmpdir}/bin/run-matlab-command$binext" "\ - addpath('${gendir}/scriptgen');\ - testScript = genscript('Test',\ + testScript = my_genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ @@ -75,10 +43,9 @@ fi 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ + 'SplitType', '${PARAM_SPLIT_TYPE}',\ 'UseParallel',${PARAM_USE_PARALLEL},\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ - 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ - disp('Running MATLAB script with contents:');\ - disp(testScript.Contents);\ - fprintf('__________\n\n');\ - run(testScript);" $PARAM_STARTUP_OPTIONS + 'LoggingLevel','${PARAM_LOGGING_LEVEL}',\ + 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS + \ No newline at end of file diff --git a/tests/BaseClassWithMethodsToBeOverridden.m b/tests/BaseClassWithMethodsToBeOverridden.m new file mode 100644 index 0000000..e4b024f --- /dev/null +++ b/tests/BaseClassWithMethodsToBeOverridden.m @@ -0,0 +1,58 @@ +classdef BaseClassWithMethodsToBeOverridden < matlab.unittest.TestCase + + % Because MCOS returns methods in the reverse of the order they're + % defined in, we define some of the methods to be overridden first and + % some of the methods to be overridden second. Because of the + % subclass/superclass relationship, this order will not matter; the + % class hierarchy will impose a stronger constraint that superclass + % setup methods are called first. + + % Copyright 2014 The MathWorks, Inc. + + methods (TestClassSetup) + % Method to be overridden defined first + function commonTestClassSetup(testCase) + testCase.log('commonTestClassSetup'); + end + function baseTestClassSetup(testCase) + testCase.log('baseTestClassSetup'); + end + end + + methods (TestClassTeardown) + % Method to be overridden defined second + function baseTestClassTeardown(testCase) + testCase.log('baseTestClassTeardown'); + end + function commonTestClassTeardown(testCase) + testCase.log('commonTestClassTeardown'); + end + end + + methods (TestMethodSetup) + % Method to be overridden defined first + function commonTestMethodSetup(testCase) + testCase.log('commonTestMethodSetup'); + end + function baseTestMethodSetup(testCase) + testCase.log('baseTestMethodSetup'); + end + end + + methods (TestMethodTeardown) + % Method to be overridden defined second + function baseTestMethodTeardown(testCase) + testCase.log('baseTestMethodTeardown'); + end + function commonTestMethodTeardown(testCase) + testCase.log('commonTestMethodTeardown'); + end + end + + methods (Test) + function test1(testCase) + testCase.log('test1'); + end + end +end + diff --git a/tests/BaseTestCase.m b/tests/BaseTestCase.m new file mode 100644 index 0000000..fc68822 --- /dev/null +++ b/tests/BaseTestCase.m @@ -0,0 +1,69 @@ +classdef BaseTestCase < matlab.unittest.TestCase + % TestCase base class meant to ensure that method order respects class hierarchies + % TestCase + + + + + % Copyright 2011 The MathWorks, Inc. + methods(TestClassSetup) + function baseTestClassSetup(testCase) + disp baseTestClassSetup + testCase.addTeardown(@disp, 'baseTestClassSetupAddTeardown'); + end + function baseTestClassSetup2(testCase) + disp baseTestClassSetup + testCase.addTeardown(@disp, 'baseTestClassSetupAddTeardown'); + end + end + methods(TestClassTeardown) + function baseTestClassTeardown(testCase) + disp baseTestClassTeardown + testCase.addTeardown(@disp, 'baseTestClassTeardownAddTeardown'); + end + function baseTestClassTeardown2(testCase) + disp baseTestClassTeardown + testCase.addTeardown(@disp, 'baseTestClassTeardownAddTeardown'); + end + end + methods(TestMethodSetup) + function baseTestMethodSetup(testCase) + disp baseTestMethodSetup + testCase.addTeardown(@disp, 'baseTestMethodSetupAddTeardown'); + end + function baseTestMethodSetup2(testCase) + disp baseTestMethodSetup + testCase.addTeardown(@disp, 'baseTestMethodSetupAddTeardown'); + end + end + methods(TestMethodTeardown) + function baseTestMethodTeardown(testCase) + disp baseTestMethodTeardown + testCase.addTeardown(@disp, 'baseTestMethodTeardownAddTeardown'); + end + function baseTestMethodTeardown2(testCase) + disp baseTestMethodTeardown + testCase.addTeardown(@disp, 'baseTestMethodTeardownAddTeardown'); + end + end + + % lets have two tests to ensure correct invocation counts of class level & + % method level setup + methods(Test) + + function baseTest(testCase) + disp baseTest + testCase.addTeardown(@disp, 'baseTestAddTeardown'); + end + + function baseTest2(testCase) + % Disp the same as the other test since test order is not defined + disp baseTest + testCase.addTeardown(@disp, 'baseTestAddTeardown'); + end + + end + + +end + diff --git a/tests/ClassTestWithNotATestMethod.m b/tests/ClassTestWithNotATestMethod.m new file mode 100644 index 0000000..bf02f98 --- /dev/null +++ b/tests/ClassTestWithNotATestMethod.m @@ -0,0 +1,15 @@ +classdef ClassTestWithNotATestMethod < matlab.unittest.TestCase + + % Copyright 2017 The MathWorks, Inc. + + methods(Test) + function test1(~) + end + end + + methods + function notATest(~) + end + end + +end \ No newline at end of file diff --git a/tests/ClassWithNonAlphaNumericTestTags.m b/tests/ClassWithNonAlphaNumericTestTags.m new file mode 100644 index 0000000..5a5adb0 --- /dev/null +++ b/tests/ClassWithNonAlphaNumericTestTags.m @@ -0,0 +1,64 @@ +classdef (TestTags = {''''}) ClassWithNonAlphaNumericTestTags < matlab.unittest.TestCase + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'*foo*'}) + function test1(~) + end + end + + methods (Test, TestTags = {'bar$'}) + function test2(~) + end + end + + methods (Test, TestTags = {'^'}) + function test3(~) + end + end + + methods (Test, TestTags = {'$'}) + function test4(~) + end + end + + methods (Test, TestTags = {'foo*'}) + function test5(~) + end + end + + methods (Test, TestTags = {'<>'}) + function test6(~) + end + end + + methods (Test, TestTags = {'>'}) + function test7(~) + end + end + + methods (Test, TestTags = {''}) + function test8(~) + end + end + + methods (Test, TestTags = {'.*'}) + function test9(~) + end + end + + methods (Test, TestTags = {'*'}) + function test10(~) + end + end + + methods (Test, TestTags = {''}) + function test12(~) + end + end +end \ No newline at end of file diff --git a/tests/Copy_2_of_testModelSim.m b/tests/Copy_2_of_testModelSim.m new file mode 100644 index 0000000..b47ceda --- /dev/null +++ b/tests/Copy_2_of_testModelSim.m @@ -0,0 +1,59 @@ +classdef Copy_2_of_testModelSim < matlab.unittest.TestCase + %TESTMODELSIM Summary of this class goes here + % Detailed explanation goes here + properties + temp; + ogDir; + end + methods(TestClassSetup) + function testClassSetup(testCase) + sltest.testmanager.clear; + sltest.testmanager.clearResults; + testCase.ogDir = pwd; + testCase.temp = fullfile(pwd, 'temp'); + mkdir(testCase.temp); + matlab.unittest.fixtures.PathFixture(testCase.temp); + cd(testCase.temp); + end + end + + methods(TestClassTeardown) + function teardown(testCase) + sltest.testmanager.clear; + sltest.testmanager.clearResults; + sltest.testmanager.close; + A = dir(testCase.temp); + for k = 3:length(A) + delete([testCase.temp filesep A(k).name]) + end + cd(testCase.ogDir); + rmdir(testCase.temp); + end + end + + methods(Test) + function testSquare(testCase) + %TESTCALC Construct an instance of this class + % Detailed explanation goes here + + % Introduce a random delay between 1 and 5 seconds + pause(3); + + % Change directory to the root where the model is located + rootDir = fileparts(testCase.ogDir); % Assuming the root is one level up from the test directory + cd(rootDir); + + tf = sltest.testmanager.TestFile('test.mldatx'); + ts = tf.getTestSuites; + tc = ts.getTestCases; + tc.setProperty('model', 'sampleModel.slx'); + captureBaselineCriteria(tc,'baseline_API.mat',true); + res = tc.run(); + + % Change back to the original directory + cd(testCase.ogDir); + + testCase.verifyEqual(res.Outcome, sltest.testmanager.TestResultOutcomes.Passed); + end + end +end \ No newline at end of file diff --git a/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m b/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m new file mode 100644 index 0000000..f1b2259 --- /dev/null +++ b/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m @@ -0,0 +1,17 @@ +classdef HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags < matlab.unittest.TestCase + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'a', 'b'}) + function test1(~) + end + end + + methods (Test) + function testNoTags1(~) + end + function testNoTags2(~) + end + end + +end \ No newline at end of file diff --git a/tests/HasSealedTestTags.m b/tests/HasSealedTestTags.m new file mode 100644 index 0000000..390087a --- /dev/null +++ b/tests/HasSealedTestTags.m @@ -0,0 +1,10 @@ +classdef HasSealedTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Sealed, Test, TestTags = {'Sealed'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/HasUnsealedTestTags.m b/tests/HasUnsealedTestTags.m new file mode 100644 index 0000000..c89b46a --- /dev/null +++ b/tests/HasUnsealedTestTags.m @@ -0,0 +1,10 @@ +classdef HasUnsealedTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'Unsealed'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/SimpleTestCase.m b/tests/SimpleTestCase.m new file mode 100644 index 0000000..7aa5e4c --- /dev/null +++ b/tests/SimpleTestCase.m @@ -0,0 +1,54 @@ +classdef SimpleTestCase < matlab.unittest.TestCase + % Basic simple testcase class meant to ensure that TestRunner correctly + % runs TestCase tests + + % Copyright 2012 The MathWorks, Inc. + methods(TestClassSetup) + function beforeClass(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestClassTeardown) + function afterClass(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestMethodSetup) + function before(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestMethodTeardown) + function after(testCase) + testCase.callAllPassingQualifications(); + end + end + + % lets have two tests to ensure correct invocation counts of class level & + % method level setup + methods(Test) + + function test1(testCase) + testCase.callAllPassingQualifications(); + end + + function test2(testCase) + testCase.callAllPassingQualifications(); + end + end + + methods + function helperMethod(~) + end + function callAllPassingQualifications(testCase) + testCase.verifyTrue(true); + testCase.assertTrue(true); + testCase.fatalAssertTrue(true); + testCase.assumeTrue(true); + end + + end + + +end + diff --git a/tests/SuperclassHasTestMethodTestTags.m b/tests/SuperclassHasTestMethodTestTags.m new file mode 100644 index 0000000..d6a4891 --- /dev/null +++ b/tests/SuperclassHasTestMethodTestTags.m @@ -0,0 +1,10 @@ +classdef SuperclassHasTestMethodTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'Original'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/SuperclassHasTestMethodWithNoTestTags.m b/tests/SuperclassHasTestMethodWithNoTestTags.m new file mode 100644 index 0000000..c43bb34 --- /dev/null +++ b/tests/SuperclassHasTestMethodWithNoTestTags.m @@ -0,0 +1,10 @@ +classdef SuperclassHasTestMethodWithNoTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/dummyClassName.m b/tests/dummyClassName.m new file mode 100644 index 0000000..79c6eee --- /dev/null +++ b/tests/dummyClassName.m @@ -0,0 +1,13 @@ +classdef dummyClassName < matlab.unittest.TestCase + + % Copyright 2019 The MathWorks, Inc. + + methods (Test) + + function test2(~) + disp('calling from folder A'); + end + + end + +end diff --git a/tests/sampleFunctionTest.m b/tests/sampleFunctionTest.m new file mode 100644 index 0000000..d0c1b84 --- /dev/null +++ b/tests/sampleFunctionTest.m @@ -0,0 +1,12 @@ +function tests = sampleFunctionTest + +% Copyright 2021 The MathWorks, Inc. + +tests = functiontests(localfunctions); +end + +function testFunction1(~) +end + +function testFunction2(~) +end diff --git a/tests/sampleModel.slx b/tests/sampleModel.slx new file mode 100644 index 0000000000000000000000000000000000000000..d4b10b0e64ffc761bd7b29d3718fc7944ae057b7 GIT binary patch literal 21064 zcmaHzV{~Qj^5C$+HddQ~qdZ309{-KxON9(#F%h3#i^`o4h~}2*&Pk^0N!0gmA6v!WN?sZ^9ptpruJHX+}a77^s;K8=EUD}y&u;$=_+#M@QLw3 z;Ex8H5&~49U2I&~8_5@+!(a&NiE6{4RGxEOC&XYEly#2Qv}26$DxEjGl-9#JF-R0e zn5`2>rnj}XiVoS1dmGKRw?Rz%C3Lrx#5mwG*+m25v1&!cwZYNL-}qj$IWa#KQ|;F= zLw*v5+La)?;l_^8ZhiM+2m&eomsg~AOpIFo^$K%vARySkUSZ$_uyJN&_}6bq@`U^V z6Ox!8`F*z|3KGa-Q&!+2I7;9>@PcWkW&~k_-uf3mLO2Iv>$ypW?o5}2J4#%cjy~j0 zIeZccxg%BrkQjwCMP#xMy}m>o85712gl4q#M0^|+S;_;%Uws|eDl7mHa}rr;Y3n7{ z5(?UcAm|d2z2uZdykFjn;A-(|ibQgSrvc|JkY`>H4}9cNPE%U}5f>X$wb)G*Ep{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OxC#V-c0bo*yL*4(?xw4AuB%geT$p?sT+?;6SXB6z3#UQn4m z&|jpWa2WaaT&d>v^G~`napaQjgPt-8x5#GZw+I;pie^!Noe?XOewQAm@c|MV@IV6J zue)MF+X@0IraphTcw~V9&_HS7%0<9>=#N&|DS;P)K0ok<*^r?18?HYf2(+kyL7I>X zZ5hPPum(hdW-l;mH{|^BRn#i$7mx}1r@%}tNagueCg7$5Qb9M81?u8wALLK6OkL$o z0y03!_rmpyQzs|3;vfVC;2;LnA;XvsaV{8Gl?;MF^(zdzDX{|d4J|B41QnPt(H~j@ z%SZhp@ry3@lO7X9g6c*X=^?cOxmxQ8LO_8J49SBU>*csWxetf|UsZ)MicqP)j9I?1 zPcN>55U{I@42PRD$t{^Q{ zo?N;ikO(#}Ffqo63-N2M42T7L4j8Ly%mw?E4g{ovg+EN?aH9fk07wH1cbInmUtD5b xUB-hju=0js()+o*@&Ij%D3)M9WAq(x!lI9EF{sxO5_p1N^ literal 0 HcmV?d00001 From 818e23cee0f59e3e5b7604915831f89a9f6d278a Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Fri, 16 Aug 2024 23:19:49 +0530 Subject: [PATCH 02/55] initial --- src/commands/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 6d4f06c..2c722c8 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -146,4 +146,4 @@ steps: PARAM_STARTUP_OPTIONS: <> command: <> shell: bash - no_output_timeout: <> \ No newline at end of file + no_output_timeout: <> From 4a359f1e436f98009ea5eedb96f5c6425b0c3bb0 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Fri, 16 Aug 2024 23:43:36 +0530 Subject: [PATCH 03/55] timing1 --- .circleci/test-deploy.yml | 12 ++++++------ my_genscript.m | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 430ae2c..479584c 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,15 +139,15 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" + select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=timings| awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" test-results-junit: results - # - store_test_results: - # path: results.xml + - store_test_results: + path: results.xml - # - store_artifacts: - # path: results.xml - # destination: test-results/results.xml + - store_artifacts: + path: results.xml + destination: test-results/results.xml diff --git a/my_genscript.m b/my_genscript.m index 0a51198..0b31373 100644 --- a/my_genscript.m +++ b/my_genscript.m @@ -7,7 +7,7 @@ "import matlab.unittest.plugins.XMLPlugin;", ... "import matlab.unittest.TestSuite;", ... newline, ... - "suite = testsuite('tests', 'IncludingSubfolders', true);", ... + "suite = testsuite(pwd, 'IncludingSubfolders', true);", ... "TestFiles = {" + testFilesStr + "};", ... "suites = {};", ... "for i = 1:length(TestFiles)", ... From 44d2b9e726f4a9eeab270ee3645b2b0606437899 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Fri, 16 Aug 2024 23:57:04 +0530 Subject: [PATCH 04/55] timing2 --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index ea5d25d..dcfdedf 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -47,5 +47,5 @@ TESTFILES="{${TESTFILES}}" 'UseParallel',${PARAM_USE_PARALLEL},\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}',\ - 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS + 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS \ No newline at end of file From 4afa2556a4d8d25c3c808e6de9c05b7016318697 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 20:32:37 +0530 Subject: [PATCH 05/55] filename --- .circleci/test-deploy.yml | 3 ++- src/commands/run-tests.yml | 8 ++++++++ src/scripts/run-tests.sh | 9 +++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 479584c..35c29cd 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,8 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=timings| awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') + # select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=timings| awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" test-results-junit: results - store_test_results: diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 2c722c8..9665630 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -21,6 +21,13 @@ parameters: You can specify multiple folders using a colon-separated or semicolon-separated list. type: string default: '' + select-by-name: + description: > + Location of the folder used to select test suite elements, relative to the project root folder. + To create a test suite, MATLAB uses only the tests in the specified folder and its subfolders. + You can specify multiple folders using a colon-separated or semicolon-separated list. + type: string + default: '' select-by-folder: description: > Location of the folder used to select test suite elements, relative to the project root folder. @@ -141,6 +148,7 @@ steps: PARAM_USE_PARALLEL: <> PARAM_SPLIT_TYPE: <> PARAM_SELECT_BY_FILES: <> + PARAM_SELECT_BY_NAME: <> PARAM_OUTPUT_DETAIL: <> PARAM_LOGGING_LEVEL: <> PARAM_STARTUP_OPTIONS: <> diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index dcfdedf..976bea2 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -25,9 +25,14 @@ if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi -echo "Command to be executed: $PARAM_SELECT_BY_FILES" -TESTFILES=$(eval echo "$PARAM_SELECT_BY_FILES") +# echo "Command to be executed: $PARAM_SELECT_BY_FILES" +# TESTFILES=$(eval echo "$PARAM_SELECT_BY_FILES") +# TESTFILES="{${TESTFILES}}" + +echo "Command to be executed 2: $PARAM_SELECT_BY_NAME" +TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" +echo "TestFiles are: $TESTFILES" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = my_genscript('Test',\ From 8c6516d4823227534bab4bf9bd85c722dc347009 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 20:35:02 +0530 Subject: [PATCH 06/55] filename --- .circleci/test-deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 35c29cd..a9f1c8d 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -140,8 +140,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') - # select-by-files: "$(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=timings| awk '{printf \"\\x27%s\\x27, \", $0}' | sed 's/,$//')" - test-results-junit: results + test-results-junit: results - store_test_results: path: results.xml From 9f3f3e00dd25674c53ec0306ee43b1975683a3c7 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 20:37:30 +0530 Subject: [PATCH 07/55] filename --- src/scripts/run-tests.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 976bea2..ac4202f 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -25,15 +25,10 @@ if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi -# echo "Command to be executed: $PARAM_SELECT_BY_FILES" -# TESTFILES=$(eval echo "$PARAM_SELECT_BY_FILES") -# TESTFILES="{${TESTFILES}}" - echo "Command to be executed 2: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" echo "TestFiles are: $TESTFILES" - "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = my_genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ From 2152c68f67556c88648ac43d73bfb270eb8b99ab Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 21:50:20 +0530 Subject: [PATCH 08/55] filename --- src/scripts/run-tests.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index ac4202f..b901b86 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -2,33 +2,35 @@ downloadAndRun() { url=$1 shift if [[ -x $(command -v sudo) ]]; then - curl -sfL $url | sudo -E bash -s -- "$@" + curl -sfL "$url" | sudo -E bash -s -- "$@" else - curl -sfL $url | bash -s -- "$@" + curl -sfL "$url" | bash -s -- "$@" fi } tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'run-tests') -# install run-matlab-command +# Install run-matlab-command downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh "${tmpdir}/bin" -# download script generator +# Download script generator curl -sfLo "${tmpdir}/scriptgen.zip" https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip unzip -qod "${tmpdir}/scriptgen" "${tmpdir}/scriptgen.zip" -# form OS appropriate paths for MATLAB +# Form OS-appropriate paths for MATLAB os=$(uname) gendir=$tmpdir binext="" -if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then +if [[ $os == CYGWIN* || $os == MINGW* || $os == MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi + echo "Command to be executed 2: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" echo "TestFiles are: $TESTFILES" + "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = my_genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ @@ -43,9 +45,8 @@ echo "TestFiles are: $TESTFILES" 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ - 'SplitType', '${PARAM_SPLIT_TYPE}',\ + 'SplitType','${PARAM_SPLIT_TYPE}',\ 'UseParallel',${PARAM_USE_PARALLEL},\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}',\ - 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS - \ No newline at end of file + 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS \ No newline at end of file From 2f1d0c707ab9a2b91570806d49202b67bbfc3d26 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 21:56:52 +0530 Subject: [PATCH 09/55] filename --- src/scripts/run-tests.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index b901b86..920bdda 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -2,34 +2,32 @@ downloadAndRun() { url=$1 shift if [[ -x $(command -v sudo) ]]; then - curl -sfL "$url" | sudo -E bash -s -- "$@" + curl -sfL $url | sudo -E bash -s -- "$@" else - curl -sfL "$url" | bash -s -- "$@" + curl -sfL $url | bash -s -- "$@" fi } tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'run-tests') -# Install run-matlab-command +# install run-matlab-command downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh "${tmpdir}/bin" -# Download script generator +# download script generator curl -sfLo "${tmpdir}/scriptgen.zip" https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip unzip -qod "${tmpdir}/scriptgen" "${tmpdir}/scriptgen.zip" -# Form OS-appropriate paths for MATLAB +# form OS appropriate paths for MATLAB os=$(uname) gendir=$tmpdir binext="" -if [[ $os == CYGWIN* || $os == MINGW* || $os == MSYS* ]]; then +if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi - -echo "Command to be executed 2: $PARAM_SELECT_BY_NAME" +echo "Command to be executed: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" -echo "TestFiles are: $TESTFILES" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = my_genscript('Test',\ @@ -45,8 +43,9 @@ echo "TestFiles are: $TESTFILES" 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ - 'SplitType','${PARAM_SPLIT_TYPE}',\ + 'SplitType', '${PARAM_SPLIT_TYPE}',\ 'UseParallel',${PARAM_USE_PARALLEL},\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}',\ - 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS \ No newline at end of file + 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS + \ No newline at end of file From 682d5fc0217332c3ec3a21558995ab925f4df6a1 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 19 Aug 2024 22:02:01 +0530 Subject: [PATCH 10/55] filename --- src/commands/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 9665630..73e869e 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -21,13 +21,13 @@ parameters: You can specify multiple folders using a colon-separated or semicolon-separated list. type: string default: '' - select-by-name: + select-by-name: description: > Location of the folder used to select test suite elements, relative to the project root folder. To create a test suite, MATLAB uses only the tests in the specified folder and its subfolders. You can specify multiple folders using a colon-separated or semicolon-separated list. type: string - default: '' + default: '' select-by-folder: description: > Location of the folder used to select test suite elements, relative to the project root folder. From 5bc3edb77922a19b8d3b06d37a9ac3463602ff7d Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 10:04:38 +0530 Subject: [PATCH 11/55] filename --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 920bdda..e955536 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -28,7 +28,7 @@ fi echo "Command to be executed: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" - +echo "TESTFILES ARE: $TESTFILES" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = my_genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ From cb6cf9077cd57d176b0e061d9c29522f734411f0 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 14:07:51 +0530 Subject: [PATCH 12/55] filename --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index a9f1c8d..5c7c299 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') + select-by-name: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1)}' | paste -sd, -)" test-results-junit: results - store_test_results: From 9f5c3c44ef81980456b775456ae161d25754d823 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 14:19:50 +0530 Subject: [PATCH 13/55] filename1 --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 5c7c299..f2dfbe0 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1)}' | paste -sd, -)" + select-by-name: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -)" test-results-junit: results - store_test_results: From c69d97833d054a3c19ffc2b4c38e24ec58692852 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 14:26:58 +0530 Subject: [PATCH 14/55] filename --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index f2dfbe0..31a6a5a 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: "$(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -)" + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -) test-results-junit: results - store_test_results: From 476766194a73d6997f7cac2a750b5910da4d04c5 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 14:39:23 +0530 Subject: [PATCH 15/55] filename --- ...erturaAndHTMLCodePluginExpressionBuilder.m | 27 ++ ...dHTMLCodePluginParallelExpressionBuilder.m | 5 + ...AndHTMLCodePluginSerialExpressionBuilder.m | 5 + ...eateCoberturaCodePluginExpressionBuilder.m | 21 ++ ...rturaCodePluginParallelExpressionBuilder.m | 5 + ...berturaCodePluginSerialExpressionBuilder.m | 5 + ...ateCoberturaModelPluginExpressionBuilder.m | 15 ++ ...turaModelPluginParallelExpressionBuilder.m | 5 + ...erturaModelPluginSerialExpressionBuilder.m | 5 + ...ateFailOnWarningsPluginExpressionBuilder.m | 4 + ...nWarningsPluginParallelExpressionBuilder.m | 5 + ...lOnWarningsPluginSerialExpressionBuilder.m | 5 + .../CreateHTMLCodePluginExpressionBuilder.m | 20 ++ ...eHTMLCodePluginParallelExpressionBuilder.m | 4 + ...ateHTMLCodePluginSerialExpressionBuilder.m | 4 + .../CreateHTMLModelPluginExpressionBuilder.m | 14 + ...HTMLModelPluginParallelExpressionBuilder.m | 4 + ...teHTMLModelPluginSerialExpressionBuilder.m | 4 + ...ateHTMLTestReportPluginExpressionBuilder.m | 14 + ...estReportPluginParallelExpressionBuilder.m | 4 + ...LTestReportPluginSerialExpressionBuilder.m | 4 + ...teHasBaseFolderSelectorExpressionBuilder.m | 14 + .../CreateHasTagSelectorExpressionBuilder.m | 15 ++ .../CreateJUnitPluginExpressionBuilder.m | 15 ++ ...eateJUnitPluginParallelExpressionBuilder.m | 5 + ...CreateJUnitPluginSerialExpressionBuilder.m | 5 + .../+test/CreatePDFPluginExpressionBuilder.m | 15 ++ ...CreatePDFPluginParallelExpressionBuilder.m | 5 + .../CreatePDFPluginSerialExpressionBuilder.m | 5 + ...reateSimulinkTestPluginExpressionBuilder.m | 4 + ...ulinkTestPluginParallelExpressionBuilder.m | 5 + ...imulinkTestPluginSerialExpressionBuilder.m | 5 + ...mulinkTestResultsPluginExpressionBuilder.m | 15 ++ ...stResultsPluginParallelExpressionBuilder.m | 5 + ...TestResultsPluginSerialExpressionBuilder.m | 5 + .../+test/CreateTAPPluginExpressionBuilder.m | 15 ++ ...CreateTAPPluginParallelExpressionBuilder.m | 5 + .../CreateTAPPluginSerialExpressionBuilder.m | 5 + .../+test/CreateTestFilesExpressionBuilder.m | 14 + ...dHTMLCodePluginParallelExpressionBuilder.m | 17 ++ ...AndHTMLCodePluginSerialExpressionBuilder.m | 25 ++ ...rturaCodePluginParallelExpressionBuilder.m | 17 ++ ...berturaCodePluginSerialExpressionBuilder.m | 24 ++ ...turaModelPluginParallelExpressionBuilder.m | 19 ++ ...erturaModelPluginSerialExpressionBuilder.m | 25 ++ ...nWarningsPluginParallelExpressionBuilder.m | 17 ++ ...lOnWarningsPluginSerialExpressionBuilder.m | 21 ++ ...eHTMLCodePluginParallelExpressionBuilder.m | 17 ++ ...ateHTMLCodePluginSerialExpressionBuilder.m | 24 ++ ...HTMLModelPluginParallelExpressionBuilder.m | 19 ++ ...teHTMLModelPluginSerialExpressionBuilder.m | 34 +++ ...estReportPluginParallelExpressionBuilder.m | 16 ++ ...LTestReportPluginSerialExpressionBuilder.m | 20 ++ ...teHasBaseFolderSelectorExpressionBuilder.m | 36 +++ .../CreateHasTagSelectorExpressionBuilder.m | 23 ++ ...eateJUnitPluginParallelExpressionBuilder.m | 17 ++ ...CreateJUnitPluginSerialExpressionBuilder.m | 21 ++ ...CreatePDFPluginParallelExpressionBuilder.m | 19 ++ .../CreatePDFPluginSerialExpressionBuilder.m | 23 ++ ...DFPluginWithMacParallelExpressionBuilder.m | 17 ++ ...ePDFPluginWithMacSerialExpressionBuilder.m | 21 ++ ...ulinkTestPluginParallelExpressionBuilder.m | 19 ++ ...imulinkTestPluginSerialExpressionBuilder.m | 23 ++ ...stResultsPluginParallelExpressionBuilder.m | 19 ++ ...TestResultsPluginSerialExpressionBuilder.m | 23 ++ ...gOriginalFormatParallelExpressionBuilder.m | 33 +++ ...ingOriginalFormatSerialExpressionBuilder.m | 32 +++ ...nUsingVersion13ParallelExpressionBuilder.m | 32 +++ ...ginUsingVersion13SerialExpressionBuilder.m | 23 ++ .../+test/CreateTestFilesExpressionBuilder.m | 26 ++ .../+internal/+mixin/EnvironmentDependent.m | 41 +++ +scriptgen/+internal/+mixin/PathDependent.m | 24 ++ .../+internal/+mixin/PlatformDependent.m | 25 ++ +scriptgen/+internal/+mixin/Preferable.m | 75 ++++++ +scriptgen/+internal/+mixin/SetGet.m | 35 +++ .../+internal/+mixin/VersionDependent.m | 41 +++ .../+internal/+scripts/TestScriptBuilder.m | 250 ++++++++++++++++++ ...ssertNoFailuresWithAssertSequenceBuilder.m | 18 ++ ...FailuresWithAssertSuccessSequenceBuilder.m | 18 ++ .../+test/CreateTestRunnerSequenceBuilder.m | 214 +++++++++++++++ .../+test/CreateTestSuiteSequenceBuilder.m | 67 +++++ ...singWithTextOutputDetailStatementBuilder.m | 30 +++ ...unnerUsingWithTextOutputStatementBuilder.m | 25 ++ ...gWithTextOutputVerbosityStatementBuilder.m | 41 +++ ...TestSuiteUsingFromFolderStatementBuilder.m | 21 ++ ...eTestSuiteUsingTestsuiteStatementBuilder.m | 19 ++ +scriptgen/+internal/CodeBuilderFactory.m | 40 +++ +scriptgen/+internal/CodeBuilderLocator.m | 55 ++++ +scriptgen/+internal/MissingCode.m | 10 + +scriptgen/+internal/MissingCodeBuilder.m | 10 + +scriptgen/+internal/PrunedStackException.m | 49 ++++ +scriptgen/+internal/Version.m | 118 +++++++++ +scriptgen/+internal/isAbsolutePath.m | 8 + +scriptgen/+internal/numericVerbosity.m | 20 ++ +scriptgen/+internal/unquoteText.m | 11 + +scriptgen/+internal/validateText.m | 9 + +scriptgen/+internal/validateTextArray.m | 7 + +scriptgen/+internal/validateTextScalar.m | 7 + .../+internal/validateVerbosityScalar.m | 9 + +scriptgen/+scripts/TestScriptBuilder.m | 122 +++++++++ .../+test/AssertNoFailuresSequenceBuilder.m | 20 ++ .../+test/CreateTestRunnerSequenceBuilder.m | 109 ++++++++ .../+test/CreateTestSuiteSequenceBuilder.m | 39 +++ .../+test/CreateTestRunnerStatementBuilder.m | 27 ++ .../+test/CreateTestSuiteStatementBuilder.m | 15 ++ +scriptgen/Code.m | 38 +++ +scriptgen/CodeBuilder.m | 18 ++ +scriptgen/CodeProvider.m | 128 +++++++++ +scriptgen/CodeWriter.m | 64 +++++ +scriptgen/Expression.m | 42 +++ +scriptgen/FileOutput.m | 22 ++ +scriptgen/OutputStream.m | 14 + +scriptgen/Script.m | 83 ++++++ +scriptgen/Sequence.m | 43 +++ +scriptgen/Statement.m | 55 ++++ +scriptgen/TextOutput.m | 14 + genscript.m | 26 ++ src/scripts/run-tests.sh | 2 +- 118 files changed, 3215 insertions(+), 1 deletion(-) create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m create mode 100644 +scriptgen/+internal/+mixin/EnvironmentDependent.m create mode 100644 +scriptgen/+internal/+mixin/PathDependent.m create mode 100644 +scriptgen/+internal/+mixin/PlatformDependent.m create mode 100644 +scriptgen/+internal/+mixin/Preferable.m create mode 100644 +scriptgen/+internal/+mixin/SetGet.m create mode 100644 +scriptgen/+internal/+mixin/VersionDependent.m create mode 100644 +scriptgen/+internal/+scripts/TestScriptBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m create mode 100644 +scriptgen/+internal/CodeBuilderFactory.m create mode 100644 +scriptgen/+internal/CodeBuilderLocator.m create mode 100644 +scriptgen/+internal/MissingCode.m create mode 100644 +scriptgen/+internal/MissingCodeBuilder.m create mode 100644 +scriptgen/+internal/PrunedStackException.m create mode 100644 +scriptgen/+internal/Version.m create mode 100644 +scriptgen/+internal/isAbsolutePath.m create mode 100644 +scriptgen/+internal/numericVerbosity.m create mode 100644 +scriptgen/+internal/unquoteText.m create mode 100644 +scriptgen/+internal/validateText.m create mode 100644 +scriptgen/+internal/validateTextArray.m create mode 100644 +scriptgen/+internal/validateTextScalar.m create mode 100644 +scriptgen/+internal/validateVerbosityScalar.m create mode 100644 +scriptgen/+scripts/TestScriptBuilder.m create mode 100644 +scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m create mode 100644 +scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m create mode 100644 +scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m create mode 100644 +scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m create mode 100644 +scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m create mode 100644 +scriptgen/Code.m create mode 100644 +scriptgen/CodeBuilder.m create mode 100644 +scriptgen/CodeProvider.m create mode 100644 +scriptgen/CodeWriter.m create mode 100644 +scriptgen/Expression.m create mode 100644 +scriptgen/FileOutput.m create mode 100644 +scriptgen/OutputStream.m create mode 100644 +scriptgen/Script.m create mode 100644 +scriptgen/Sequence.m create mode 100644 +scriptgen/Statement.m create mode 100644 +scriptgen/TextOutput.m create mode 100644 genscript.m diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m new file mode 100644 index 0000000..b676ca4 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m @@ -0,0 +1,27 @@ +classdef CreateCoberturaAndHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2022 The MathWorks, Inc. + + properties + CoberturaFilePath = '''coverage.xml''' + HTMLFolderPath = '''htmlCodeCoverage''' + Source = {'pwd'} + end + + methods + function set.CoberturaFilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaFilePath = value; + end + + function set.HTMLFolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLFolderPath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..7ebedb1 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..c40200a --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m new file mode 100644 index 0000000..b9895ae --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateCoberturaCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''coverage.xml''' + Source = {'pwd'} + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..fc21b3f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..babd2ad --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m new file mode 100644 index 0000000..d28898e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateCoberturaModelPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''coverage.xml''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f5a05f7 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaModelPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..225b946 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaModelPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m new file mode 100644 index 0000000..cd1cf92 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateFailOnWarningsPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f856a7b --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateFailOnWarningsPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..f88742f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateFailOnWarningsPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m new file mode 100644 index 0000000..9d3af0b --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m @@ -0,0 +1,20 @@ +classdef CreateHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FolderPath = '''htmlCodeCoverage''' + Source = {'pwd'} + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..ef3da65 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..ba627ec --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m new file mode 100644 index 0000000..5ca0813 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHTMLModelPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2021 The MathWorks, Inc. + + properties + FolderPath = '''htmlModelCoverage''' + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f6035a8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLModelPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..5eec86e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLModelPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m new file mode 100644 index 0000000..1ec207d --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHTMLTestReportPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2021 The MathWorks, Inc. + + properties + FolderPath = '''report''' + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..529027f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLTestReportPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..111bc61 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLTestReportPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m new file mode 100644 index 0000000..b6ea0d9 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + BaseFolder = {'pwd'} + end + + methods + function set.BaseFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.BaseFolder = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m new file mode 100644 index 0000000..701c8e2 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateHasTagSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + Tag = '''tag''' + end + + methods + function set.Tag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.Tag = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m new file mode 100644 index 0000000..b43f40d --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateJUnitPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.xml''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..95eeec8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateJUnitPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..4263785 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateJUnitPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m new file mode 100644 index 0000000..8d2a739 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreatePDFPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''report.pdf''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..3dcb143 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreatePDFPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreatePDFPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..9b5aaa8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreatePDFPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreatePDFPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m new file mode 100644 index 0000000..8c6cc60 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateSimulinkTestPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..62624b7 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..6342a96 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m new file mode 100644 index 0000000..c72b63c --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateSimulinkTestResultsPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.mldatx''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..76eea06 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..e0c7d2e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m new file mode 100644 index 0000000..bab3767 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateTAPPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.tap''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..32b775a --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateTAPPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateTAPPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..167fe0f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateTAPPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateTAPPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m new file mode 100644 index 0000000..cfb7e6d --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateTestFilesExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + CircleCITestFiles = {} + end + + methods + function set.CircleCITestFiles(obj, value) + scriptgen.internal.validateTextArray(value); + obj.CircleCITestFiles = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..13407f7 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..bd6dacc --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,25 @@ +classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'matlab.unittest.plugins.codecoverage.CoverageReport', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', [CoberturaFormat(%s) CoverageReport(%s)])', source, obj.CoberturaFilePath, obj.HTMLFolderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..bf30634 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateCoberturaCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..a1c4d26 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m @@ -0,0 +1,24 @@ +classdef CreateCoberturaCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoberturaFormat(%s))', source, obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..2f65f4d --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateCoberturaModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..8f5ddaa --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m @@ -0,0 +1,25 @@ +classdef CreateCoberturaModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'sltest.plugins.ModelCoveragePlugin'}; + + text = sprintf('ModelCoveragePlugin(''Producing'', CoberturaFormat(%s))', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..880bab9 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateFailOnWarningsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..7bb13ef --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateFailOnWarningsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') + end + + methods + function expression = build(~) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.FailOnWarningsPlugin'}; + + text = 'FailOnWarningsPlugin()'; + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..8d36823 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..d655874 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,24 @@ +classdef CreateHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoverageReport', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoverageReport(%s))', source, obj.FolderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..1327a8c --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateHTMLModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..a18bb0c --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m @@ -0,0 +1,34 @@ +classdef CreateHTMLModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'sltest.plugins.coverage.ModelCoverageReport', ... + 'sltest.plugins.ModelCoveragePlugin'}; + + % ModelCoverage report does not handle relative paths + if ~strcmp(obj.FolderPath, unquoteText(obj.FolderPath)) && ~isAbsolutePath(unquoteText(obj.FolderPath)) + folderPath = ['fullfile(pwd, ' obj.FolderPath ')']; + else + folderPath = obj.FolderPath; + end + + text = sprintf('ModelCoveragePlugin(''Producing'', ModelCoverageReport(%s))', folderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..4e484e6 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m @@ -0,0 +1,16 @@ +classdef CreateHTMLTestReportPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..56157bf --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m @@ -0,0 +1,20 @@ +classdef CreateHTMLTestReportPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingHTML(%s)', obj.FolderPath); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m new file mode 100644 index 0000000..824b670 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m @@ -0,0 +1,36 @@ +classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasBaseFolderSelectorExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') + end + + methods + function expression = build(obj) + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.selectors.HasBaseFolder', ... + 'matlab.unittest.constraints.StartsWithSubstring'}; + + constraints = {}; + for i = 1:numel(obj.BaseFolder) + folder = obj.BaseFolder{i}; + if ~strcmp(folder, unquoteText(folder)) && ~isAbsolutePath(unquoteText(folder)) + text = sprintf('StartsWithSubstring(fullfile(pwd, %s))', folder); + else + text = sprintf('StartsWithSubstring(%s)', folder); + end + constraints{end+1} = text; %#ok + end + + text = sprintf('HasBaseFolder(%s)', strjoin(constraints, ' | ')); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m new file mode 100644 index 0000000..77c853e --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateHasTagSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasTagSelectorExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.selectors.HasTag'}; + + text = sprintf('HasTag(%s)', obj.Tag); + + expression = Expression(text, imports); + end + end +end + + + diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..dafdf71 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateJUnitPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateJUnitPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..3d2c691 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateJUnitPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.XMLPlugin'}; + + text = sprintf('XMLPlugin.producingJUnitFormat(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..e2ab00e --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreatePDFPluginParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PlatformDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + SupportedPlatforms = {'GLN', 'PC'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreatePDFPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..8a51d62 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreatePDFPluginSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PlatformDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017a') + SupportedPlatforms = {'GLN', 'PC'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m new file mode 100644 index 0000000..e2f02b0 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreatePDFPluginWithMacParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreatePDFPluginWithMacSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m new file mode 100644 index 0000000..1fb5f26 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreatePDFPluginWithMacSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..44ad9c1 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateSimulinkTestPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..9fa3ad7 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateSimulinkTestPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(~) + import scriptgen.Expression; + + imports = {'sltest.plugins.TestManagerResultsPlugin'}; + + text = sprintf('TestManagerResultsPlugin()'); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..ef4a6d8 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..d114f61 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'sltest.plugins.TestManagerResultsPlugin'}; + + text = sprintf('TestManagerResultsPlugin(''ExportToFile'', %s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m new file mode 100644 index 0000000..9296d60 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m @@ -0,0 +1,33 @@ +classdef CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'matlab.unittest.plugins.ToUniqueFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + filePath = scriptgen.internal.unquoteText(obj.FilePath); + hadQuotes = ~strcmp(filePath, obj.FilePath); + if hadQuotes + [fp,name,ext] = fileparts(filePath); + filePath = ['''' fullfile(fp, name) '''']; + else + ext = '.tap'; + end + + text = sprintf('TAPPlugin.producingOriginalFormat(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m new file mode 100644 index 0000000..1d560ec --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m @@ -0,0 +1,32 @@ +classdef CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'matlab.unittest.plugins.ToFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + % Fixes an issue where ToFile did not properly resolve + % fullpaths prior to R2015a. + if ~strcmp(obj.FilePath, unquoteText(obj.FilePath)) && ~isAbsolutePath(unquoteText(obj.FilePath)) + filePath = ['fullfile(pwd, ' obj.FilePath ')']; + else + filePath = obj.FilePath; + end + + text = sprintf('TAPPlugin.producingOriginalFormat(ToFile(%s))', filePath); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m new file mode 100644 index 0000000..63d8a45 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m @@ -0,0 +1,32 @@ +classdef CreateTAPPluginUsingVersion13ParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.ToUniqueFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + filePath = scriptgen.internal.unquoteText(obj.FilePath); + hadQuotes = ~strcmp(filePath, obj.FilePath); + if hadQuotes + [fp,name,ext] = fileparts(filePath); + filePath = ['''' fullfile(fp, name) '''']; + else + ext = '.tap'; + end + + text = sprintf('TAPPlugin.producingVersion13(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m new file mode 100644 index 0000000..1c722c9 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateTAPPluginUsingVersion13SerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.ToFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + text = sprintf('TAPPlugin.producingVersion13(ToFile(%s))', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m new file mode 100644 index 0000000..591d134 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m @@ -0,0 +1,26 @@ +classdef CreateTestFilesExpressionBuilder < scriptgen.expressions.test.CreateTestFilesExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') + end + + methods + function expression = build(obj) + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + import scriptgen.Expression; + + quotedTestFiles = cellfun(@(x) ['''' x ''''], obj.CircleCITestFiles, 'UniformOutput', false); + testFilesStr = ['{' strjoin(quotedTestFiles, ', ') '}']; + text = sprintf('CircleCITestFiles = %s;', testFilesStr); + patternsStr = 'patterns = strcat(CircleCITestFiles, ''/*'');'; + suiteStr = 'suite = selectIf(suite, ''Name'', patterns);'; + fullText = sprintf('%s\n%s\n%s', text, patternsStr, suiteStr); + + expression = Expression(fullText); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/EnvironmentDependent.m b/+scriptgen/+internal/+mixin/EnvironmentDependent.m new file mode 100644 index 0000000..abfaf51 --- /dev/null +++ b/+scriptgen/+internal/+mixin/EnvironmentDependent.m @@ -0,0 +1,41 @@ +classdef (Hidden, HandleCompatible) EnvironmentDependent + % EnvironmentDependent - Base class for mixins that indicate a class is + % dependent on the runtime environment in some way + % + % When a mixin class subclasses EnvironmentDependent, it should call + % the addIsSupportedFunction method in its constructor and add a + % function that evaluates to true/false depending on the current + % runtime environment. + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + IsSupportedFunctions + end + + methods + function tf = isSupportedByCurrentEnvironment(obj) + for i = 1:numel(obj.IsSupportedFunctions) + isSupported = obj.IsSupportedFunctions{i}; + if ~isSupported(obj) + tf = false; + return; + end + end + tf = true; + end + end + + methods (Hidden, Access = protected) + function obj = EnvironmentDependent() + if isempty(obj.IsSupportedFunctions) + obj.IsSupportedFunctions = {}; + end + end + + function obj = addIsSupportedFunction(obj, fcn) + obj.IsSupportedFunctions{end+1} = fcn; + end + end +end + diff --git a/+scriptgen/+internal/+mixin/PathDependent.m b/+scriptgen/+internal/+mixin/PathDependent.m new file mode 100644 index 0000000..b7067d3 --- /dev/null +++ b/+scriptgen/+internal/+mixin/PathDependent.m @@ -0,0 +1,24 @@ +classdef (Hidden, HandleCompatible) PathDependent < scriptgen.internal.mixin.EnvironmentDependent + % PathDependent - Indicates a class requires a set of path names on the + % current MATLAB search path + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + RequiredPathNames + end + + methods (Hidden, Access = protected) + function obj = PathDependent() + obj = obj.addIsSupportedFunction(@requiredNamesExistOnCurrentPath); + end + end + + methods (Access = protected) + function tf = requiredNamesExistOnCurrentPath(obj) + ret = cellfun(@(n)exist(n), obj.RequiredPathNames); %#ok + tf = all(ismember(ret, [2 3 4 5 6 7 8])); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/PlatformDependent.m b/+scriptgen/+internal/+mixin/PlatformDependent.m new file mode 100644 index 0000000..b6617c7 --- /dev/null +++ b/+scriptgen/+internal/+mixin/PlatformDependent.m @@ -0,0 +1,25 @@ +classdef (Hidden, HandleCompatible) PlatformDependent < scriptgen.internal.mixin.EnvironmentDependent + % PlatformDependent - Indicates a class requires a particular runtime + % platform like PCWIN64 or MACI64 + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + SupportedPlatforms + end + + methods (Hidden, Access = protected) + function obj = PlatformDependent() + obj = obj.addIsSupportedFunction(@isSupportedByCurrentPlatform); + end + end + + methods (Access = protected) + function tf = isSupportedByCurrentPlatform(obj) + exp = ['^(' strjoin(obj.SupportedPlatforms, '|') ')\w*']; + matches = regexp(computer(), exp, 'once'); + tf = any(matches); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/Preferable.m b/+scriptgen/+internal/+mixin/Preferable.m new file mode 100644 index 0000000..b9fd4a5 --- /dev/null +++ b/+scriptgen/+internal/+mixin/Preferable.m @@ -0,0 +1,75 @@ +classdef (Hidden, HandleCompatible) Preferable + % Preferable - Base class for mixins that indicate an array of class + % objects may be sorted by some type of preferability + % + % When a mixin class subclasses Preferable, it should call the + % addPreferabilityComparator method in its constructor and add a + % function that accepts two objects and returns a negative value, + % zero, or positive value if the first object is less than, equal to, + % or greater than the second object. + % + % Note: one or both objects passed to the comparator may not derive + % from the mixin class. + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + PreferabilityComparators + end + + methods (Sealed) + function sorted = sortByPreferability(array) + map = mergeMaps({array.PreferabilityComparators}); + sorted = insertionSort(array, @(a,b)chainedComparator(a,b,map.values)); + end + end + + methods (Hidden, Access = protected) + function obj = Preferable() + if isempty(obj.PreferabilityComparators) + obj.PreferabilityComparators = containers.Map(); + end + end + + function obj = addPreferabilityComparator(obj, mixinClass, comparator) + obj.PreferabilityComparators(mixinClass) = comparator; + end + end +end + +function sorted = insertionSort(array, comparator) +for i = 2:numel(array) + key = array(i); + j = i - 1; + while j >= 1 && comparator(array(j), key) > 0 + array(j+1) = array(j); + j = j - 1; + end + array(j+1) = key; +end +sorted = array; +end + +function p = chainedComparator(a, b, comparators) +for i = 1:numel(comparators) + compare = comparators{i}; + value = compare(a, b); + assert(compare(b, a) == -value, 'comparator violates contract!'); + if value ~= 0 + p = value; + return; + end +end +p = 0; +end + +function m = mergeMaps(maps) +m = containers.Map(); +for i = 1:numel(maps) + map = maps{i}; + keys = map.keys; + for j = 1:numel(keys) + m(keys{j}) = map(keys{j}); + end +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+mixin/SetGet.m b/+scriptgen/+internal/+mixin/SetGet.m new file mode 100644 index 0000000..cad3030 --- /dev/null +++ b/+scriptgen/+internal/+mixin/SetGet.m @@ -0,0 +1,35 @@ +classdef (Abstract) SetGet < handle + % SetGet - A primitive alternative to matlab.mixin.SetGet that works + % with releases prior to R2014b + + % Copyright 2020-2022 The MathWorks, Inc. + + methods + function set(obj, varargin) + if nargin == 2 + value = varargin{1}; + names = fieldnames(value); + for i = 1:numel(names) + obj.(names{i}) = value.(names{i}); + end + return; + end + for i = 1:2:numel(varargin) + obj.(varargin{i}) = varargin{i+1}; + end + end + + function value = get(obj, name) + if nargin == 1 + value = struct(); + props = properties(obj); + for i = 1:numel(props) + value.(props{i}) = obj.(props{i}); + end + return; + end + value = obj.(name); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/VersionDependent.m b/+scriptgen/+internal/+mixin/VersionDependent.m new file mode 100644 index 0000000..8108a08 --- /dev/null +++ b/+scriptgen/+internal/+mixin/VersionDependent.m @@ -0,0 +1,41 @@ +classdef (Hidden, HandleCompatible) VersionDependent < scriptgen.internal.mixin.EnvironmentDependent ... + & scriptgen.internal.mixin.Preferable + % VersionDependent - Indicates a class requires a particular version of + % MATLAB + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + MinSupportedVersion + end + + methods (Hidden, Access = protected) + function obj = VersionDependent() + obj = obj.addIsSupportedFunction(@isSupportedByCurrentVersion); + obj = obj.addPreferabilityComparator('scriptgen.internal.mixin.VersionDependent', @comparePreferabilityByMinVersion); + end + end + + methods (Access = protected) + function tf = isSupportedByCurrentVersion(obj) + import scriptgen.internal.Version; + tf = obj.MinSupportedVersion <= Version.forCurrentRelease(); + end + end +end + +function p = comparePreferabilityByMinVersion(a, b) + if ~isa(a, 'scriptgen.internal.mixin.VersionDependent') && ~isa(b, 'scriptgen.internal.mixin.VersionDependent') + p = 0; + elseif ~isa(a, 'scriptgen.internal.mixin.VersionDependent') + p = -1; + elseif ~isa(b, 'scriptgen.internal.mixin.VersionDependent') + p = 1; + elseif a.MinSupportedVersion == b.MinSupportedVersion + p = 0; + elseif a.MinSupportedVersion < b.MinSupportedVersion + p = -1; + else + p = 1; + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+scripts/TestScriptBuilder.m b/+scriptgen/+internal/+scripts/TestScriptBuilder.m new file mode 100644 index 0000000..91996e2 --- /dev/null +++ b/+scriptgen/+internal/+scripts/TestScriptBuilder.m @@ -0,0 +1,250 @@ +classdef TestScriptBuilder < scriptgen.scripts.TestScriptBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function script = build(obj) + import scriptgen.Script; + import scriptgen.Sequence; + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + suiteName = 'suite'; + runnerName = 'runner'; + resultsName = 'results'; + + sequences = Sequence.empty(); + + if ~isempty(obj.WorkingFolder) + sequences(end+1) = Sequence(sprintf('cd(''%s'');', escape(obj.WorkingFolder))); + end + + sequences = [sequences obj.buildAddpathSequence()]; + + sequences(end+1) = testCodeProvider.createSequence('CreateTestSuite', ... + 'CodeProvider', obj.CodeProvider, ... + 'SuiteName', suiteName,... + 'SelectByFolder', quoteCell(splitPath(obj.SelectByFolder)),... + 'SelectByTag', quote(obj.SelectByTag), ... + 'CircleCITestFiles', (obj.CircleCITestFiles)); + + sequences = [sequences obj.buildMkdirSequence()]; + + runnerSequence = Sequence.empty(); + + if obj.UseParallel + [canUseParallel, cannotUseParallelMsg] = canRunInParallel(); + if canUseParallel + runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, true); + if isempty(runnerSequence) + msg = ['Unable to generate all artifacts while running tests in parallel. ' ... + 'Running tests in serial instead.']; + sequences(end+1) = Sequence(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + end + else + msg = [cannotUseParallelMsg '. Running tests in serial instead.']; + sequences(end+1) = Sequence(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + end + end + + if isempty(runnerSequence) + sequences = [sequences obj.buildDeleteTAPResultsSequence()]; + runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, false); + runStatement = sprintf('%s = %s.run(%s);', resultsName, runnerName, suiteName); + else + runStatement = sprintf('%s = %s.runInParallel(%s);', resultsName, runnerName, suiteName); + end + + sequences(end+1) = runnerSequence; + sequences(end+1) = Sequence({ ... + runStatement, ... + sprintf('display(%s);', resultsName)}); + + sequences(end+1) = testCodeProvider.createSequence('AssertNoFailures', ... + 'CodeProvider', obj.CodeProvider, ... + 'ResultsName', resultsName); + + script = Script(sequences); + end + end + + methods (Access = private) + function s = buildAddpathSequence(obj) + import scriptgen.Sequence; + + dirs = splitPath(obj.SourceFolder); + + if isempty(dirs) + s = Sequence.empty(); + return; + end + + for i = numel(dirs):-1:1 + code{i} = sprintf('addpath(genpath(''%s''));', escape(dirs{i})); + end + s = Sequence(code); + end + + function s = buildMkdirSequence(obj) + import scriptgen.Sequence; + + dirs = cellfun(@(f)fileparts(f), { ... + obj.PDFTestReport, ... + obj.TAPTestResults, ... + obj.JUnitTestResults, ... + obj.SimulinkTestResults, ... + obj.CoberturaCodeCoverage, ... + obj.CoberturaModelCoverage}, ... + 'UniformOutput', false); + + % TAP results require a folder when running in parallel + if ~isempty(obj.TAPTestResults) && obj.UseParallel + [fp,name] = fileparts(obj.TAPTestResults); + dirs = [dirs {fullfile(fp,name)}]; + end + + % HTML artifacts take in folder path + htmlDirs = {obj.HTMLTestReport, ... + obj.HTMLCodeCoverage, ... + obj.HTMLModelCoverage}; + + dirs = [dirs htmlDirs]; + + dirs = dirs(~cellfun(@isempty, dirs)); + dirs = unique(dirs); + + if isempty(dirs) + s = Sequence.empty(); + return; + end + + for i = numel(dirs):-1:1 + code{i} = sprintf('[~,~] = mkdir(''%s'');', escape(dirs{i})); + end + s = Sequence(code); + end + + function s = buildDeleteTAPResultsSequence(obj) + import scriptgen.Sequence; + import scriptgen.internal.isAbsolutePath; + + % Only pre-existing TAP results need to be explicitly deleted + % at the moment. Other artifacts are automatically overwritten + % by their respective plugin. + files = {obj.TAPTestResults}; + files = files(~cellfun(@isempty, files)); + files = unique(files); + + if isempty(files) + s = Sequence.empty(); + return; + end + + code = {}; + for i = 1:numel(files) + filePath = escape(files{i}); + if ~isAbsolutePath(filePath) + fullFilePath = sprintf('fullfile(pwd, ''%s'')', filePath); + else + fullFilePath = sprintf('''%s''', filePath); + end + c{1} = sprintf('if exist(%s, ''file'') == 2', fullFilePath); + c{2} = sprintf(' delete(''%s'');', filePath); + c{3} = sprintf('end'); + code = [code c]; %#ok + end + s = Sequence(code); + end + + function s = buildCreateTestRunnerSequence(obj, provider, runnerName, useParallel) + source = obj.SourceFolder; + if isempty(source) + source = '.'; + end + + s = provider.createSequence('CreateTestRunner', ... + 'CodeProvider', obj.CodeProvider, ... + 'RunnerName', runnerName, ... + 'PDFTestReport', quote(obj.PDFTestReport), ... + 'HTMLTestReport', quote(obj.HTMLTestReport), ... + 'TAPTestResults', quote(obj.TAPTestResults), ... + 'JUnitTestResults', quote(obj.JUnitTestResults), ... + 'SimulinkTestResults', quote(obj.SimulinkTestResults), ... + 'CoberturaCodeCoverage', quote(obj.CoberturaCodeCoverage), ... + 'HTMLCodeCoverage', quote(obj.HTMLCodeCoverage), ... + 'CoberturaModelCoverage', quote(obj.CoberturaModelCoverage), ... + 'HTMLModelCoverage', quote(obj.HTMLModelCoverage), ... + 'SourceFolder', quoteCell(splitPath(source)), ... + 'LoggingLevel', obj.LoggingLevel, ... + 'OutputDetail', obj.OutputDetail, ... + 'Strict', obj.Strict, ... + 'UseParallel', useParallel,... + 'CircleCITestFiles', obj.CircleCITestFiles); %Added + end + end +end + +function [tf,msg] = canRunInParallel() +tf = false; +msg = ''; + +mc = meta.class.fromName('matlab.unittest.TestRunner'); +runInParallelMethod = mc.MethodList.findobj('Name', 'runInParallel'); +if isempty(runInParallelMethod) + msg = 'Unable to find a runInParallel method on matlab.unittest.TestRunner'; + return; +end + +licenseName = 'Distrib_Computing_Toolbox'; +if ~license('test', licenseName) + msg = 'Unable to find a license for Parallel Computing Toolbox'; + return; +end + +[canCheckout,~] = license('checkout', licenseName); +if ~canCheckout + msg = 'Unable to check out a license for Parallel Computing Toolbox'; + return; +end + +if isempty(gcp()) + msg = 'Unable to get or start a parallel pool'; + return; +end + +tf = true; +end + +function text = splitPath(text) +if iscellstr(text) %#ok + return; +elseif isempty(text) + text = {}; +else + text = strtrim(strsplit(text, {';', ':'})); +end +end + +function text = quote(text) +if isempty(text) + return; +end +text = ['''' escape(text) '''']; +end + +function text = quoteCell(text) +text = cellfun(@(t)['''' t ''''], escape(text), 'UniformOutput', false); +end + +function text = escape(text) +if isempty(text) + return; +end +text = strrep(text, '''', ''''''); +end diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m new file mode 100644 index 0000000..a20e496 --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m @@ -0,0 +1,18 @@ +classdef AssertNoFailuresWithAssertSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + sequence = Sequence( ... + sprintf('assert(~any([%s.Failed]), ''At least one test failed in the test session.'');', obj.ResultsName)); + end + end +end + diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m new file mode 100644 index 0000000..1b9820f --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m @@ -0,0 +1,18 @@ +classdef AssertNoFailuresWithAssertSuccessSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + sequence = Sequence( ... + sprintf('assertSuccess(%s);', obj.ResultsName)); + end + end +end + diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m new file mode 100644 index 0000000..bd660dd --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m @@ -0,0 +1,214 @@ +classdef CreateTestRunnerSequenceBuilder < scriptgen.sequences.test.CreateTestRunnerSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2024 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + if ~isempty(obj.CoberturaCodeCoverage) && isempty(obj.SourceFolder) + error('scriptgen:CreateTestRunner:sourceRequiredForCoberturaCodeCoverage', ... + '''SourceFolder'' is required when specifying ''CoberturaCodeCoverage''.'); + end + + if ~isempty(obj.HTMLCodeCoverage) && isempty(obj.SourceFolder) + error('scriptgen:CreateTestRunner:sourceRequiredForHTMLCodeCoverage', ... + '''SourceFolder'' is required when specifying ''HTMLCodeCoverage''.'); + end + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + sequence = Sequence.empty(); + + statements = testCodeProvider.createStatement('CreateTestRunner', ... + 'RunnerName', obj.RunnerName, ... + 'LoggingLevel', obj.LoggingLevel, ... + 'OutputDetail', obj.OutputDetail); + + if obj.Strict + fowStatement = obj.buildPluginStatement(testCodeProvider, 'fails tests when they issue warnings', ... + 'CreateFailOnWarningsPlugin'); + if isempty(fowStatement) + return; + end + statements(end+1) = fowStatement; + end + + hasPDF = false; + if ~isempty(obj.PDFTestReport) + [pdfStatement, hasPDF] = obj.buildPluginStatement(testCodeProvider, 'generates a PDF test results report', ... + 'CreatePDFPlugin', 'FilePath', obj.PDFTestReport); + if isempty(pdfStatement) + return; + end + statements(end+1) = pdfStatement; + end + + hasHTML = false; + if ~isempty(obj.HTMLTestReport) + [htmlReportStatement, hasHTML] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML test results report', ... + 'CreateHTMLTestReportPlugin', 'FolderPath', obj.HTMLTestReport); + if isempty(htmlReportStatement) + return; + end + statements(end+1) = htmlReportStatement; + end + + if ~isempty(obj.TAPTestResults) + tapStatement = obj.buildPluginStatement(testCodeProvider, 'generates a TAP test results report', ... + 'CreateTAPPlugin', 'FilePath', obj.TAPTestResults); + if isempty(tapStatement) + return; + end + statements(end+1) = tapStatement; + end + + if ~isempty(obj.JUnitTestResults) + junitStatement = obj.buildPluginStatement(testCodeProvider, 'generates a JUnit test results report', ... + 'CreateJUnitPlugin', 'FilePath', obj.JUnitTestResults); + if isempty(junitStatement) + return; + end + statements(end+1) = junitStatement; + end + + hasSimTest = false; + if ~isempty(obj.SimulinkTestResults) + [simResultsStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... + 'CreateSimulinkTestResultsPlugin', 'FilePath', obj.SimulinkTestResults); + if isempty(simResultsStatement) + return; + end + statements(end+1) = simResultsStatement; + end + + if (hasPDF || hasHTML) && ~hasSimTest + % Do not warn if we cannot add Simulink Test plugin because the user did + % not explicitly request it. + warningState = warning('off', 'scriptgen:featureNotAvailable'); + restoreState = onCleanup(@()warning(warningState)); + [simTestStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... + 'CreateSimulinkTestPlugin'); + delete(restoreState); + if isempty(simTestStatement) + return; + end + if hasSimTest + statements(end+1) = simTestStatement; + end + end + + if (hasPDF || hasHTML) && hasSimTest && obj.UseParallel && verLessThan('matlab', '9.13') + % g2730113. Fall back to running serially. + return; + end + + % More than one CodeCoveragePlugin cannot exist on the same runner if they + % have overlapping source files. + hasCodeCov = false; + if ~isempty(obj.CoberturaCodeCoverage) && ~isempty(obj.HTMLCodeCoverage) + [dualCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates Cobertura and HTML code coverage reports', ... + 'CreateCoberturaAndHTMLCodePlugin', ... + 'CoberturaFilePath', obj.CoberturaCodeCoverage, ... + 'HTMLFolderPath', obj.HTMLCodeCoverage, ... + 'Source', obj.SourceFolder); + if isempty(dualCodeStatement) + return; + end + statements(end+1) = dualCodeStatement; + end + + if ~isempty(obj.CoberturaCodeCoverage) && ~hasCodeCov + [coberturaCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura code coverage report', ... + 'CreateCoberturaCodePlugin', 'FilePath', obj.CoberturaCodeCoverage, 'Source', obj.SourceFolder); + if isempty(coberturaCodeStatement) + return; + end + statements(end+1) = coberturaCodeStatement; + end + + if ~isempty(obj.HTMLCodeCoverage) && ~hasCodeCov + [htmlCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML code coverage report', ... + 'CreateHTMLCodePlugin', 'FolderPath', obj.HTMLCodeCoverage, 'Source', obj.SourceFolder); %#ok + if isempty(htmlCodeStatement) + return; + end + statements(end+1) = htmlCodeStatement; + end + + if ~isempty(obj.CoberturaModelCoverage) + coberturaModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura model coverage report', ... + 'CreateCoberturaModelPlugin', 'FilePath', obj.CoberturaModelCoverage); + if isempty(coberturaModelStatement) + return; + end + statements(end+1) = coberturaModelStatement; + end + + if ~isempty(obj.HTMLModelCoverage) + htmlModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates an HTML model coverage report', ... + 'CreateHTMLModelPlugin', 'FolderPath', obj.HTMLModelCoverage); + if isempty(htmlModelStatement) + return; + end + statements(end+1) = htmlModelStatement; + end + + sequence = Sequence(statements); + end + end + + methods (Access = private) + function [statement, success] = buildPluginStatement(obj, provider, purpose, type, varargin) + import scriptgen.Statement; + + statement = Statement.empty(); + success = false; + + if obj.UseParallel + statement = obj.buildAddPluginStatement(provider.createExpression([type 'Parallel'], varargin{:})); + end + + if isempty(statement) + statement = obj.buildAddPluginStatement(provider.createExpression([type 'Serial'], varargin{:})); + if ~isempty(statement) && obj.UseParallel + % We could not create the parallel statement but we could create the + % non-parallel statement. Return empty so we can fall back to running + % serially, as we prefer to produce requested artifacts over running in + % parallel. + warning('scriptgen:featureNotAvailable', ... + ['Unable to add a plugin that ' purpose ' while running tests in parallel.']); + statement = Statement.empty(); + return; + end + end + + if isempty(statement) + % We could not create the parallel or non-parallel statement. No point in + % falling back at this point. Put a comment in place of the statement. + msg = ['Unable to add a plugin that ' purpose '. This problem might be due to a MATLAB release ' ... + 'or operating system that does not support the plugin, ' ... + 'a missing toolbox, or a missing license.']; + statement = Statement(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + return; + end + + success = true; + end + + function statement = buildAddPluginStatement(obj, expression) + import scriptgen.Statement; + + if isempty(expression) + statement = Statement.empty(); + return; + end + statement = Statement(sprintf('%s.addPlugin(%s);', obj.RunnerName, expression.Text), expression.RequiredImports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m new file mode 100644 index 0000000..c05f9b5 --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -0,0 +1,67 @@ +classdef CreateTestSuiteSequenceBuilder < scriptgen.sequences.test.CreateTestSuiteSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + import scriptgen.Statement; + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + statements = testCodeProvider.createStatement('CreateTestSuite', ... + 'SuiteName', obj.SuiteName); + + if ~isempty(obj.SelectByFolder) + statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'base folder selector', ... + 'CreateHasBaseFolderSelector', 'BaseFolder', obj.SelectByFolder); + end + + if ~isempty(obj.SelectByTag) + statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'tag selector', ... + 'CreateHasTagSelector', 'Tag', obj.SelectByTag); + end + + if ~isempty(obj.CircleCITestFiles) + expression= testCodeProvider.createExpression('CreateTestFiles','CircleCITestFiles', obj.CircleCITestFiles); + statements(end+1) = Statement(expression.Text, expression.RequiredImports); + end + + sequence = Sequence(statements); + end + end + + methods (Access = private) + function [statement, success] = buildSelectorStatement(obj, provider, name, type, varargin) + import scriptgen.Statement; + + statement = obj.buildSelectIfStatement(provider.createExpression(type, varargin{:})); + if isempty(statement) + success = false; + msg = ['Unable to create ' name '. This problem might be due to a MATLAB release ' ... + 'or operating system that does not support generating the specified artifact, ' ... + 'a missing toolbox, or a missing license.']; + statement = Statement(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + return; + end + + success = true; + end + + function statement = buildSelectIfStatement(obj, expression) + import scriptgen.Statement; + + if isempty(expression) + statement = Statement.empty(); + return; + end + statement = Statement(sprintf('%s = %s.selectIf(%s);', obj.SuiteName, obj.SuiteName, expression.Text), expression.RequiredImports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m new file mode 100644 index 0000000..0f9ce75 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m @@ -0,0 +1,30 @@ +classdef CreateTestRunnerUsingWithTextOutputDetailStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + import scriptgen.internal.numericVerbosity; + + imports = {'matlab.unittest.TestRunner'}; + + nvpairs = {}; + if ~isempty(obj.LoggingLevel) + nvpairs{end+1} = sprintf('''LoggingLevel'', %s', num2str(numericVerbosity(obj.LoggingLevel))); + end + if ~isempty(obj.OutputDetail) + nvpairs{end+1} = sprintf('''OutputDetail'', %s', num2str(numericVerbosity(obj.OutputDetail))); + end + + text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m new file mode 100644 index 0000000..8f00299 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m @@ -0,0 +1,25 @@ +classdef CreateTestRunnerUsingWithTextOutputStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + imports = {'matlab.unittest.TestRunner'}; + + text = sprintf('%s = TestRunner.withTextOutput();', obj.RunnerName); + + if ~isempty(obj.LoggingLevel) || ~isempty(obj.OutputDetail) + text = [text ' % Unable to specify the logging level or output detail in this release of MATLAB.']; + end + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m new file mode 100644 index 0000000..326fe39 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m @@ -0,0 +1,41 @@ +classdef CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014b') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + import scriptgen.internal.numericVerbosity; + + imports = {'matlab.unittest.TestRunner'}; + + if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) + verbosity = max(numericVerbosity(obj.LoggingLevel), numericVerbosity(obj.OutputDetail)); + elseif ~isempty(obj.LoggingLevel) + verbosity = numericVerbosity(obj.LoggingLevel); + elseif ~isempty(obj.OutputDetail) + verbosity = numericVerbosity(obj.OutputDetail); + else + verbosity = []; + end + + nvpairs = {}; + if ~isempty(verbosity) + nvpairs{end+1} = sprintf('''Verbosity'', %s', num2str(verbosity)); + end + + text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); + + if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) + text = [text ' % Unable to specify the logging level and output detail independently in this release of MATLAB.']; + end + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m new file mode 100644 index 0000000..a35272f --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m @@ -0,0 +1,21 @@ +classdef CreateTestSuiteUsingFromFolderStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + imports = {'matlab.unittest.TestSuite'}; + + text = sprintf('%s = TestSuite.fromFolder(pwd, ''IncludingSubfolders'', true);', obj.SuiteName); + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m new file mode 100644 index 0000000..f9ffc69 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m @@ -0,0 +1,19 @@ +classdef CreateTestSuiteUsingTestsuiteStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + text = sprintf('%s = testsuite(pwd, ''IncludeSubfolders'', true);', obj.SuiteName); + + statement = Statement(text); + end + end +end + diff --git a/+scriptgen/+internal/CodeBuilderFactory.m b/+scriptgen/+internal/CodeBuilderFactory.m new file mode 100644 index 0000000..de0be85 --- /dev/null +++ b/+scriptgen/+internal/CodeBuilderFactory.m @@ -0,0 +1,40 @@ +classdef CodeBuilderFactory < handle + % CodeBuilderFactory - Factory that creates CodeBuilders + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + Locator + end + + methods + function obj = CodeBuilderFactory(locator) + obj.Locator = locator; + end + + function builder = create(obj, type) + % create - Creates a single CodeBuilder + % + % Creates the most preferable CodeBuilder supported by the + % current runtime environment or empty. + + import scriptgen.internal.MissingCodeBuilder; + + metaclasses = obj.Locator.locate(type); + builder = MissingCodeBuilder.empty(); + for i = numel(metaclasses):-1:1 + constructor = str2func(metaclasses(i).Name); + builder(i) = constructor(); + end + + isSupported = arrayfun(@(b)b.isSupportedByCurrentEnvironment(), builder); + builder = builder(isSupported); + + if numel(builder) > 1 + builder = builder.sortByPreferability(); + builder = builder(end); + end + end + end +end + diff --git a/+scriptgen/+internal/CodeBuilderLocator.m b/+scriptgen/+internal/CodeBuilderLocator.m new file mode 100644 index 0000000..b6addb6 --- /dev/null +++ b/+scriptgen/+internal/CodeBuilderLocator.m @@ -0,0 +1,55 @@ +classdef CodeBuilderLocator + % CodeBuilderLocator - Locator of CodeBuilder metaclasses + + % Copyright 2020 The MathWorks, Inc. + + properties (Dependent, Access = private) + ImplementationPackage + InterfacePackage + end + + properties (Access = private) + ImplementationPackageName + InterfacePackageName + end + + methods + function obj = CodeBuilderLocator(implPackage, intfPackage) + if ~ischar(implPackage) || ~ischar(intfPackage) + error('Packages must be provided as character arrays'); + end + obj.ImplementationPackageName = implPackage; + obj.InterfacePackageName = intfPackage; + end + + function p = get.ImplementationPackage(obj) + p = meta.package.fromName(obj.ImplementationPackageName); + end + + function p = get.InterfacePackage(obj) + p = meta.package.fromName(obj.InterfacePackageName); + end + + function metaclasses = locate(obj, type) + if ischar(type) + type = prependPrefix([obj.InterfacePackage.Name '.'], type); + type = meta.class.fromName(type); + end + if isempty(type) + metaclasses = type; + return; + end + classes = obj.ImplementationPackage.ClassList; + classes = classes(classes <= type); + classes = classes(~[classes.Abstract]); + metaclasses = classes; + end + end +end + +function name = prependPrefix(prefix, name) + if isempty(regexp(name, ['^' prefix '\w*'], 'once')) + name = [prefix name]; + end +end + diff --git a/+scriptgen/+internal/MissingCode.m b/+scriptgen/+internal/MissingCode.m new file mode 100644 index 0000000..06f9524 --- /dev/null +++ b/+scriptgen/+internal/MissingCode.m @@ -0,0 +1,10 @@ +classdef MissingCode < scriptgen.Code + % Copyright 2020 The MathWorks, Inc. + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(~, ~) + error('Called write on MissingCode'); + end + end +end + diff --git a/+scriptgen/+internal/MissingCodeBuilder.m b/+scriptgen/+internal/MissingCodeBuilder.m new file mode 100644 index 0000000..70c8d0e --- /dev/null +++ b/+scriptgen/+internal/MissingCodeBuilder.m @@ -0,0 +1,10 @@ +classdef MissingCodeBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + methods + function code = build(~) %#ok + error('Called build on MissingCodeBuilder'); + end + end +end + diff --git a/+scriptgen/+internal/PrunedStackException.m b/+scriptgen/+internal/PrunedStackException.m new file mode 100644 index 0000000..71e7853 --- /dev/null +++ b/+scriptgen/+internal/PrunedStackException.m @@ -0,0 +1,49 @@ +classdef PrunedStackException < MException + % Copyright 2020 MathWorks, Inc. + + properties(SetAccess=immutable, GetAccess=protected) + PrunedStack + end + + methods + function pruned = PrunedStackException(other, frameToPrune) + if nargin < 2 + % If no frame is specified, prune the frame of the caller + s = dbstack('-completenames'); + if numel(s) > 1 + frameToPrune = rmfield(s(2), 'line'); + else + frameToPrune = struct('file', {}); + end + end + + pruned = pruned@MException(other.identifier, '%s', other.message); + if isprop(pruned, 'type') && isprop(other, 'type') + pruned.type = other.type; + end + for idx = 1:numel(other.cause) + pruned = pruned.addCause(scriptgen.internal.PrunedStackException(other.cause{idx}, frameToPrune)); + end + + stack = other.getStack(); + remove = ismember({stack.file}, {frameToPrune.file}); + if isfield(frameToPrune, 'name') + remove = ismember({stack.name}, {frameToPrune.name}) & remove; + end + if isfield(frameToPrune, 'line') + remove = ismember([stack.line], [frameToPrune.line]) & remove; + end + stack(remove) = []; + + pruned.PrunedStack = stack; + end + end + + methods(Access=protected) + function stack = getStack(pruned) + stack = pruned.PrunedStack; + end + end +end + + diff --git a/+scriptgen/+internal/Version.m b/+scriptgen/+internal/Version.m new file mode 100644 index 0000000..8572e51 --- /dev/null +++ b/+scriptgen/+internal/Version.m @@ -0,0 +1,118 @@ +classdef Version + % Version - A MATLAB-style version + % + % Valid versions take the form XXX.XXX.XXX.XXXXXXXXX, where X may be + % a digit only. + % + % Examples of valid versions: + % + % 9 + % 9.7 + % 9.7.0.1261785 + % + % Examples of invalid versions: + % + % 9.1-beta + % R2019a + + % Copyright 2020-2022 The MathWorks, Inc. + + properties (SetAccess = immutable) + Parts + end + + methods + function obj = Version(verstr) + p = sscanf(verstr, '%3d.%3d.%3d.%9d'); + s = strjoin(strtrim(cellstr(num2str(p)))', '.'); + if ~strcmp(s, verstr) + error('scriptgen:Version:invalidFormat', 'invalid verstr format'); + end + p(end+1:4) = 0; + obj.Parts = p(:)'; + end + + function t = eq(a, b) + t = diff(a, b) == 0; + end + + function t = ne(a, b) + t = diff(a, b) ~= 0; + end + + function t = lt(a, b) + t = diff(a, b) < 0; + end + + function t = le(a, b) + t = diff(a, b) <= 0; + end + + function t = gt(a, b) + t = diff(a, b) > 0; + end + + function t = ge(a, b) + t = diff(a, b) >= 0; + end + end + + methods (Access = private) + function d = diff(a, b) + if ~isa(a, 'scriptgen.internal.Version') || ~isa(b, 'scriptgen.internal.Version') + error('incompatible types'); + end + d = a.num - b.num; + end + + function n = num(obj) + n = arrayfun(@(v)str2double(sprintf('%03d%03d%03d%09d', v.Parts)), obj); + end + end + + properties (Access = private, Constant) + ReleaseVersions = map( ... + 'R2022b', '9.13', ... + 'R2022a', '9.12', ... + 'R2021b', '9.11', ... + 'R2021a', '9.10', ... + 'R2020b', '9.9', ... + 'R2020a', '9.8', ... + 'R2019b', '9.7', ... + 'R2019a', '9.6', ... + 'R2018b', '9.5', ... + 'R2018a', '9.4', ... + 'R2017b', '9.3', ... + 'R2017a', '9.2', ... + 'R2016b', '9.1', ... + 'R2016a', '9.0', ... + 'R2015b', '8.6', ... + 'R2015a', '8.5', ... + 'R2014b', '8.4', ... + 'R2014a', '8.3', ... + 'R2013b', '8.2', ... + 'R2013a', '8.1'); + end + + methods (Static) + function v = forRelease(release) + r = scriptgen.internal.Version.ReleaseVersions; + if ~r.isKey(release) + error('scriptgen:Version:unknownRelease', 'unknown release'); + end + v = scriptgen.internal.Version(r(release)); + end + + function v = forCurrentRelease() + s = strsplit(version()); + v = scriptgen.internal.Version(s{1}); + end + end +end + +function m = map(varargin) +m = containers.Map(); +for i = 1:2:numel(varargin) + m(varargin{i}) = varargin{i+1}; +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/isAbsolutePath.m b/+scriptgen/+internal/isAbsolutePath.m new file mode 100644 index 0000000..d25ab5f --- /dev/null +++ b/+scriptgen/+internal/isAbsolutePath.m @@ -0,0 +1,8 @@ +function tf = isAbsolutePath(p) +if ispc() + tf = ~isempty(regexp(p, '^.:', 'once')) || strncmp(p, '\\', 2); +else + tf = any(strncmp(p, {'/', '~'}, 1)); +end +end + diff --git a/+scriptgen/+internal/numericVerbosity.m b/+scriptgen/+internal/numericVerbosity.m new file mode 100644 index 0000000..ee7759d --- /dev/null +++ b/+scriptgen/+internal/numericVerbosity.m @@ -0,0 +1,20 @@ +function n = numericVerbosity(verbosity) +% Copyright 2022 The MathWorks, Inc. +if isnumeric(verbosity) + n = verbosity; +elseif strcmpi(verbosity, 'none') + n = 0; +elseif strcmpi(verbosity, 'terse') + n = 1; +elseif strcmpi(verbosity, 'concise') + n = 2; +elseif strcmpi(verbosity, 'detailed') + n = 3; +elseif strcmpi(verbosity, 'verbose') + n = 4; +else + warning('scriptgen:numericVerbosity:unknownVerbosity', ... + 'Unknown verbosity level. Defaulting to maximum verbosity.'); + n = 4; +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/unquoteText.m b/+scriptgen/+internal/unquoteText.m new file mode 100644 index 0000000..18caebe --- /dev/null +++ b/+scriptgen/+internal/unquoteText.m @@ -0,0 +1,11 @@ +function u = unquoteText(text) +% Copyright 2020 The MathWorks, Inc. +s = regexp(text, '^''', 'once'); +e = regexp(text, '''$', 'once'); +if isempty(s) || isempty(e) + u = text; +else + u = text(s+1:e-1); +end +end + diff --git a/+scriptgen/+internal/validateText.m b/+scriptgen/+internal/validateText.m new file mode 100644 index 0000000..c7d578e --- /dev/null +++ b/+scriptgen/+internal/validateText.m @@ -0,0 +1,9 @@ +function validateText(value) +% Copyright 2020 The MathWorks, Inc. +if ischar(value) + scriptgen.internal.validateTextScalar(value); +else + scriptgen.internal.validateTextArray(value); +end +end + diff --git a/+scriptgen/+internal/validateTextArray.m b/+scriptgen/+internal/validateTextArray.m new file mode 100644 index 0000000..aff6396 --- /dev/null +++ b/+scriptgen/+internal/validateTextArray.m @@ -0,0 +1,7 @@ +function validateTextArray(value) +% Copyright 2020 The MathWorks, Inc. +if ~iscellstr(value) || ~(isempty(value) || isvector(value)) %#ok + error('MATLAB:invalidType', 'Expected input to be cellstr vector'); +end +end + diff --git a/+scriptgen/+internal/validateTextScalar.m b/+scriptgen/+internal/validateTextScalar.m new file mode 100644 index 0000000..7aca2ad --- /dev/null +++ b/+scriptgen/+internal/validateTextScalar.m @@ -0,0 +1,7 @@ +function validateTextScalar(value) +% Copyright 2020 The MathWorks, Inc. +if isempty(value) && ischar(value) + return; +end +validateattributes(value, {'char'}, {'vector'}); +end diff --git a/+scriptgen/+internal/validateVerbosityScalar.m b/+scriptgen/+internal/validateVerbosityScalar.m new file mode 100644 index 0000000..6f555b3 --- /dev/null +++ b/+scriptgen/+internal/validateVerbosityScalar.m @@ -0,0 +1,9 @@ +function validateVerbosityScalar(value) +% Copyright 2022 The MathWorks, Inc. +if ischar(value) + scriptgen.internal.validateTextScalar(value); +else + validateattributes(value, {'numeric'}, {'scalar'}); +end +end + diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m new file mode 100644 index 0000000..23c86fd --- /dev/null +++ b/+scriptgen/+scripts/TestScriptBuilder.m @@ -0,0 +1,122 @@ +classdef TestScriptBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + WorkingFolder = '' + PDFTestReport = '' + HTMLTestReport = '' + TAPTestResults = '' + JUnitTestResults = '' + SimulinkTestResults = '' + CoberturaCodeCoverage = '' + HTMLCodeCoverage = '' + CoberturaModelCoverage = '' + HTMLModelCoverage = '' + SourceFolder = '' + SelectByFolder = '' + SelectByTag = '' + LoggingLevel = '' + OutputDetail = '' + Strict = false + UseParallel = false + CircleCITestFiles = {} + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.WorkingFolder(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.WorkingFolder = value; + end + + function set.PDFTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.PDFTestReport = value; + end + + function set.HTMLTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLTestReport = value; + end + + function set.TAPTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.TAPTestResults = value; + end + + function set.JUnitTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.JUnitTestResults = value; + end + + function set.SimulinkTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SimulinkTestResults = value; + end + + function set.CoberturaCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaCodeCoverage = value; + end + + function set.HTMLCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLCodeCoverage = value; + end + + function set.CoberturaModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaModelCoverage = value; + end + + function set.HTMLModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLModelCoverage = value; + end + + function set.SourceFolder(obj, value) + scriptgen.internal.validateText(value); + obj.SourceFolder = value; + end + + function set.SelectByFolder(obj, value) + scriptgen.internal.validateText(value); + obj.SelectByFolder = value; + end + + function set.SelectByTag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SelectByTag = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + + function set.Strict(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.Strict = value; + end + + function set.UseParallel(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.UseParallel = value; + end + function set.CircleCITestFiles(obj, value) + scriptgen.internal.validateText(value); + obj.CircleCITestFiles = value; + end + end +end + diff --git a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m new file mode 100644 index 0000000..760eadb --- /dev/null +++ b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m @@ -0,0 +1,20 @@ +classdef AssertNoFailuresSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + ResultsName = 'results' + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.ResultsName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.ResultsName = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m new file mode 100644 index 0000000..17b4191 --- /dev/null +++ b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m @@ -0,0 +1,109 @@ +classdef CreateTestRunnerSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + RunnerName = 'runner' + PDFTestReport = '' + HTMLTestReport = '' + TAPTestResults = '' + JUnitTestResults = '' + SimulinkTestResults = '' + CoberturaCodeCoverage = '' + HTMLCodeCoverage = '' + CoberturaModelCoverage = '' + HTMLModelCoverage = '' + SourceFolder = {} + LoggingLevel = '' + OutputDetail = '' + Strict = false + UseParallel = false + CircleCITestFiles = {} + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.RunnerName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.RunnerName = value; + end + + function set.PDFTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.PDFTestReport = value; + end + + function set.HTMLTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLTestReport = value; + end + + function set.TAPTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.TAPTestResults = value; + end + + function set.JUnitTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.JUnitTestResults = value; + end + + function set.SimulinkTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SimulinkTestResults = value; + end + + function set.CoberturaCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaCodeCoverage = value; + end + + function set.HTMLCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLCodeCoverage = value; + end + + function set.CoberturaModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaModelCoverage = value; + end + + function set.HTMLModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLModelCoverage = value; + end + + function set.SourceFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.SourceFolder = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + + function set.Strict(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.Strict = value; + end + + function set.UseParallel(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.UseParallel = value; + end + function set.CircleCITestFiles(obj, value) + scriptgen.internal.validateText(value); + obj.CircleCITestFiles = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m new file mode 100644 index 0000000..f44bc04 --- /dev/null +++ b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -0,0 +1,39 @@ +classdef CreateTestSuiteSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + SuiteName = 'suite' + SelectByFolder = {} + SelectByTag = '' + CircleCITestFiles = {} + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.SuiteName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SuiteName = value; + end + + function set.SelectByFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.SelectByFolder = value; + end + + function set.SelectByTag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SelectByTag = value; + end + + function set.CircleCITestFiles(obj, value) + scriptgen.internal.validateTextArray(value); + obj.CircleCITestFiles = value; + end + end +end + diff --git a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m new file mode 100644 index 0000000..d641f2c --- /dev/null +++ b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m @@ -0,0 +1,27 @@ +classdef CreateTestRunnerStatementBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + RunnerName = 'runner' + LoggingLevel = 'terse' + OutputDetail = 'concise' + end + + methods + function set.RunnerName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.RunnerName = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + end +end + diff --git a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m new file mode 100644 index 0000000..041aff8 --- /dev/null +++ b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m @@ -0,0 +1,15 @@ +classdef CreateTestSuiteStatementBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + SuiteName = 'suite' + end + + methods + function set.SuiteName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SuiteName = value; + end + end +end + diff --git a/+scriptgen/Code.m b/+scriptgen/Code.m new file mode 100644 index 0000000..e142341 --- /dev/null +++ b/+scriptgen/Code.m @@ -0,0 +1,38 @@ +classdef Code < matlab.mixin.Heterogeneous + % Code - Base class for all classes writable by CodeWriter + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Contents + end + + methods + function contents = get.Contents(obj) + import scriptgen.TextOutput; + stream = TextOutput(); + obj.writeToStream(stream); + contents = stream.Text; + end + end + + methods (Abstract, Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + write(obj, writer) + end + + methods (Access = protected) + function writeToStream(obj, stream) + import scriptgen.CodeWriter; + writer = CodeWriter(stream); + close = onCleanup(@()writer.close()); + obj.write(writer); + end + end + + methods (Static, Sealed, Access = protected) + function builder = getDefaultScalarElement() + builder = scriptgen.internal.MissingCode(); + end + end +end + diff --git a/+scriptgen/CodeBuilder.m b/+scriptgen/CodeBuilder.m new file mode 100644 index 0000000..893213c --- /dev/null +++ b/+scriptgen/CodeBuilder.m @@ -0,0 +1,18 @@ +classdef CodeBuilder < matlab.mixin.Heterogeneous & scriptgen.internal.mixin.SetGet ... + & scriptgen.internal.mixin.EnvironmentDependent ... + & scriptgen.internal.mixin.Preferable + % CodeBuilder - Base class for builders of immutable code objects + + % Copyright 2020 The MathWorks, Inc. + + methods (Abstract) + code = build(obj) + end + + methods (Static, Sealed, Access = protected) + function builder = getDefaultScalarElement() + builder = scriptgen.internal.MissingCodeBuilder(); + end + end +end + diff --git a/+scriptgen/CodeProvider.m b/+scriptgen/CodeProvider.m new file mode 100644 index 0000000..fd64af5 --- /dev/null +++ b/+scriptgen/CodeProvider.m @@ -0,0 +1,128 @@ +classdef CodeProvider < handle + % CodeProvider - Provider of immutable code objects + % + % The scriptgen.CodeProvider class serves as the primary interface + % for creating pre-made code objects. To create code objects the + % CodeProvider utilizes builders under the following packages: + % + % scriptgen.expressions - Expression builders + % scriptgen.scripts - Script builders + % scriptgen.sequences - Sequence builders + % scriptgen.statements - Statement builders + % + % To locate a builder, the CodeProvider relies on the builder's class + % name. For example, when called to create a Script of type 'Test', + % the CodeProvider will look for a Script builder under + % scriptgen.scripts with the class name 'TestScriptBuilder'. It will + % then utilize an internal implementation of that builder to create + % the requested Script object. + % + % Builders may also exist under subpackages. To access builders under + % subpackages, a new CodeProvider must be instantiated with the + % subpackage name. The withSubpackage method is a convenience for + % instantiating new providers off an existing provider. + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = private) + Subpackage + end + + properties (Access = private) + ExpressionBuilderFactory + StatementBuilderFactory + SequenceBuilderFactory + ScriptBuilderFactory + end + + methods + function obj = CodeProvider(subpackage) + import scriptgen.internal.validateTextScalar; + + if nargin < 1 + subpackage = ''; + end + validateTextScalar(subpackage); + + obj.ExpressionBuilderFactory = obj.createFactory('expressions', subpackage); + obj.StatementBuilderFactory = obj.createFactory('statements', subpackage); + obj.SequenceBuilderFactory = obj.createFactory('sequences', subpackage); + obj.ScriptBuilderFactory = obj.createFactory('scripts', subpackage); + + obj.Subpackage = subpackage; + end + + function expression = createExpression(obj, type, varargin) + type = appendSuffix(type, 'ExpressionBuilder'); + expression = obj.createCode(obj.ExpressionBuilderFactory, type, varargin{:}); + end + + function statement = createStatement(obj, type, varargin) + type = appendSuffix(type, 'StatementBuilder'); + statement = obj.createCode(obj.StatementBuilderFactory, type, varargin{:}); + end + + function sequence = createSequence(obj, type, varargin) + type = appendSuffix(type, 'SequenceBuilder'); + sequence = obj.createCode(obj.SequenceBuilderFactory, type, varargin{:}); + end + + function script = createScript(obj, type, varargin) + type = appendSuffix(type, 'ScriptBuilder'); + script = obj.createCode(obj.ScriptBuilderFactory, type, varargin{:}); + end + + function provider = withSubpackage(obj, subpackage) + import scriptgen.CodeProvider; + + sub = pkgjoin({obj.Subpackage, subpackage}); + provider = CodeProvider(sub); + end + end + + methods (Access = private) + function factory = createFactory(~, type, subpackage) + import scriptgen.internal.CodeBuilderLocator; + import scriptgen.internal.CodeBuilderFactory; + + implPackage = pkgjoin({'scriptgen.internal', type, subpackage}); + intfPackage = pkgjoin({'scriptgen', type, subpackage}); + + locator = CodeBuilderLocator(implPackage, intfPackage); + factory = CodeBuilderFactory(locator); + end + + function code = createCode(~, factory, type, varargin) + builder = factory.create(type); + if isempty(builder) + code = scriptgen.internal.MissingCode.empty(); + return; + end + if ~isempty(varargin) + set(builder, varargin{:}); + end + code = builder.build(); + end + end + + methods (Static) + function provider = default() + persistent singleton; + if isempty(singleton) + singleton = scriptgen.CodeProvider(); + end + provider = singleton; + end + end +end + +function name = appendSuffix(name, suffix) +if isempty(regexp(name, ['\w*' suffix '$'], 'once')) + name = [name suffix]; +end +end + +function p = pkgjoin(names) +tf = cellfun(@(n)~isempty(n), names); +p = strjoin(names(tf), '.'); +end \ No newline at end of file diff --git a/+scriptgen/CodeWriter.m b/+scriptgen/CodeWriter.m new file mode 100644 index 0000000..76862c8 --- /dev/null +++ b/+scriptgen/CodeWriter.m @@ -0,0 +1,64 @@ +classdef CodeWriter < handle + % CodeWriter - Writes code objects in to code + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + OutputStream + WhitespaceBuffer + end + + methods + function obj = CodeWriter(stream) + validateattributes(stream, {'scriptgen.OutputStream'}, {'scalar'}); + obj.OutputStream = stream; + end + + function writeExpression(obj, expression) + obj.flushWhitespaceBuffer(); + expression.write(obj); + end + + function writeStatement(obj, statement) + obj.flushWhitespaceBuffer(); + statement.write(obj); + obj.bufferNewLine(); + end + + function writeSequence(obj, sequence) + obj.flushWhitespaceBuffer(); + sequence.write(obj); + obj.bufferNewLine(); + end + + function writeScript(obj, script) + obj.flushWhitespaceBuffer(); + script.write(obj); + end + + function close(obj) + obj.OutputStream.close(); + end + end + + methods (Access = {?scriptgen.Code}) + function write(obj, format, varargin) + text = sprintf(format, varargin{:}); + obj.OutputStream.write(text); + end + end + + methods (Access = private) + function bufferNewLine(obj) + obj.WhitespaceBuffer = strcat(obj.WhitespaceBuffer, '\n'); + end + + function flushWhitespaceBuffer(obj) + if ~isempty(obj.WhitespaceBuffer) + obj.write(obj.WhitespaceBuffer); + obj.WhitespaceBuffer = []; + end + end + end +end + diff --git a/+scriptgen/Expression.m b/+scriptgen/Expression.m new file mode 100644 index 0000000..b8719db --- /dev/null +++ b/+scriptgen/Expression.m @@ -0,0 +1,42 @@ +classdef Expression < scriptgen.Code + % Expression - A unit of code that returns a value + % + % Expressions are typically located in statements on the right- or + % left-hand side of an equals sign. + % + % Example expressions: + % + % 1 + 2 + % zeros(5,1) + % A(1:3,2) + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Text + RequiredImports + end + + methods + function obj = Expression(text, imports) + if nargin < 2 + imports = {}; + end + if ischar(imports) + imports = {imports}; + end + scriptgen.internal.validateTextScalar(text); + scriptgen.internal.validateTextArray(imports); + + obj.Text = text; + obj.RequiredImports = imports; + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + writer.write('%s', obj.Text); + end + end +end + diff --git a/+scriptgen/FileOutput.m b/+scriptgen/FileOutput.m new file mode 100644 index 0000000..84110e5 --- /dev/null +++ b/+scriptgen/FileOutput.m @@ -0,0 +1,22 @@ +classdef FileOutput < scriptgen.OutputStream + % Copyright 2020 The MathWorks, Inc. + + properties (GetAccess = private, SetAccess = immutable) + Fid + end + + methods + function obj = FileOutput(filename) + obj.Fid = fopen(filename, 'w'); + end + + function write(obj, text) + fprintf(obj.Fid, '%s', text); + end + + function close(obj) + fclose(obj.Fid); + end + end +end + diff --git a/+scriptgen/OutputStream.m b/+scriptgen/OutputStream.m new file mode 100644 index 0000000..1e2ced0 --- /dev/null +++ b/+scriptgen/OutputStream.m @@ -0,0 +1,14 @@ +classdef OutputStream < handle + % Copyright 2020 The MathWorks, Inc. + + methods + function close(~) + % Available for subclasses to override + end + end + + methods (Abstract) + write(obj, text); + end +end + diff --git a/+scriptgen/Script.m b/+scriptgen/Script.m new file mode 100644 index 0000000..9311181 --- /dev/null +++ b/+scriptgen/Script.m @@ -0,0 +1,83 @@ +classdef Script < scriptgen.Code + % Script - A collection of statements organized in to sequences + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Sequences + end + + methods + function obj = Script(sequences) + import scriptgen.Sequence; + + if iscellstr(sequences) || (ischar(sequences) && isvector(sequences)) %#ok + sequences = Sequence(sequences); + end + + validateattributes(sequences, {'scriptgen.Sequence'}, {'vector'}); + + obj.Sequences = sequences; + end + + function file = writeToFile(obj, file) + import scriptgen.FileOutput; + [~,~] = mkdir(fileparts(file)); + stream = FileOutput(file); + obj.writeToStream(stream); + end + + function text = writeToText(obj) + % DEPRECATED - Use the Contents property + text = obj.Contents; + end + + function run(obj) + % RUN - Run script + % + % RUN(SCRIPT) runs the code contents of the SCRIPT in the callers + % workspace as if it were executed from a script file on disk. + % + % This method is roughly equivalent to writing the contents of the + % SCRIPT to a file in the current working directory and executing + % the file by typing its name. + + tempFolder = tempname(); + [~, name] = fileparts(tempFolder); + scriptName = ['tempscript_' name(end-3:end)]; + scriptPath = fullfile(tempFolder, [scriptName '.m']); + + obj.writeToFile(scriptPath); + oldPath = addpath(tempFolder); + + restoreState = onCleanup(@()cleanup(oldPath, tempFolder)); + function cleanup(p, f) + path(p); + rmdir(f, 's'); + end + + try + evalin('caller', strcat(scriptName, ';')); + catch e + throw(scriptgen.internal.PrunedStackException(e)); + end + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + import scriptgen.Sequence; + import scriptgen.Statement; + + imports = sort(unique([obj.Sequences.RequiredImports])); + if ~isempty(imports) + importText = cellfun(@(i)sprintf('import %s;', i), imports, 'UniformOutput', false); + writer.writeSequence(Sequence(importText)); + end + + for sequence = obj.Sequences + writer.writeSequence(sequence); + end + end + end +end \ No newline at end of file diff --git a/+scriptgen/Sequence.m b/+scriptgen/Sequence.m new file mode 100644 index 0000000..8be416e --- /dev/null +++ b/+scriptgen/Sequence.m @@ -0,0 +1,43 @@ +classdef Sequence < scriptgen.Code + % Sequence - A collection of statements that achieve a task + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Statements + RequiredImports + end + + methods + function obj = Sequence(statements) + import scriptgen.Statement; + + if iscellstr(statements) || (ischar(statements) && isvector(statements)) %#ok + statements = Statement(statements); + end + validateattributes(statements, {'scriptgen.Statement'}, {'vector'}); + + obj.Statements = statements; + + % unique may return 0x1 cell array, valueOrElse ensures it is + % converted to a 0x0 cell array. + obj.RequiredImports = valueOrElse(unique([statements.RequiredImports]), {}); + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + for s = obj.Statements + writer.writeStatement(s); + end + end + end +end + +function v = valueOrElse(value, default) +if ~isempty(value) + v = value; +else + v = default; +end +end \ No newline at end of file diff --git a/+scriptgen/Statement.m b/+scriptgen/Statement.m new file mode 100644 index 0000000..99d3a42 --- /dev/null +++ b/+scriptgen/Statement.m @@ -0,0 +1,55 @@ +classdef Statement < scriptgen.Code + % Statement - A unit of code that executes an action + % + % Statements are typically terminated with a semicolon. + % + % Example statements: + % + % a = 1 + 2; + % disp('hello world'); + % z = zeros(5,1); + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Text + RequiredImports + end + + methods + function obj = Statement(text, imports) + import scriptgen.internal.validateTextArray; + import scriptgen.internal.validateTextArray; + + if nargin < 2 + imports = {}; + end + if ischar(text) + text = {text}; + end + if ischar(imports) + imports = {imports}; + end + validateTextArray(text); + validateTextArray(imports); + + % Support array construction. + m = size(text, 1); + n = size(text, 2); + obj(1:m,1:n) = obj; + for i = 1:m + for j = 1:n + obj(i,j).Text = text{i,j}; + obj(i,j).RequiredImports = imports; + end + end + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + writer.write('%s', obj.Text); + end + end +end + diff --git a/+scriptgen/TextOutput.m b/+scriptgen/TextOutput.m new file mode 100644 index 0000000..50e3dee --- /dev/null +++ b/+scriptgen/TextOutput.m @@ -0,0 +1,14 @@ +classdef TextOutput < scriptgen.OutputStream + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = private) + Text + end + + methods + function write(obj, text) + obj.Text = [obj.Text sprintf('%s', text)]; + end + end +end + diff --git a/genscript.m b/genscript.m new file mode 100644 index 0000000..e672aa9 --- /dev/null +++ b/genscript.m @@ -0,0 +1,26 @@ +function script = genscript(type, varargin) +% genscript - Generates a script +% +% The genscript function provides a convenient way to generate a pre-made +% script object. +% +% SCRIPT = genscript(TYPE) generates and returns a script of TYPE. TYPE +% must be a character vector and match the name of a script builder +% located in the scriptgen.scripts package. +% +% SCRIPT = genscript(TYPE, NAME, VALUE, ...) generates and returns a +% script of TYPE setting those name-value pairs on the script builder. +% +% Examples: +% +% testScript = genscript('Test', 'JUnitTestResults', 'results.xml'); +% writeToFile(testScript, 'myscript.m'); + +% Copyright 2020 The MathWorks, Inc. + +import scriptgen.CodeProvider; + +provider = CodeProvider.default(); +script = provider.createScript(type, varargin{:}); +end + diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index e955536..486aabe 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -30,7 +30,7 @@ TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" echo "TESTFILES ARE: $TESTFILES" "${tmpdir}/bin/run-matlab-command$binext" "\ - testScript = my_genscript('Test',\ + testScript = genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ From 5d5976b6b328f0c67024dd502865d2d7e2bef2ea Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 15:03:17 +0530 Subject: [PATCH 16/55] filename --- src/scripts/run-tests.sh | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 486aabe..0251e4b 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -30,22 +30,25 @@ TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") TESTFILES="{${TESTFILES}}" echo "TESTFILES ARE: $TESTFILES" "${tmpdir}/bin/run-matlab-command$binext" "\ - testScript = genscript('Test',\ - 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ - 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ - 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ - 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ - 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ - 'SelectByTag','$PARAM_SELECT_BY_TAG',\ - 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ - 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ - 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ - 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ - 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ - 'Strict',${PARAM_STRICT},\ - 'SplitType', '${PARAM_SPLIT_TYPE}',\ - 'UseParallel',${PARAM_USE_PARALLEL},\ - 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ - 'LoggingLevel','${PARAM_LOGGING_LEVEL}',\ - 'TestFiles',${TESTFILES});" $PARAM_STARTUP_OPTIONS + testScript = genscript('Test', ... + 'JUnitTestResults', '${PARAM_TEST_RESULTS_JUNIT}', ... + 'CoberturaCodeCoverage', '${PARAM_CODE_COVERAGE_COBERTURA}', ... + 'HTMLCodeCoverage', '${PARAM_CODE_COVERAGE_HTML}', ... + 'SourceFolder', '${PARAM_SOURCE_FOLDER}', ... + 'SelectByFolder', '${PARAM_SELECT_BY_FOLDER}', ... + 'SelectByTag', '${PARAM_SELECT_BY_TAG}', ... + 'CoberturaModelCoverage', '${PARAM_MODEL_COVERAGE_COBERTURA}', ... + 'HTMLModelCoverage', '${PARAM_MODEL_COVERAGE_HTML}', ... + 'SimulinkTestResults', '${PARAM_TEST_RESULTS_SIMULINK_TEST}', ... + 'HTMLTestReport', '${PARAM_TEST_RESULTS_HTML}', ... + 'PDFTestReport', '${PARAM_TEST_RESULTS_PDF}', ... + 'Strict', ${PARAM_STRICT}, ... + 'UseParallel', ${PARAM_USE_PARALLEL}, ... + 'OutputDetail', '${PARAM_OUTPUT_DETAIL}', ... + 'LoggingLevel', '${PARAM_LOGGING_LEVEL}', ... + 'CircleCITestFiles', circleciTestFiles);\ + disp('Running MATLAB script with contents:');\ + disp(testScript.Contents);\ + fprintf('__________\n\n');\ + run(testScript);" $PARAM_STARTUP_OPTIONS \ No newline at end of file From 2c66ecca00079bc1c6a110ec08e90659c0c4caf1 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 15:07:35 +0530 Subject: [PATCH 17/55] filename --- src/scripts/run-tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 0251e4b..af7c2ae 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -27,8 +27,8 @@ if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then fi echo "Command to be executed: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") -TESTFILES="{${TESTFILES}}" -echo "TESTFILES ARE: $TESTFILES" +circleciTestFiles="{${TESTFILES}}" +echo "TESTFILES ARE: $circleciTestFiles" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = genscript('Test', ... 'JUnitTestResults', '${PARAM_TEST_RESULTS_JUNIT}', ... @@ -46,7 +46,7 @@ echo "TESTFILES ARE: $TESTFILES" 'UseParallel', ${PARAM_USE_PARALLEL}, ... 'OutputDetail', '${PARAM_OUTPUT_DETAIL}', ... 'LoggingLevel', '${PARAM_LOGGING_LEVEL}', ... - 'CircleCITestFiles', circleciTestFiles);\ + 'CircleCITestFiles', ${circleciTestFiles};\ disp('Running MATLAB script with contents:');\ disp(testScript.Contents);\ fprintf('__________\n\n');\ From 07ab21d1ff589f3d66b58cf3155bdc7ddb66a8e1 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 15:17:46 +0530 Subject: [PATCH 18/55] filename --- src/scripts/run-tests.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index af7c2ae..3a5d814 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -29,24 +29,26 @@ echo "Command to be executed: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") circleciTestFiles="{${TESTFILES}}" echo "TESTFILES ARE: $circleciTestFiles" + "${tmpdir}/bin/run-matlab-command$binext" "\ - testScript = genscript('Test', ... - 'JUnitTestResults', '${PARAM_TEST_RESULTS_JUNIT}', ... - 'CoberturaCodeCoverage', '${PARAM_CODE_COVERAGE_COBERTURA}', ... - 'HTMLCodeCoverage', '${PARAM_CODE_COVERAGE_HTML}', ... - 'SourceFolder', '${PARAM_SOURCE_FOLDER}', ... - 'SelectByFolder', '${PARAM_SELECT_BY_FOLDER}', ... - 'SelectByTag', '${PARAM_SELECT_BY_TAG}', ... - 'CoberturaModelCoverage', '${PARAM_MODEL_COVERAGE_COBERTURA}', ... - 'HTMLModelCoverage', '${PARAM_MODEL_COVERAGE_HTML}', ... - 'SimulinkTestResults', '${PARAM_TEST_RESULTS_SIMULINK_TEST}', ... - 'HTMLTestReport', '${PARAM_TEST_RESULTS_HTML}', ... - 'PDFTestReport', '${PARAM_TEST_RESULTS_PDF}', ... - 'Strict', ${PARAM_STRICT}, ... - 'UseParallel', ${PARAM_USE_PARALLEL}, ... - 'OutputDetail', '${PARAM_OUTPUT_DETAIL}', ... - 'LoggingLevel', '${PARAM_LOGGING_LEVEL}', ... - 'CircleCITestFiles', ${circleciTestFiles};\ + addpath('${gendir}/scriptgen');\ + testScript = genscript('Test',\ + 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ + 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ + 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ + 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ + 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ + 'SelectByTag','$PARAM_SELECT_BY_TAG',\ + 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ + 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ + 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ + 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ + 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ + 'Strict',${PARAM_STRICT},\ + 'UseParallel',${PARAM_USE_PARALLEL},\ + 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ + 'CircleCITestFiles','$circleciTestFiles',\ + 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ disp('Running MATLAB script with contents:');\ disp(testScript.Contents);\ fprintf('__________\n\n');\ From bc2250b37c0b54aa5261c816b6a6bddf2058f258 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 15:48:02 +0530 Subject: [PATCH 19/55] filename --- src/scripts/run-tests.sh | 43 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 3a5d814..025b2ab 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -31,26 +31,25 @@ circleciTestFiles="{${TESTFILES}}" echo "TESTFILES ARE: $circleciTestFiles" "${tmpdir}/bin/run-matlab-command$binext" "\ - addpath('${gendir}/scriptgen');\ - testScript = genscript('Test',\ - 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ - 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ - 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ - 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ - 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ - 'SelectByTag','$PARAM_SELECT_BY_TAG',\ - 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ - 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ - 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ - 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ - 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ - 'Strict',${PARAM_STRICT},\ - 'UseParallel',${PARAM_USE_PARALLEL},\ - 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ - 'CircleCITestFiles','$circleciTestFiles',\ - 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ - disp('Running MATLAB script with contents:');\ - disp(testScript.Contents);\ - fprintf('__________\n\n');\ - run(testScript);" $PARAM_STARTUP_OPTIONS + testScript = genscript('Test',\ + 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ + 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ + 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ + 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ + 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ + 'SelectByTag','$PARAM_SELECT_BY_TAG',\ + 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ + 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ + 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ + 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ + 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ + 'Strict',${PARAM_STRICT},\ + 'UseParallel',${PARAM_USE_PARALLEL},\ + 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ + 'CircleCITestFiles','${circleciTestFiles}',\ + 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ + disp('Running MATLAB script with contents:');\ + disp(testScript.Contents);\ + fprintf('__________\n\n');\ + run(testScript);" $PARAM_STARTUP_OPTIONS \ No newline at end of file From da4f4e79ed467ca87fed66f3c876cc22a810da58 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 15:58:50 +0530 Subject: [PATCH 20/55] filename2 --- src/scripts/run-tests.sh | 98 +++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 32 deletions(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 025b2ab..7ea8536 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -1,55 +1,89 @@ -downloadAndRun() { - url=$1 - shift - if [[ -x $(command -v sudo) ]]; then - curl -sfL $url | sudo -E bash -s -- "$@" +#!/bin/bash + +# Exit script if you try to use an uninitialized variable. +set -o nounset + +# Exit script if a statement returns a non-true return value. +set -o errexit + +# Use the error status of the first failure, rather than that of the last item in a pipeline. +set -o pipefail + +sudoIfAvailable() { + if command -v sudo >/dev/null 2>&1; then + sudo -E bash "$@" else - curl -sfL $url | bash -s -- "$@" + bash "$@" + fi +} + +stream() { + local url="$1" + if command -v wget >/dev/null 2>&1; then + wget --retry-connrefused --waitretry=5 -qO- "$url" + elif command -v curl >/dev/null 2>&1; then + curl --retry 5 --retry-connrefused --retry-delay 5 -sSL "$url" + else + echo "Could not find wget or curl command" >&2 + return 1 + fi +} + +download() { + local url="$1" + local filename="$2" + if command -v wget >/dev/null 2>&1; then + wget --retry-connrefused --waitretry=5 -qO "$filename" "$url" 2>&1 + elif command -v curl >/dev/null 2>&1; then + curl --retry 5 --retry-connrefused --retry-delay 5 -sSLo "$filename" "$url" + else + echo "Could not find wget or curl command" >&2 + return 1 fi } tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'run-tests') # install run-matlab-command -downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh "${tmpdir}/bin" +stream https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/install.sh | sudoIfAvailable -s -- "${tmpdir}/bin" # download script generator -curl -sfLo "${tmpdir}/scriptgen.zip" https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip +download https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip "${tmpdir}/scriptgen.zip" unzip -qod "${tmpdir}/scriptgen" "${tmpdir}/scriptgen.zip" # form OS appropriate paths for MATLAB os=$(uname) -gendir=$tmpdir +gendir="$tmpdir" binext="" -if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then +if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then gendir=$(cygpath -w "$gendir") binext=".exe" fi + echo "Command to be executed: $PARAM_SELECT_BY_NAME" TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") circleciTestFiles="{${TESTFILES}}" echo "TESTFILES ARE: $circleciTestFiles" "${tmpdir}/bin/run-matlab-command$binext" "\ - testScript = genscript('Test',\ - 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ - 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ - 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ - 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ - 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ - 'SelectByTag','$PARAM_SELECT_BY_TAG',\ - 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ - 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ - 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ - 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ - 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ - 'Strict',${PARAM_STRICT},\ - 'UseParallel',${PARAM_USE_PARALLEL},\ - 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ - 'CircleCITestFiles','${circleciTestFiles}',\ - 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ - disp('Running MATLAB script with contents:');\ - disp(testScript.Contents);\ - fprintf('__________\n\n');\ - run(testScript);" $PARAM_STARTUP_OPTIONS - \ No newline at end of file + testScript = genscript('Test',\ + 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ + 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ + 'HTMLCodeCoverage','${PARAM_CODE_COVERAGE_HTML}',\ + 'SourceFolder','${PARAM_SOURCE_FOLDER}',\ + 'SelectByFolder','${PARAM_SELECT_BY_FOLDER}',\ + 'SelectByTag','$PARAM_SELECT_BY_TAG',\ + 'CoberturaModelCoverage','${PARAM_MODEL_COVERAGE_COBERTURA}',\ + 'HTMLModelCoverage','${PARAM_MODEL_COVERAGE_HTML}',\ + 'SimulinkTestResults','${PARAM_TEST_RESULTS_SIMULINK_TEST}',\ + 'HTMLTestReport','${PARAM_TEST_RESULTS_HTML}',\ + 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ + 'Strict',${PARAM_STRICT},\ + 'UseParallel',${PARAM_USE_PARALLEL},\ + 'CircleCITestFiles', $circleciTestFiles,\ + 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ + 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ + disp('Running MATLAB script with contents:');\ + disp(testScript.Contents);\ + fprintf('__________\n\n');\ + run(testScript);" $PARAM_STARTUP_OPTIONS \ No newline at end of file From ca67d6f529b6771a6ec1afdff8c0b3bc4b9cb15e Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 16:12:44 +0530 Subject: [PATCH 21/55] filesize --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 31a6a5a..23aefc2 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -) + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -) test-results-junit: results - store_test_results: From 42a2d9b3b8a485adc5b32adc4a8cca9eae42b7f3 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 16:29:18 +0530 Subject: [PATCH 22/55] timings --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 23aefc2..01a2885 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print "\x27" $(NF-1) "\x27"}' | paste -sd, -) + select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print "\x27" $0 "\x27"}' | paste -sd, -) test-results-junit: results - store_test_results: From 58394b3217c091762f9925ea637c439dd0ba0136 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 19:20:54 +0530 Subject: [PATCH 23/55] timings --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 7ea8536..5c150ae 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -57,7 +57,7 @@ gendir="$tmpdir" binext="" if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then gendir=$(cygpath -w "$gendir") - binext=".exe" + binext=".exe" fi echo "Command to be executed: $PARAM_SELECT_BY_NAME" From bf1e1077aab5c40d7fb12da365c2ff7df8a08ddf Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 19:50:17 +0530 Subject: [PATCH 24/55] timings --- .circleci/test-deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 01a2885..2a17bc7 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -143,11 +143,11 @@ jobs: test-results-junit: results - store_test_results: - path: results.xml + path: results - store_artifacts: - path: results.xml - destination: test-results/results.xml + path: results + destination: test-results/results From b79c2263e415a7eef2b15dc406afbdb3a3434c30 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 20 Aug 2024 20:22:16 +0530 Subject: [PATCH 25/55] timings2 --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 2a17bc7..f00965e 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -147,7 +147,7 @@ jobs: - store_artifacts: path: results - destination: test-results/results + destination: test-results/results From bbb89d7065207f6fd3d66605df46228c5ad45419 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 10:36:20 +0530 Subject: [PATCH 26/55] try --- .circleci/test-deploy.yml | 2 +- src/scripts/run-tests.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index f00965e..5fdde6d 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print "\x27" $0 "\x27"}' | paste -sd, -) + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') test-results-junit: results - store_test_results: diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 5c150ae..bab2252 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -60,10 +60,9 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then binext=".exe" fi -echo "Command to be executed: $PARAM_SELECT_BY_NAME" -TESTFILES=$(eval echo "$PARAM_SELECT_BY_NAME") -circleciTestFiles="{${TESTFILES}}" -echo "TESTFILES ARE: $circleciTestFiles" +selectByName=$(echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27%s\x27%s", $i, (i==NF ? "" : ", ")}') +circleciTestFiles="{$selectByName}" +echo "TESTFILES ARE:$circleciTestFiles" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = genscript('Test',\ From 422de6dd71a7a605022acae28ccd5d52368622a0 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 10:43:29 +0530 Subject: [PATCH 27/55] try --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index bab2252..b1323ad 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -60,7 +60,7 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then binext=".exe" fi -selectByName=$(echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27%s\x27%s", $i, (i==NF ? "" : ", ")}') +selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27%s\x27%s", $i, (i==NF ? "" : ", ")}') circleciTestFiles="{$selectByName}" echo "TESTFILES ARE:$circleciTestFiles" From 28568a8469273eaeb60e03935ec12f34cec1d11e Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 12:49:28 +0530 Subject: [PATCH 28/55] passing new param as char --- .../+test/CreateTestFilesExpressionBuilder.m | 4 ++-- .../+test/CreateTestFilesExpressionBuilder.m | 12 ++++++------ +scriptgen/+scripts/TestScriptBuilder.m | 4 ++-- .../+test/CreateTestSuiteSequenceBuilder.m | 4 ++-- baseline_API.mat | Bin 0 -> 220520 bytes src/scripts/run-tests.sh | 4 ++-- test.mldatx | Bin 0 -> 6645 bytes 7 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 baseline_API.mat create mode 100644 test.mldatx diff --git a/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m index cfb7e6d..4c87e72 100644 --- a/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m +++ b/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m @@ -2,12 +2,12 @@ % Copyright 2020 The MathWorks, Inc. properties - CircleCITestFiles = {} + CircleCITestFiles = '' end methods function set.CircleCITestFiles(obj, value) - scriptgen.internal.validateTextArray(value); + scriptgen.internal.validateText(value); obj.CircleCITestFiles = value; end end diff --git a/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m index 591d134..ca79b0e 100644 --- a/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m +++ b/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m @@ -12,12 +12,12 @@ import scriptgen.internal.isAbsolutePath; import scriptgen.Expression; - quotedTestFiles = cellfun(@(x) ['''' x ''''], obj.CircleCITestFiles, 'UniformOutput', false); - testFilesStr = ['{' strjoin(quotedTestFiles, ', ') '}']; - text = sprintf('CircleCITestFiles = %s;', testFilesStr); - patternsStr = 'patterns = strcat(CircleCITestFiles, ''/*'');'; - suiteStr = 'suite = selectIf(suite, ''Name'', patterns);'; - fullText = sprintf('%s\n%s\n%s', text, patternsStr, suiteStr); + % quotedTestFiles = cellfun(@(x) ['''' x ''''], obj.CircleCITestFiles, 'UniformOutput', false); + % testFilesStr = ['{' strjoin(quotedTestFiles, ', ') '}']; + text = sprintf('names = %s;', obj.CircleCITestFiles); + % patternsStr = 'names = strcat(CircleCITestFiles, ''/*'');'; + suiteStr = 'suite = suite.selectIf(''Name'', names);'; + fullText = sprintf('%s\n%s', text, suiteStr); expression = Expression(fullText); end diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m index 23c86fd..abb66dd 100644 --- a/+scriptgen/+scripts/TestScriptBuilder.m +++ b/+scriptgen/+scripts/TestScriptBuilder.m @@ -20,7 +20,7 @@ OutputDetail = '' Strict = false UseParallel = false - CircleCITestFiles = {} + CircleCITestFiles = '' end methods @@ -114,7 +114,7 @@ obj.UseParallel = value; end function set.CircleCITestFiles(obj, value) - scriptgen.internal.validateText(value); + scriptgen.internal.validateTextScalar(value); obj.CircleCITestFiles = value; end end diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m index f44bc04..19aa5b3 100644 --- a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -6,7 +6,7 @@ SuiteName = 'suite' SelectByFolder = {} SelectByTag = '' - CircleCITestFiles = {} + CircleCITestFiles = '' end methods @@ -31,7 +31,7 @@ end function set.CircleCITestFiles(obj, value) - scriptgen.internal.validateTextArray(value); + scriptgen.internal.validateText(value); obj.CircleCITestFiles = value; end end diff --git a/baseline_API.mat b/baseline_API.mat new file mode 100644 index 0000000000000000000000000000000000000000..b97e3266c6e9af29e74972bf919b5378945adc41 GIT binary patch literal 220520 zcmeI5dvF}bedl`#(Sj|?S;>w~+p)bi{XlG4T1k{d$qy|=LIQ13S`(B+JF&S-U_rnF z0T{b*s602hx`auk65ONim|XtgpZw!0!PO-dEHZ*-<{dsodK~}yuZUDdb|5KJu{#F^{;=^-7|Ay_|)^m&lH|`@X^AF;ZvWO zoSvyYP$TnV*BTu{B!Q0rQc`ehjOP*j*K`j ziSiNJZtji!`U~YCo#EafFgh|^mMcANmwUv*Yo=!wb%*NH=jsh_tj-^bk|wH+s{A-q zUp!lXt=_0v`k{r|WZjEEZwrxh=btqF9o6RGrc5ta)88Y5T6T01orht{E++u}UAF6l z9$);JCZy?E^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HR`@luudzOEtiNJv+&6zk z>I!~(#s5zFFV!G^*2nKuPhiDRpNOyjz2pUd7S6xT;Gip)wA72k8eV+{N9nD72@9O> zoxG>Kn?E@non8D#7|JH>WE61Y3&N-h3%}{ zzS}7c?PJI;U?aYF05-|%Ua!5plX0wW`VPJ9*LdY#;f8ihZt4AVH+_TM>le3pd|WLb zzNdpWh8`u1xBQ*K_I0hD{!Tt>rt&?VOa87{B-y7Y^LNT`^arc?)u4;|MZBN>(#7Yr z)aJPM*;gzSmc8g>Kl~;5E#S0Q>_7ap_1dx3#s%k}*E;uRD%vCeXYCGlxbuENTj+Lu|7$pIj5cEPNiwAwZT9_#Iuf3po~g;)6XGXpjm3r8 z;kvw+rtasUFb)R)w_@e=JHYtu)ls#7Z+uq6xWC)j@mqA02V66{w6)GRi!G52p=b-n zZ^!*_xo1XvB8Us)uq8~jJyw-@Z%OE0Nj07cmTG0%+l z4F3f3tA*+(?Qgv&=+@EpE#RN!eCSJ*_e(lp)NS{>tLbl$({=M;Xww#u} zcm6`ZcAOvHqdy6KTCX1tKP0pho8^a~SsZYcNLknFhhTOPVbTwgIZW|S;D=24-~S9A Ctp4=? literal 0 HcmV?d00001 diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index b1323ad..7f93e17 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -60,7 +60,7 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then binext=".exe" fi -selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27%s\x27%s", $i, (i==NF ? "" : ", ")}') +selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27\x27%s\x27\x27%s", $i, (i==NF ? "" : ", ")}') circleciTestFiles="{$selectByName}" echo "TESTFILES ARE:$circleciTestFiles" @@ -79,7 +79,7 @@ echo "TESTFILES ARE:$circleciTestFiles" 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ 'UseParallel',${PARAM_USE_PARALLEL},\ - 'CircleCITestFiles', $circleciTestFiles,\ + 'CircleCITestFiles', '$circleciTestFiles',\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ disp('Running MATLAB script with contents:');\ diff --git a/test.mldatx b/test.mldatx new file mode 100644 index 0000000000000000000000000000000000000000..dd4220e8f04166c26375ed49252b92efe6cb46a4 GIT binary patch literal 6645 zcmcJU2UJtrwuS>p?w>Jy&f%@Bu-|_NnN*y(fmZTa$D``zu+{-6)CaWbp=e0|F z@*PK;F?Vi4?sMx%X9v{Ew}3$=cpK7r6t;YA!c%ttf!BDDJN(UPYMS)aqp~7z|Fil| zM2*6?OYHuBqU!uqOPIr$pa^GP56(4ex3Dag8_RFi znbbFCGAI=)Ms_E})$P!;+%fI*E}qsI1zT1?@agK~tE#(v)_J6TODUL_b+<<&BN|X# zM#Wj`GyZk&cym!%zAP%8bkF%^srnQw*FUm^Rtg-LD&(iio_RzKD6e_U%>waJNyJIe6IU}Lb`H36`XHF;m?$m2 zS6(PT(C9a!6ZGRnSFl9;utZ6*MD6{cp8gWzKR>f3ufTdFsR&lG>>Y!yKZ~YR({k|O zYc4PJzdif7kGq*?f$k6^OB{e0Z5^F)@scLYXHw^fGo>&3i?!J7^qhf*K8?Uz z_t1Ij>3lB}=N8D?nW-n@`B;#qC~6@-{8^GP!-UT>+zauZHcm1OPqb6FJgIS9bo=mQ zO?DUW44Ycyep`szZyhg+kK)pNcJqXftoqn(XQ}_4VDqC-V>%sOW`vH4TO=8j7*_K+-4`+XV12xNNkjo`}Ff{=AS$xUNSE2Dv|(n}na-1vtq`u)83{7qnb!TGn6 zL0wrfK7RQ?TTi(OM`=b>KIQmBCk^nr4!3?vYVBR7G0nu!wL8-@V@*P}6rXj@fXav` z>{K7(IUvTn&qqn@$no|*Wm7;c*hW~<`8=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VlNuFC^r5a z`40mo*wY`R$BP3m>Sw+`Q^@TmW^T3__{ zV)6N92uAY Date: Thu, 29 Aug 2024 14:19:59 +0530 Subject: [PATCH 29/55] final draft --- .../CreateHasNameSelectorExpressionBuilder.m | 14 ++++++++++++++ .../+test/CreateTestFilesExpressionBuilder.m | 14 -------------- ... CreateHasNameSelectorExpressionBuilder.m} | 7 ++----- .../+internal/+scripts/TestScriptBuilder.m | 5 ++--- .../+test/CreateTestSuiteSequenceBuilder.m | 4 ++-- +scriptgen/+scripts/TestScriptBuilder.m | 6 +++--- .../+test/CreateTestRunnerSequenceBuilder.m | 5 ----- .../+test/CreateTestSuiteSequenceBuilder.m | 6 +++--- baseline_API.mat | Bin 220520 -> 220520 bytes src/scripts/run-tests.sh | 5 ++--- test.mldatx | Bin 6645 -> 0 bytes 11 files changed, 28 insertions(+), 38 deletions(-) create mode 100644 +scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m rename +scriptgen/+internal/+expressions/+test/{CreateTestFilesExpressionBuilder.m => CreateHasNameSelectorExpressionBuilder.m} (60%) delete mode 100644 test.mldatx diff --git a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m new file mode 100644 index 0000000..0970d04 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHasNameSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + SelectByName = '' + end + + methods + function set.SelectByName(obj, value) + scriptgen.internal.validateText(value); + obj.SelectByName = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m deleted file mode 100644 index 4c87e72..0000000 --- a/+scriptgen/+expressions/+test/CreateTestFilesExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateTestFilesExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - CircleCITestFiles = '' - end - - methods - function set.CircleCITestFiles(obj, value) - scriptgen.internal.validateText(value); - obj.CircleCITestFiles = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m similarity index 60% rename from +scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m rename to +scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m index ca79b0e..e5cee1f 100644 --- a/+scriptgen/+internal/+expressions/+test/CreateTestFilesExpressionBuilder.m +++ b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m @@ -1,4 +1,4 @@ -classdef CreateTestFilesExpressionBuilder < scriptgen.expressions.test.CreateTestFilesExpressionBuilder ... +classdef CreateHasNameSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasNameSelectorExpressionBuilder ... & scriptgen.internal.mixin.VersionDependent % Copyright 2020 The MathWorks, Inc. @@ -12,10 +12,7 @@ import scriptgen.internal.isAbsolutePath; import scriptgen.Expression; - % quotedTestFiles = cellfun(@(x) ['''' x ''''], obj.CircleCITestFiles, 'UniformOutput', false); - % testFilesStr = ['{' strjoin(quotedTestFiles, ', ') '}']; - text = sprintf('names = %s;', obj.CircleCITestFiles); - % patternsStr = 'names = strcat(CircleCITestFiles, ''/*'');'; + text = sprintf('names = %s;', obj.SelectByName); suiteStr = 'suite = suite.selectIf(''Name'', names);'; fullText = sprintf('%s\n%s', text, suiteStr); diff --git a/+scriptgen/+internal/+scripts/TestScriptBuilder.m b/+scriptgen/+internal/+scripts/TestScriptBuilder.m index 91996e2..3941676 100644 --- a/+scriptgen/+internal/+scripts/TestScriptBuilder.m +++ b/+scriptgen/+internal/+scripts/TestScriptBuilder.m @@ -30,7 +30,7 @@ 'SuiteName', suiteName,... 'SelectByFolder', quoteCell(splitPath(obj.SelectByFolder)),... 'SelectByTag', quote(obj.SelectByTag), ... - 'CircleCITestFiles', (obj.CircleCITestFiles)); + 'SelectByName', (obj.SelectByName)); sequences = [sequences obj.buildMkdirSequence()]; @@ -184,8 +184,7 @@ 'LoggingLevel', obj.LoggingLevel, ... 'OutputDetail', obj.OutputDetail, ... 'Strict', obj.Strict, ... - 'UseParallel', useParallel,... - 'CircleCITestFiles', obj.CircleCITestFiles); %Added + 'UseParallel', useParallel); end end end diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m index c05f9b5..6839529 100644 --- a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -26,8 +26,8 @@ 'CreateHasTagSelector', 'Tag', obj.SelectByTag); end - if ~isempty(obj.CircleCITestFiles) - expression= testCodeProvider.createExpression('CreateTestFiles','CircleCITestFiles', obj.CircleCITestFiles); + if ~isempty(obj.SelectByName) + expression= testCodeProvider.createExpression('CreateHasNameSelector','SelectByName', obj.SelectByName); statements(end+1) = Statement(expression.Text, expression.RequiredImports); end diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m index abb66dd..b1caf40 100644 --- a/+scriptgen/+scripts/TestScriptBuilder.m +++ b/+scriptgen/+scripts/TestScriptBuilder.m @@ -20,7 +20,7 @@ OutputDetail = '' Strict = false UseParallel = false - CircleCITestFiles = '' + SelectByName = '' end methods @@ -113,9 +113,9 @@ validateattributes(value, {'logical','numeric'}, {'scalar'}); obj.UseParallel = value; end - function set.CircleCITestFiles(obj, value) + function set.SelectByName(obj, value) scriptgen.internal.validateTextScalar(value); - obj.CircleCITestFiles = value; + obj.SelectByName = value; end end end diff --git a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m index 17b4191..b714b97 100644 --- a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m +++ b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m @@ -18,7 +18,6 @@ OutputDetail = '' Strict = false UseParallel = false - CircleCITestFiles = {} end methods @@ -101,9 +100,5 @@ validateattributes(value, {'logical','numeric'}, {'scalar'}); obj.UseParallel = value; end - function set.CircleCITestFiles(obj, value) - scriptgen.internal.validateText(value); - obj.CircleCITestFiles = value; - end end end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m index 19aa5b3..3421c03 100644 --- a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -6,7 +6,7 @@ SuiteName = 'suite' SelectByFolder = {} SelectByTag = '' - CircleCITestFiles = '' + SelectByName = '' end methods @@ -30,9 +30,9 @@ obj.SelectByTag = value; end - function set.CircleCITestFiles(obj, value) + function set.SelectByName(obj, value) scriptgen.internal.validateText(value); - obj.CircleCITestFiles = value; + obj.SelectByName = value; end end end diff --git a/baseline_API.mat b/baseline_API.mat index b97e3266c6e9af29e74972bf919b5378945adc41..6134a5e6f06e9e30b325e224a199269bacd53ee0 100644 GIT binary patch delta 1552 zcmbu9ZAg<*6vx>)YED!vL=2W0mKkWxwQ1=lgUl#OEn*~yeTYU$g%lLM7_x+32${{e z7AZr5z71vK4UsV{M9D;=EFw%wX@!Uo1mO$abNAeBntkfi&U5bhpL6c{-JMW>N~k}@ zZC__DDYTTBi+c{7)5$iX-L$Zeq)9KDX?;5G|*^h zRvP=Jh*_Pb%vN`z$DP04e|588YIo*DwQ0F3%9Fi4VjA<5skAjaPQ_8(KtWXNHL562 zcVW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ests.sh b/src/scripts/run-tests.sh index 7f93e17..c3db946 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -61,8 +61,7 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then fi selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27\x27%s\x27\x27%s", $i, (i==NF ? "" : ", ")}') -circleciTestFiles="{$selectByName}" -echo "TESTFILES ARE:$circleciTestFiles" +selectByName="{$selectByName}" "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = genscript('Test',\ @@ -79,7 +78,7 @@ echo "TESTFILES ARE:$circleciTestFiles" 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ 'UseParallel',${PARAM_USE_PARALLEL},\ - 'CircleCITestFiles', '$circleciTestFiles',\ + 'SelectByName', '$selectByName',\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ disp('Running MATLAB script with contents:');\ diff --git a/test.mldatx b/test.mldatx deleted file mode 100644 index dd4220e8f04166c26375ed49252b92efe6cb46a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6645 zcmcJU2UJtrwuS>p?w>Jy&f%@Bu-|_NnN*y(fmZTa$D``zu+{-6)CaWbp=e0|F z@*PK;F?Vi4?sMx%X9v{Ew}3$=cpK7r6t;YA!c%ttf!BDDJN(UPYMS)aqp~7z|Fil| zM2*6?OYHuBqU!uqOPIr$pa^GP56(4ex3Dag8_RFi znbbFCGAI=)Ms_E})$P!;+%fI*E}qsI1zT1?@agK~tE#(v)_J6TODUL_b+<<&BN|X# zM#Wj`GyZk&cym!%zAP%8bkF%^srnQw*FUm^Rtg-LD&(iio_RzKD6e_U%>waJNyJIe6IU}Lb`H36`XHF;m?$m2 zS6(PT(C9a!6ZGRnSFl9;utZ6*MD6{cp8gWzKR>f3ufTdFsR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*Q?34UTQB__}iHS2z`qLl>C07CxJp zWh0oFPs%`xzQ>-gP}Ftij>%PFXeFj{+EyGcjta?!_-cXXig*oZ4a-Ft3SXgpsdbaJ ztR#=M@U+hnnJf6e$AF#wPG>LnF6FT?Aoyo@YXbFzI{N=pqq+U?HASQ(RWw?uf4HNO z&R9n;o&jbT_i>!ljO(OWYkhrzgi&J2r7I)LmcDDAAX~k>9L>FOJB~bmi>U$#L2cJ%D=fw{5!(5r&3QF@PMN z;gwj$zPxb8W0s!X9s_Md+t6~CI~hqgh#rl2NFsLOg7wC#FLotP3uQJ@YPjTTk1KEY zP&t1n8oKq}t&PFcc3D7t5p)tm-+P{Y7tcr^2b*O6z50r!0l-rEpVz<8VlNuFC^r5a z`40mo*wY`R$BP3m>Sw+`Q^@TmW^T3__{ zV)6N92uAY Date: Thu, 29 Aug 2024 14:36:03 +0530 Subject: [PATCH 30/55] filesize --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 5fdde6d..b69df1d 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') test-results-junit: results - store_test_results: From d2c0cd629f07135d8e8d2867d464bb8ea9e36dfd Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 14:54:35 +0530 Subject: [PATCH 31/55] timing 1st run --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index b69df1d..2db7c5b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') + select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') test-results-junit: results - store_test_results: From 542567927c4a436b2099a532c83cce0785291e12 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 15:21:28 +0530 Subject: [PATCH 32/55] without selectByName --- .circleci/test-deploy.yml | 1 - src/scripts/run-tests.sh | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 2db7c5b..1e7e2d8 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,6 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') test-results-junit: results - store_test_results: diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index c3db946..70fd5fd 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -60,8 +60,12 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then binext=".exe" fi -selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27\x27%s\x27\x27%s", $i, (i==NF ? "" : ", ")}') -selectByName="{$selectByName}" +if [[ -n "$PARAM_SELECT_BY_NAME" ]]; then + selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27\x27%s\x27\x27%s", $i, (i==NF ? "" : ", ")}') + selectByName="{$selectByName}" +else + selectByName='' +fi "${tmpdir}/bin/run-matlab-command$binext" "\ testScript = genscript('Test',\ From b612e94085c2959eef3812c8f6b85ec1b3f62fb2 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 18:04:01 +0530 Subject: [PATCH 33/55] final draft --- src/commands/run-tests.yml | 5 ++--- src/scripts/run-tests.sh | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 73e869e..ce660ed 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -23,9 +23,8 @@ parameters: default: '' select-by-name: description: > - Location of the folder used to select test suite elements, relative to the project root folder. - To create a test suite, MATLAB uses only the tests in the specified folder and its subfolders. - You can specify multiple folders using a colon-separated or semicolon-separated list. + Name or pattern used to select test suite elements. To create a test suite, MATLAB uses only the test elements + that match the specified name or pattern. type: string default: '' select-by-folder: diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 70fd5fd..0161fd9 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -68,6 +68,7 @@ else fi "${tmpdir}/bin/run-matlab-command$binext" "\ + addpath('${gendir}/scriptgen');\ testScript = genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ From 34b685fb9aa7a3b0a89c56ffd110215f9fd562d4 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 18:08:58 +0530 Subject: [PATCH 34/55] removing extra files --- ...erturaAndHTMLCodePluginExpressionBuilder.m | 27 -- ...dHTMLCodePluginParallelExpressionBuilder.m | 5 - ...AndHTMLCodePluginSerialExpressionBuilder.m | 5 - ...eateCoberturaCodePluginExpressionBuilder.m | 21 -- ...rturaCodePluginParallelExpressionBuilder.m | 5 - ...berturaCodePluginSerialExpressionBuilder.m | 5 - ...ateCoberturaModelPluginExpressionBuilder.m | 15 -- ...turaModelPluginParallelExpressionBuilder.m | 5 - ...erturaModelPluginSerialExpressionBuilder.m | 5 - ...ateFailOnWarningsPluginExpressionBuilder.m | 4 - ...nWarningsPluginParallelExpressionBuilder.m | 5 - ...lOnWarningsPluginSerialExpressionBuilder.m | 5 - .../CreateHTMLCodePluginExpressionBuilder.m | 20 -- ...eHTMLCodePluginParallelExpressionBuilder.m | 4 - ...ateHTMLCodePluginSerialExpressionBuilder.m | 4 - .../CreateHTMLModelPluginExpressionBuilder.m | 14 - ...HTMLModelPluginParallelExpressionBuilder.m | 4 - ...teHTMLModelPluginSerialExpressionBuilder.m | 4 - ...ateHTMLTestReportPluginExpressionBuilder.m | 14 - ...estReportPluginParallelExpressionBuilder.m | 4 - ...LTestReportPluginSerialExpressionBuilder.m | 4 - ...teHasBaseFolderSelectorExpressionBuilder.m | 14 - .../CreateHasNameSelectorExpressionBuilder.m | 14 - .../CreateHasTagSelectorExpressionBuilder.m | 15 -- .../CreateJUnitPluginExpressionBuilder.m | 15 -- ...eateJUnitPluginParallelExpressionBuilder.m | 5 - ...CreateJUnitPluginSerialExpressionBuilder.m | 5 - .../+test/CreatePDFPluginExpressionBuilder.m | 15 -- ...CreatePDFPluginParallelExpressionBuilder.m | 5 - .../CreatePDFPluginSerialExpressionBuilder.m | 5 - ...reateSimulinkTestPluginExpressionBuilder.m | 4 - ...ulinkTestPluginParallelExpressionBuilder.m | 5 - ...imulinkTestPluginSerialExpressionBuilder.m | 5 - ...mulinkTestResultsPluginExpressionBuilder.m | 15 -- ...stResultsPluginParallelExpressionBuilder.m | 5 - ...TestResultsPluginSerialExpressionBuilder.m | 5 - .../+test/CreateTAPPluginExpressionBuilder.m | 15 -- ...CreateTAPPluginParallelExpressionBuilder.m | 5 - .../CreateTAPPluginSerialExpressionBuilder.m | 5 - ...dHTMLCodePluginParallelExpressionBuilder.m | 17 -- ...AndHTMLCodePluginSerialExpressionBuilder.m | 25 -- ...rturaCodePluginParallelExpressionBuilder.m | 17 -- ...berturaCodePluginSerialExpressionBuilder.m | 24 -- ...turaModelPluginParallelExpressionBuilder.m | 19 -- ...erturaModelPluginSerialExpressionBuilder.m | 25 -- ...nWarningsPluginParallelExpressionBuilder.m | 17 -- ...lOnWarningsPluginSerialExpressionBuilder.m | 21 -- ...eHTMLCodePluginParallelExpressionBuilder.m | 17 -- ...ateHTMLCodePluginSerialExpressionBuilder.m | 24 -- ...HTMLModelPluginParallelExpressionBuilder.m | 19 -- ...teHTMLModelPluginSerialExpressionBuilder.m | 34 --- ...estReportPluginParallelExpressionBuilder.m | 16 -- ...LTestReportPluginSerialExpressionBuilder.m | 20 -- ...teHasBaseFolderSelectorExpressionBuilder.m | 36 --- .../CreateHasNameSelectorExpressionBuilder.m | 23 -- .../CreateHasTagSelectorExpressionBuilder.m | 23 -- ...eateJUnitPluginParallelExpressionBuilder.m | 17 -- ...CreateJUnitPluginSerialExpressionBuilder.m | 21 -- ...CreatePDFPluginParallelExpressionBuilder.m | 19 -- .../CreatePDFPluginSerialExpressionBuilder.m | 23 -- ...DFPluginWithMacParallelExpressionBuilder.m | 17 -- ...ePDFPluginWithMacSerialExpressionBuilder.m | 21 -- ...ulinkTestPluginParallelExpressionBuilder.m | 19 -- ...imulinkTestPluginSerialExpressionBuilder.m | 23 -- ...stResultsPluginParallelExpressionBuilder.m | 19 -- ...TestResultsPluginSerialExpressionBuilder.m | 23 -- ...gOriginalFormatParallelExpressionBuilder.m | 33 --- ...ingOriginalFormatSerialExpressionBuilder.m | 32 --- ...nUsingVersion13ParallelExpressionBuilder.m | 32 --- ...ginUsingVersion13SerialExpressionBuilder.m | 23 -- .../+internal/+mixin/EnvironmentDependent.m | 41 --- +scriptgen/+internal/+mixin/PathDependent.m | 24 -- .../+internal/+mixin/PlatformDependent.m | 25 -- +scriptgen/+internal/+mixin/Preferable.m | 75 ------ +scriptgen/+internal/+mixin/SetGet.m | 35 --- .../+internal/+mixin/VersionDependent.m | 41 --- .../+internal/+scripts/TestScriptBuilder.m | 249 ------------------ ...ssertNoFailuresWithAssertSequenceBuilder.m | 18 -- ...FailuresWithAssertSuccessSequenceBuilder.m | 18 -- .../+test/CreateTestRunnerSequenceBuilder.m | 214 --------------- .../+test/CreateTestSuiteSequenceBuilder.m | 67 ----- ...singWithTextOutputDetailStatementBuilder.m | 30 --- ...unnerUsingWithTextOutputStatementBuilder.m | 25 -- ...gWithTextOutputVerbosityStatementBuilder.m | 41 --- ...TestSuiteUsingFromFolderStatementBuilder.m | 21 -- ...eTestSuiteUsingTestsuiteStatementBuilder.m | 19 -- +scriptgen/+internal/CodeBuilderFactory.m | 40 --- +scriptgen/+internal/CodeBuilderLocator.m | 55 ---- +scriptgen/+internal/MissingCode.m | 10 - +scriptgen/+internal/MissingCodeBuilder.m | 10 - +scriptgen/+internal/PrunedStackException.m | 49 ---- +scriptgen/+internal/Version.m | 118 --------- +scriptgen/+internal/isAbsolutePath.m | 8 - +scriptgen/+internal/numericVerbosity.m | 20 -- +scriptgen/+internal/unquoteText.m | 11 - +scriptgen/+internal/validateText.m | 9 - +scriptgen/+internal/validateTextArray.m | 7 - +scriptgen/+internal/validateTextScalar.m | 7 - .../+internal/validateVerbosityScalar.m | 9 - +scriptgen/+scripts/TestScriptBuilder.m | 122 --------- .../+test/AssertNoFailuresSequenceBuilder.m | 20 -- .../+test/CreateTestRunnerSequenceBuilder.m | 104 -------- .../+test/CreateTestSuiteSequenceBuilder.m | 39 --- .../+test/CreateTestRunnerStatementBuilder.m | 27 -- .../+test/CreateTestSuiteStatementBuilder.m | 15 -- +scriptgen/Code.m | 38 --- +scriptgen/CodeBuilder.m | 18 -- +scriptgen/CodeProvider.m | 128 --------- +scriptgen/CodeWriter.m | 64 ----- +scriptgen/Expression.m | 42 --- +scriptgen/FileOutput.m | 22 -- +scriptgen/OutputStream.m | 14 - +scriptgen/Script.m | 83 ------ +scriptgen/Sequence.m | 43 --- +scriptgen/Statement.m | 55 ---- +scriptgen/TextOutput.m | 14 - baseline_API.mat | Bin 220520 -> 0 bytes genscript.m | 26 -- my_genscript.m | 35 --- tests/BaseClassWithMethodsToBeOverridden.m | 58 ---- tests/BaseTestCase.m | 69 ----- tests/ClassTestWithNotATestMethod.m | 15 -- tests/ClassWithNonAlphaNumericTestTags.m | 64 ----- tests/Copy_2_of_testModelSim.m | 59 ----- ...sTagsButHasTestMethodsWithAndWithoutTags.m | 17 -- tests/HasSealedTestTags.m | 10 - tests/HasUnsealedTestTags.m | 10 - tests/SimpleTestCase.m | 54 ---- tests/SuperclassHasTestMethodTestTags.m | 10 - tests/SuperclassHasTestMethodWithNoTestTags.m | 10 - tests/dummyClassName.m | 13 - tests/sampleFunctionTest.m | 12 - tests/sampleModel.slx | Bin 21064 -> 0 bytes 133 files changed, 3641 deletions(-) delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+mixin/EnvironmentDependent.m delete mode 100644 +scriptgen/+internal/+mixin/PathDependent.m delete mode 100644 +scriptgen/+internal/+mixin/PlatformDependent.m delete mode 100644 +scriptgen/+internal/+mixin/Preferable.m delete mode 100644 +scriptgen/+internal/+mixin/SetGet.m delete mode 100644 +scriptgen/+internal/+mixin/VersionDependent.m delete mode 100644 +scriptgen/+internal/+scripts/TestScriptBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m delete mode 100644 +scriptgen/+internal/CodeBuilderFactory.m delete mode 100644 +scriptgen/+internal/CodeBuilderLocator.m delete mode 100644 +scriptgen/+internal/MissingCode.m delete mode 100644 +scriptgen/+internal/MissingCodeBuilder.m delete mode 100644 +scriptgen/+internal/PrunedStackException.m delete mode 100644 +scriptgen/+internal/Version.m delete mode 100644 +scriptgen/+internal/isAbsolutePath.m delete mode 100644 +scriptgen/+internal/numericVerbosity.m delete mode 100644 +scriptgen/+internal/unquoteText.m delete mode 100644 +scriptgen/+internal/validateText.m delete mode 100644 +scriptgen/+internal/validateTextArray.m delete mode 100644 +scriptgen/+internal/validateTextScalar.m delete mode 100644 +scriptgen/+internal/validateVerbosityScalar.m delete mode 100644 +scriptgen/+scripts/TestScriptBuilder.m delete mode 100644 +scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m delete mode 100644 +scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m delete mode 100644 +scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m delete mode 100644 +scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m delete mode 100644 +scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m delete mode 100644 +scriptgen/Code.m delete mode 100644 +scriptgen/CodeBuilder.m delete mode 100644 +scriptgen/CodeProvider.m delete mode 100644 +scriptgen/CodeWriter.m delete mode 100644 +scriptgen/Expression.m delete mode 100644 +scriptgen/FileOutput.m delete mode 100644 +scriptgen/OutputStream.m delete mode 100644 +scriptgen/Script.m delete mode 100644 +scriptgen/Sequence.m delete mode 100644 +scriptgen/Statement.m delete mode 100644 +scriptgen/TextOutput.m delete mode 100644 baseline_API.mat delete mode 100644 genscript.m delete mode 100644 my_genscript.m delete mode 100644 tests/BaseClassWithMethodsToBeOverridden.m delete mode 100644 tests/BaseTestCase.m delete mode 100644 tests/ClassTestWithNotATestMethod.m delete mode 100644 tests/ClassWithNonAlphaNumericTestTags.m delete mode 100644 tests/Copy_2_of_testModelSim.m delete mode 100644 tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m delete mode 100644 tests/HasSealedTestTags.m delete mode 100644 tests/HasUnsealedTestTags.m delete mode 100644 tests/SimpleTestCase.m delete mode 100644 tests/SuperclassHasTestMethodTestTags.m delete mode 100644 tests/SuperclassHasTestMethodWithNoTestTags.m delete mode 100644 tests/dummyClassName.m delete mode 100644 tests/sampleFunctionTest.m delete mode 100644 tests/sampleModel.slx diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m deleted file mode 100644 index b676ca4..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m +++ /dev/null @@ -1,27 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2022 The MathWorks, Inc. - - properties - CoberturaFilePath = '''coverage.xml''' - HTMLFolderPath = '''htmlCodeCoverage''' - Source = {'pwd'} - end - - methods - function set.CoberturaFilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaFilePath = value; - end - - function set.HTMLFolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLFolderPath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 7ebedb1..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index c40200a..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m deleted file mode 100644 index b9895ae..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateCoberturaCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''coverage.xml''' - Source = {'pwd'} - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m deleted file mode 100644 index fc21b3f..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m deleted file mode 100644 index babd2ad..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m deleted file mode 100644 index d28898e..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateCoberturaModelPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''coverage.xml''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m deleted file mode 100644 index f5a05f7..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaModelPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 225b946..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaModelPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m deleted file mode 100644 index cd1cf92..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateFailOnWarningsPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m deleted file mode 100644 index f856a7b..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateFailOnWarningsPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m deleted file mode 100644 index f88742f..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateFailOnWarningsPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m deleted file mode 100644 index 9d3af0b..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef CreateHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FolderPath = '''htmlCodeCoverage''' - Source = {'pwd'} - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index ef3da65..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index ba627ec..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m deleted file mode 100644 index 5ca0813..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHTMLModelPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2021 The MathWorks, Inc. - - properties - FolderPath = '''htmlModelCoverage''' - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m deleted file mode 100644 index f6035a8..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLModelPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 5eec86e..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLModelPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m deleted file mode 100644 index 1ec207d..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHTMLTestReportPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2021 The MathWorks, Inc. - - properties - FolderPath = '''report''' - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m deleted file mode 100644 index 529027f..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLTestReportPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m deleted file mode 100644 index 111bc61..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLTestReportPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m deleted file mode 100644 index b6ea0d9..0000000 --- a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - BaseFolder = {'pwd'} - end - - methods - function set.BaseFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.BaseFolder = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m deleted file mode 100644 index 0970d04..0000000 --- a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHasNameSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - SelectByName = '' - end - - methods - function set.SelectByName(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByName = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m deleted file mode 100644 index 701c8e2..0000000 --- a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateHasTagSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - Tag = '''tag''' - end - - methods - function set.Tag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.Tag = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m deleted file mode 100644 index b43f40d..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateJUnitPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.xml''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m deleted file mode 100644 index 95eeec8..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateJUnitPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m deleted file mode 100644 index 4263785..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateJUnitPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m deleted file mode 100644 index 8d2a739..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreatePDFPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''report.pdf''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m deleted file mode 100644 index 3dcb143..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreatePDFPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreatePDFPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m deleted file mode 100644 index 9b5aaa8..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreatePDFPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreatePDFPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m deleted file mode 100644 index 8c6cc60..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateSimulinkTestPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m deleted file mode 100644 index 62624b7..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m deleted file mode 100644 index 6342a96..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m deleted file mode 100644 index c72b63c..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateSimulinkTestResultsPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.mldatx''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m deleted file mode 100644 index 76eea06..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m deleted file mode 100644 index e0c7d2e..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m deleted file mode 100644 index bab3767..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateTAPPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.tap''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m deleted file mode 100644 index 32b775a..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateTAPPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateTAPPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m deleted file mode 100644 index 167fe0f..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateTAPPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateTAPPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 13407f7..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index bd6dacc..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'matlab.unittest.plugins.codecoverage.CoverageReport', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', [CoberturaFormat(%s) CoverageReport(%s)])', source, obj.CoberturaFilePath, obj.HTMLFolderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m deleted file mode 100644 index bf30634..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateCoberturaCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m deleted file mode 100644 index a1c4d26..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef CreateCoberturaCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoberturaFormat(%s))', source, obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m deleted file mode 100644 index 2f65f4d..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateCoberturaModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 8f5ddaa..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateCoberturaModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'sltest.plugins.ModelCoveragePlugin'}; - - text = sprintf('ModelCoveragePlugin(''Producing'', CoberturaFormat(%s))', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m deleted file mode 100644 index 880bab9..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateFailOnWarningsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m deleted file mode 100644 index 7bb13ef..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateFailOnWarningsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') - end - - methods - function expression = build(~) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.FailOnWarningsPlugin'}; - - text = 'FailOnWarningsPlugin()'; - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 8d36823..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index d655874..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef CreateHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoverageReport', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoverageReport(%s))', source, obj.FolderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m deleted file mode 100644 index 1327a8c..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateHTMLModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m deleted file mode 100644 index a18bb0c..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,34 +0,0 @@ -classdef CreateHTMLModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'sltest.plugins.coverage.ModelCoverageReport', ... - 'sltest.plugins.ModelCoveragePlugin'}; - - % ModelCoverage report does not handle relative paths - if ~strcmp(obj.FolderPath, unquoteText(obj.FolderPath)) && ~isAbsolutePath(unquoteText(obj.FolderPath)) - folderPath = ['fullfile(pwd, ' obj.FolderPath ')']; - else - folderPath = obj.FolderPath; - end - - text = sprintf('ModelCoveragePlugin(''Producing'', ModelCoverageReport(%s))', folderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m deleted file mode 100644 index 4e484e6..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,16 +0,0 @@ -classdef CreateHTMLTestReportPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m deleted file mode 100644 index 56157bf..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef CreateHTMLTestReportPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingHTML(%s)', obj.FolderPath); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m deleted file mode 100644 index 824b670..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m +++ /dev/null @@ -1,36 +0,0 @@ -classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasBaseFolderSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') - end - - methods - function expression = build(obj) - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.selectors.HasBaseFolder', ... - 'matlab.unittest.constraints.StartsWithSubstring'}; - - constraints = {}; - for i = 1:numel(obj.BaseFolder) - folder = obj.BaseFolder{i}; - if ~strcmp(folder, unquoteText(folder)) && ~isAbsolutePath(unquoteText(folder)) - text = sprintf('StartsWithSubstring(fullfile(pwd, %s))', folder); - else - text = sprintf('StartsWithSubstring(%s)', folder); - end - constraints{end+1} = text; %#ok - end - - text = sprintf('HasBaseFolder(%s)', strjoin(constraints, ' | ')); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m deleted file mode 100644 index e5cee1f..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateHasNameSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasNameSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') - end - - methods - function expression = build(obj) - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - import scriptgen.Expression; - - text = sprintf('names = %s;', obj.SelectByName); - suiteStr = 'suite = suite.selectIf(''Name'', names);'; - fullText = sprintf('%s\n%s', text, suiteStr); - - expression = Expression(fullText); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m deleted file mode 100644 index 77c853e..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateHasTagSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasTagSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.selectors.HasTag'}; - - text = sprintf('HasTag(%s)', obj.Tag); - - expression = Expression(text, imports); - end - end -end - - - diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m deleted file mode 100644 index dafdf71..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateJUnitPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateJUnitPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m deleted file mode 100644 index 3d2c691..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateJUnitPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.XMLPlugin'}; - - text = sprintf('XMLPlugin.producingJUnitFormat(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m deleted file mode 100644 index e2ab00e..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreatePDFPluginParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PlatformDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - SupportedPlatforms = {'GLN', 'PC'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreatePDFPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m deleted file mode 100644 index 8a51d62..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreatePDFPluginSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PlatformDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017a') - SupportedPlatforms = {'GLN', 'PC'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m deleted file mode 100644 index e2f02b0..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreatePDFPluginWithMacParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreatePDFPluginWithMacSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m deleted file mode 100644 index 1fb5f26..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreatePDFPluginWithMacSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m deleted file mode 100644 index 44ad9c1..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateSimulinkTestPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m deleted file mode 100644 index 9fa3ad7..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateSimulinkTestPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(~) - import scriptgen.Expression; - - imports = {'sltest.plugins.TestManagerResultsPlugin'}; - - text = sprintf('TestManagerResultsPlugin()'); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m deleted file mode 100644 index ef4a6d8..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m deleted file mode 100644 index d114f61..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'sltest.plugins.TestManagerResultsPlugin'}; - - text = sprintf('TestManagerResultsPlugin(''ExportToFile'', %s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m deleted file mode 100644 index 9296d60..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m +++ /dev/null @@ -1,33 +0,0 @@ -classdef CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'matlab.unittest.plugins.ToUniqueFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - filePath = scriptgen.internal.unquoteText(obj.FilePath); - hadQuotes = ~strcmp(filePath, obj.FilePath); - if hadQuotes - [fp,name,ext] = fileparts(filePath); - filePath = ['''' fullfile(fp, name) '''']; - else - ext = '.tap'; - end - - text = sprintf('TAPPlugin.producingOriginalFormat(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m deleted file mode 100644 index 1d560ec..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m +++ /dev/null @@ -1,32 +0,0 @@ -classdef CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'matlab.unittest.plugins.ToFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - % Fixes an issue where ToFile did not properly resolve - % fullpaths prior to R2015a. - if ~strcmp(obj.FilePath, unquoteText(obj.FilePath)) && ~isAbsolutePath(unquoteText(obj.FilePath)) - filePath = ['fullfile(pwd, ' obj.FilePath ')']; - else - filePath = obj.FilePath; - end - - text = sprintf('TAPPlugin.producingOriginalFormat(ToFile(%s))', filePath); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m deleted file mode 100644 index 63d8a45..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m +++ /dev/null @@ -1,32 +0,0 @@ -classdef CreateTAPPluginUsingVersion13ParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.ToUniqueFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - filePath = scriptgen.internal.unquoteText(obj.FilePath); - hadQuotes = ~strcmp(filePath, obj.FilePath); - if hadQuotes - [fp,name,ext] = fileparts(filePath); - filePath = ['''' fullfile(fp, name) '''']; - else - ext = '.tap'; - end - - text = sprintf('TAPPlugin.producingVersion13(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m deleted file mode 100644 index 1c722c9..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateTAPPluginUsingVersion13SerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.ToFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - text = sprintf('TAPPlugin.producingVersion13(ToFile(%s))', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/EnvironmentDependent.m b/+scriptgen/+internal/+mixin/EnvironmentDependent.m deleted file mode 100644 index abfaf51..0000000 --- a/+scriptgen/+internal/+mixin/EnvironmentDependent.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef (Hidden, HandleCompatible) EnvironmentDependent - % EnvironmentDependent - Base class for mixins that indicate a class is - % dependent on the runtime environment in some way - % - % When a mixin class subclasses EnvironmentDependent, it should call - % the addIsSupportedFunction method in its constructor and add a - % function that evaluates to true/false depending on the current - % runtime environment. - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - IsSupportedFunctions - end - - methods - function tf = isSupportedByCurrentEnvironment(obj) - for i = 1:numel(obj.IsSupportedFunctions) - isSupported = obj.IsSupportedFunctions{i}; - if ~isSupported(obj) - tf = false; - return; - end - end - tf = true; - end - end - - methods (Hidden, Access = protected) - function obj = EnvironmentDependent() - if isempty(obj.IsSupportedFunctions) - obj.IsSupportedFunctions = {}; - end - end - - function obj = addIsSupportedFunction(obj, fcn) - obj.IsSupportedFunctions{end+1} = fcn; - end - end -end - diff --git a/+scriptgen/+internal/+mixin/PathDependent.m b/+scriptgen/+internal/+mixin/PathDependent.m deleted file mode 100644 index b7067d3..0000000 --- a/+scriptgen/+internal/+mixin/PathDependent.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef (Hidden, HandleCompatible) PathDependent < scriptgen.internal.mixin.EnvironmentDependent - % PathDependent - Indicates a class requires a set of path names on the - % current MATLAB search path - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - RequiredPathNames - end - - methods (Hidden, Access = protected) - function obj = PathDependent() - obj = obj.addIsSupportedFunction(@requiredNamesExistOnCurrentPath); - end - end - - methods (Access = protected) - function tf = requiredNamesExistOnCurrentPath(obj) - ret = cellfun(@(n)exist(n), obj.RequiredPathNames); %#ok - tf = all(ismember(ret, [2 3 4 5 6 7 8])); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/PlatformDependent.m b/+scriptgen/+internal/+mixin/PlatformDependent.m deleted file mode 100644 index b6617c7..0000000 --- a/+scriptgen/+internal/+mixin/PlatformDependent.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef (Hidden, HandleCompatible) PlatformDependent < scriptgen.internal.mixin.EnvironmentDependent - % PlatformDependent - Indicates a class requires a particular runtime - % platform like PCWIN64 or MACI64 - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - SupportedPlatforms - end - - methods (Hidden, Access = protected) - function obj = PlatformDependent() - obj = obj.addIsSupportedFunction(@isSupportedByCurrentPlatform); - end - end - - methods (Access = protected) - function tf = isSupportedByCurrentPlatform(obj) - exp = ['^(' strjoin(obj.SupportedPlatforms, '|') ')\w*']; - matches = regexp(computer(), exp, 'once'); - tf = any(matches); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/Preferable.m b/+scriptgen/+internal/+mixin/Preferable.m deleted file mode 100644 index b9fd4a5..0000000 --- a/+scriptgen/+internal/+mixin/Preferable.m +++ /dev/null @@ -1,75 +0,0 @@ -classdef (Hidden, HandleCompatible) Preferable - % Preferable - Base class for mixins that indicate an array of class - % objects may be sorted by some type of preferability - % - % When a mixin class subclasses Preferable, it should call the - % addPreferabilityComparator method in its constructor and add a - % function that accepts two objects and returns a negative value, - % zero, or positive value if the first object is less than, equal to, - % or greater than the second object. - % - % Note: one or both objects passed to the comparator may not derive - % from the mixin class. - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - PreferabilityComparators - end - - methods (Sealed) - function sorted = sortByPreferability(array) - map = mergeMaps({array.PreferabilityComparators}); - sorted = insertionSort(array, @(a,b)chainedComparator(a,b,map.values)); - end - end - - methods (Hidden, Access = protected) - function obj = Preferable() - if isempty(obj.PreferabilityComparators) - obj.PreferabilityComparators = containers.Map(); - end - end - - function obj = addPreferabilityComparator(obj, mixinClass, comparator) - obj.PreferabilityComparators(mixinClass) = comparator; - end - end -end - -function sorted = insertionSort(array, comparator) -for i = 2:numel(array) - key = array(i); - j = i - 1; - while j >= 1 && comparator(array(j), key) > 0 - array(j+1) = array(j); - j = j - 1; - end - array(j+1) = key; -end -sorted = array; -end - -function p = chainedComparator(a, b, comparators) -for i = 1:numel(comparators) - compare = comparators{i}; - value = compare(a, b); - assert(compare(b, a) == -value, 'comparator violates contract!'); - if value ~= 0 - p = value; - return; - end -end -p = 0; -end - -function m = mergeMaps(maps) -m = containers.Map(); -for i = 1:numel(maps) - map = maps{i}; - keys = map.keys; - for j = 1:numel(keys) - m(keys{j}) = map(keys{j}); - end -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+mixin/SetGet.m b/+scriptgen/+internal/+mixin/SetGet.m deleted file mode 100644 index cad3030..0000000 --- a/+scriptgen/+internal/+mixin/SetGet.m +++ /dev/null @@ -1,35 +0,0 @@ -classdef (Abstract) SetGet < handle - % SetGet - A primitive alternative to matlab.mixin.SetGet that works - % with releases prior to R2014b - - % Copyright 2020-2022 The MathWorks, Inc. - - methods - function set(obj, varargin) - if nargin == 2 - value = varargin{1}; - names = fieldnames(value); - for i = 1:numel(names) - obj.(names{i}) = value.(names{i}); - end - return; - end - for i = 1:2:numel(varargin) - obj.(varargin{i}) = varargin{i+1}; - end - end - - function value = get(obj, name) - if nargin == 1 - value = struct(); - props = properties(obj); - for i = 1:numel(props) - value.(props{i}) = obj.(props{i}); - end - return; - end - value = obj.(name); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/VersionDependent.m b/+scriptgen/+internal/+mixin/VersionDependent.m deleted file mode 100644 index 8108a08..0000000 --- a/+scriptgen/+internal/+mixin/VersionDependent.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef (Hidden, HandleCompatible) VersionDependent < scriptgen.internal.mixin.EnvironmentDependent ... - & scriptgen.internal.mixin.Preferable - % VersionDependent - Indicates a class requires a particular version of - % MATLAB - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - MinSupportedVersion - end - - methods (Hidden, Access = protected) - function obj = VersionDependent() - obj = obj.addIsSupportedFunction(@isSupportedByCurrentVersion); - obj = obj.addPreferabilityComparator('scriptgen.internal.mixin.VersionDependent', @comparePreferabilityByMinVersion); - end - end - - methods (Access = protected) - function tf = isSupportedByCurrentVersion(obj) - import scriptgen.internal.Version; - tf = obj.MinSupportedVersion <= Version.forCurrentRelease(); - end - end -end - -function p = comparePreferabilityByMinVersion(a, b) - if ~isa(a, 'scriptgen.internal.mixin.VersionDependent') && ~isa(b, 'scriptgen.internal.mixin.VersionDependent') - p = 0; - elseif ~isa(a, 'scriptgen.internal.mixin.VersionDependent') - p = -1; - elseif ~isa(b, 'scriptgen.internal.mixin.VersionDependent') - p = 1; - elseif a.MinSupportedVersion == b.MinSupportedVersion - p = 0; - elseif a.MinSupportedVersion < b.MinSupportedVersion - p = -1; - else - p = 1; - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+scripts/TestScriptBuilder.m b/+scriptgen/+internal/+scripts/TestScriptBuilder.m deleted file mode 100644 index 3941676..0000000 --- a/+scriptgen/+internal/+scripts/TestScriptBuilder.m +++ /dev/null @@ -1,249 +0,0 @@ -classdef TestScriptBuilder < scriptgen.scripts.TestScriptBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function script = build(obj) - import scriptgen.Script; - import scriptgen.Sequence; - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - suiteName = 'suite'; - runnerName = 'runner'; - resultsName = 'results'; - - sequences = Sequence.empty(); - - if ~isempty(obj.WorkingFolder) - sequences(end+1) = Sequence(sprintf('cd(''%s'');', escape(obj.WorkingFolder))); - end - - sequences = [sequences obj.buildAddpathSequence()]; - - sequences(end+1) = testCodeProvider.createSequence('CreateTestSuite', ... - 'CodeProvider', obj.CodeProvider, ... - 'SuiteName', suiteName,... - 'SelectByFolder', quoteCell(splitPath(obj.SelectByFolder)),... - 'SelectByTag', quote(obj.SelectByTag), ... - 'SelectByName', (obj.SelectByName)); - - sequences = [sequences obj.buildMkdirSequence()]; - - runnerSequence = Sequence.empty(); - - if obj.UseParallel - [canUseParallel, cannotUseParallelMsg] = canRunInParallel(); - if canUseParallel - runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, true); - if isempty(runnerSequence) - msg = ['Unable to generate all artifacts while running tests in parallel. ' ... - 'Running tests in serial instead.']; - sequences(end+1) = Sequence(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - end - else - msg = [cannotUseParallelMsg '. Running tests in serial instead.']; - sequences(end+1) = Sequence(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - end - end - - if isempty(runnerSequence) - sequences = [sequences obj.buildDeleteTAPResultsSequence()]; - runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, false); - runStatement = sprintf('%s = %s.run(%s);', resultsName, runnerName, suiteName); - else - runStatement = sprintf('%s = %s.runInParallel(%s);', resultsName, runnerName, suiteName); - end - - sequences(end+1) = runnerSequence; - sequences(end+1) = Sequence({ ... - runStatement, ... - sprintf('display(%s);', resultsName)}); - - sequences(end+1) = testCodeProvider.createSequence('AssertNoFailures', ... - 'CodeProvider', obj.CodeProvider, ... - 'ResultsName', resultsName); - - script = Script(sequences); - end - end - - methods (Access = private) - function s = buildAddpathSequence(obj) - import scriptgen.Sequence; - - dirs = splitPath(obj.SourceFolder); - - if isempty(dirs) - s = Sequence.empty(); - return; - end - - for i = numel(dirs):-1:1 - code{i} = sprintf('addpath(genpath(''%s''));', escape(dirs{i})); - end - s = Sequence(code); - end - - function s = buildMkdirSequence(obj) - import scriptgen.Sequence; - - dirs = cellfun(@(f)fileparts(f), { ... - obj.PDFTestReport, ... - obj.TAPTestResults, ... - obj.JUnitTestResults, ... - obj.SimulinkTestResults, ... - obj.CoberturaCodeCoverage, ... - obj.CoberturaModelCoverage}, ... - 'UniformOutput', false); - - % TAP results require a folder when running in parallel - if ~isempty(obj.TAPTestResults) && obj.UseParallel - [fp,name] = fileparts(obj.TAPTestResults); - dirs = [dirs {fullfile(fp,name)}]; - end - - % HTML artifacts take in folder path - htmlDirs = {obj.HTMLTestReport, ... - obj.HTMLCodeCoverage, ... - obj.HTMLModelCoverage}; - - dirs = [dirs htmlDirs]; - - dirs = dirs(~cellfun(@isempty, dirs)); - dirs = unique(dirs); - - if isempty(dirs) - s = Sequence.empty(); - return; - end - - for i = numel(dirs):-1:1 - code{i} = sprintf('[~,~] = mkdir(''%s'');', escape(dirs{i})); - end - s = Sequence(code); - end - - function s = buildDeleteTAPResultsSequence(obj) - import scriptgen.Sequence; - import scriptgen.internal.isAbsolutePath; - - % Only pre-existing TAP results need to be explicitly deleted - % at the moment. Other artifacts are automatically overwritten - % by their respective plugin. - files = {obj.TAPTestResults}; - files = files(~cellfun(@isempty, files)); - files = unique(files); - - if isempty(files) - s = Sequence.empty(); - return; - end - - code = {}; - for i = 1:numel(files) - filePath = escape(files{i}); - if ~isAbsolutePath(filePath) - fullFilePath = sprintf('fullfile(pwd, ''%s'')', filePath); - else - fullFilePath = sprintf('''%s''', filePath); - end - c{1} = sprintf('if exist(%s, ''file'') == 2', fullFilePath); - c{2} = sprintf(' delete(''%s'');', filePath); - c{3} = sprintf('end'); - code = [code c]; %#ok - end - s = Sequence(code); - end - - function s = buildCreateTestRunnerSequence(obj, provider, runnerName, useParallel) - source = obj.SourceFolder; - if isempty(source) - source = '.'; - end - - s = provider.createSequence('CreateTestRunner', ... - 'CodeProvider', obj.CodeProvider, ... - 'RunnerName', runnerName, ... - 'PDFTestReport', quote(obj.PDFTestReport), ... - 'HTMLTestReport', quote(obj.HTMLTestReport), ... - 'TAPTestResults', quote(obj.TAPTestResults), ... - 'JUnitTestResults', quote(obj.JUnitTestResults), ... - 'SimulinkTestResults', quote(obj.SimulinkTestResults), ... - 'CoberturaCodeCoverage', quote(obj.CoberturaCodeCoverage), ... - 'HTMLCodeCoverage', quote(obj.HTMLCodeCoverage), ... - 'CoberturaModelCoverage', quote(obj.CoberturaModelCoverage), ... - 'HTMLModelCoverage', quote(obj.HTMLModelCoverage), ... - 'SourceFolder', quoteCell(splitPath(source)), ... - 'LoggingLevel', obj.LoggingLevel, ... - 'OutputDetail', obj.OutputDetail, ... - 'Strict', obj.Strict, ... - 'UseParallel', useParallel); - end - end -end - -function [tf,msg] = canRunInParallel() -tf = false; -msg = ''; - -mc = meta.class.fromName('matlab.unittest.TestRunner'); -runInParallelMethod = mc.MethodList.findobj('Name', 'runInParallel'); -if isempty(runInParallelMethod) - msg = 'Unable to find a runInParallel method on matlab.unittest.TestRunner'; - return; -end - -licenseName = 'Distrib_Computing_Toolbox'; -if ~license('test', licenseName) - msg = 'Unable to find a license for Parallel Computing Toolbox'; - return; -end - -[canCheckout,~] = license('checkout', licenseName); -if ~canCheckout - msg = 'Unable to check out a license for Parallel Computing Toolbox'; - return; -end - -if isempty(gcp()) - msg = 'Unable to get or start a parallel pool'; - return; -end - -tf = true; -end - -function text = splitPath(text) -if iscellstr(text) %#ok - return; -elseif isempty(text) - text = {}; -else - text = strtrim(strsplit(text, {';', ':'})); -end -end - -function text = quote(text) -if isempty(text) - return; -end -text = ['''' escape(text) '''']; -end - -function text = quoteCell(text) -text = cellfun(@(t)['''' t ''''], escape(text), 'UniformOutput', false); -end - -function text = escape(text) -if isempty(text) - return; -end -text = strrep(text, '''', ''''''); -end diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m deleted file mode 100644 index a20e496..0000000 --- a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef AssertNoFailuresWithAssertSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - sequence = Sequence( ... - sprintf('assert(~any([%s.Failed]), ''At least one test failed in the test session.'');', obj.ResultsName)); - end - end -end - diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m deleted file mode 100644 index 1b9820f..0000000 --- a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef AssertNoFailuresWithAssertSuccessSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - sequence = Sequence( ... - sprintf('assertSuccess(%s);', obj.ResultsName)); - end - end -end - diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m deleted file mode 100644 index bd660dd..0000000 --- a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m +++ /dev/null @@ -1,214 +0,0 @@ -classdef CreateTestRunnerSequenceBuilder < scriptgen.sequences.test.CreateTestRunnerSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2024 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - if ~isempty(obj.CoberturaCodeCoverage) && isempty(obj.SourceFolder) - error('scriptgen:CreateTestRunner:sourceRequiredForCoberturaCodeCoverage', ... - '''SourceFolder'' is required when specifying ''CoberturaCodeCoverage''.'); - end - - if ~isempty(obj.HTMLCodeCoverage) && isempty(obj.SourceFolder) - error('scriptgen:CreateTestRunner:sourceRequiredForHTMLCodeCoverage', ... - '''SourceFolder'' is required when specifying ''HTMLCodeCoverage''.'); - end - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - sequence = Sequence.empty(); - - statements = testCodeProvider.createStatement('CreateTestRunner', ... - 'RunnerName', obj.RunnerName, ... - 'LoggingLevel', obj.LoggingLevel, ... - 'OutputDetail', obj.OutputDetail); - - if obj.Strict - fowStatement = obj.buildPluginStatement(testCodeProvider, 'fails tests when they issue warnings', ... - 'CreateFailOnWarningsPlugin'); - if isempty(fowStatement) - return; - end - statements(end+1) = fowStatement; - end - - hasPDF = false; - if ~isempty(obj.PDFTestReport) - [pdfStatement, hasPDF] = obj.buildPluginStatement(testCodeProvider, 'generates a PDF test results report', ... - 'CreatePDFPlugin', 'FilePath', obj.PDFTestReport); - if isempty(pdfStatement) - return; - end - statements(end+1) = pdfStatement; - end - - hasHTML = false; - if ~isempty(obj.HTMLTestReport) - [htmlReportStatement, hasHTML] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML test results report', ... - 'CreateHTMLTestReportPlugin', 'FolderPath', obj.HTMLTestReport); - if isempty(htmlReportStatement) - return; - end - statements(end+1) = htmlReportStatement; - end - - if ~isempty(obj.TAPTestResults) - tapStatement = obj.buildPluginStatement(testCodeProvider, 'generates a TAP test results report', ... - 'CreateTAPPlugin', 'FilePath', obj.TAPTestResults); - if isempty(tapStatement) - return; - end - statements(end+1) = tapStatement; - end - - if ~isempty(obj.JUnitTestResults) - junitStatement = obj.buildPluginStatement(testCodeProvider, 'generates a JUnit test results report', ... - 'CreateJUnitPlugin', 'FilePath', obj.JUnitTestResults); - if isempty(junitStatement) - return; - end - statements(end+1) = junitStatement; - end - - hasSimTest = false; - if ~isempty(obj.SimulinkTestResults) - [simResultsStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... - 'CreateSimulinkTestResultsPlugin', 'FilePath', obj.SimulinkTestResults); - if isempty(simResultsStatement) - return; - end - statements(end+1) = simResultsStatement; - end - - if (hasPDF || hasHTML) && ~hasSimTest - % Do not warn if we cannot add Simulink Test plugin because the user did - % not explicitly request it. - warningState = warning('off', 'scriptgen:featureNotAvailable'); - restoreState = onCleanup(@()warning(warningState)); - [simTestStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... - 'CreateSimulinkTestPlugin'); - delete(restoreState); - if isempty(simTestStatement) - return; - end - if hasSimTest - statements(end+1) = simTestStatement; - end - end - - if (hasPDF || hasHTML) && hasSimTest && obj.UseParallel && verLessThan('matlab', '9.13') - % g2730113. Fall back to running serially. - return; - end - - % More than one CodeCoveragePlugin cannot exist on the same runner if they - % have overlapping source files. - hasCodeCov = false; - if ~isempty(obj.CoberturaCodeCoverage) && ~isempty(obj.HTMLCodeCoverage) - [dualCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates Cobertura and HTML code coverage reports', ... - 'CreateCoberturaAndHTMLCodePlugin', ... - 'CoberturaFilePath', obj.CoberturaCodeCoverage, ... - 'HTMLFolderPath', obj.HTMLCodeCoverage, ... - 'Source', obj.SourceFolder); - if isempty(dualCodeStatement) - return; - end - statements(end+1) = dualCodeStatement; - end - - if ~isempty(obj.CoberturaCodeCoverage) && ~hasCodeCov - [coberturaCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura code coverage report', ... - 'CreateCoberturaCodePlugin', 'FilePath', obj.CoberturaCodeCoverage, 'Source', obj.SourceFolder); - if isempty(coberturaCodeStatement) - return; - end - statements(end+1) = coberturaCodeStatement; - end - - if ~isempty(obj.HTMLCodeCoverage) && ~hasCodeCov - [htmlCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML code coverage report', ... - 'CreateHTMLCodePlugin', 'FolderPath', obj.HTMLCodeCoverage, 'Source', obj.SourceFolder); %#ok - if isempty(htmlCodeStatement) - return; - end - statements(end+1) = htmlCodeStatement; - end - - if ~isempty(obj.CoberturaModelCoverage) - coberturaModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura model coverage report', ... - 'CreateCoberturaModelPlugin', 'FilePath', obj.CoberturaModelCoverage); - if isempty(coberturaModelStatement) - return; - end - statements(end+1) = coberturaModelStatement; - end - - if ~isempty(obj.HTMLModelCoverage) - htmlModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates an HTML model coverage report', ... - 'CreateHTMLModelPlugin', 'FolderPath', obj.HTMLModelCoverage); - if isempty(htmlModelStatement) - return; - end - statements(end+1) = htmlModelStatement; - end - - sequence = Sequence(statements); - end - end - - methods (Access = private) - function [statement, success] = buildPluginStatement(obj, provider, purpose, type, varargin) - import scriptgen.Statement; - - statement = Statement.empty(); - success = false; - - if obj.UseParallel - statement = obj.buildAddPluginStatement(provider.createExpression([type 'Parallel'], varargin{:})); - end - - if isempty(statement) - statement = obj.buildAddPluginStatement(provider.createExpression([type 'Serial'], varargin{:})); - if ~isempty(statement) && obj.UseParallel - % We could not create the parallel statement but we could create the - % non-parallel statement. Return empty so we can fall back to running - % serially, as we prefer to produce requested artifacts over running in - % parallel. - warning('scriptgen:featureNotAvailable', ... - ['Unable to add a plugin that ' purpose ' while running tests in parallel.']); - statement = Statement.empty(); - return; - end - end - - if isempty(statement) - % We could not create the parallel or non-parallel statement. No point in - % falling back at this point. Put a comment in place of the statement. - msg = ['Unable to add a plugin that ' purpose '. This problem might be due to a MATLAB release ' ... - 'or operating system that does not support the plugin, ' ... - 'a missing toolbox, or a missing license.']; - statement = Statement(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - return; - end - - success = true; - end - - function statement = buildAddPluginStatement(obj, expression) - import scriptgen.Statement; - - if isempty(expression) - statement = Statement.empty(); - return; - end - statement = Statement(sprintf('%s.addPlugin(%s);', obj.RunnerName, expression.Text), expression.RequiredImports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m deleted file mode 100644 index 6839529..0000000 --- a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ /dev/null @@ -1,67 +0,0 @@ -classdef CreateTestSuiteSequenceBuilder < scriptgen.sequences.test.CreateTestSuiteSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - import scriptgen.Statement; - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - statements = testCodeProvider.createStatement('CreateTestSuite', ... - 'SuiteName', obj.SuiteName); - - if ~isempty(obj.SelectByFolder) - statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'base folder selector', ... - 'CreateHasBaseFolderSelector', 'BaseFolder', obj.SelectByFolder); - end - - if ~isempty(obj.SelectByTag) - statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'tag selector', ... - 'CreateHasTagSelector', 'Tag', obj.SelectByTag); - end - - if ~isempty(obj.SelectByName) - expression= testCodeProvider.createExpression('CreateHasNameSelector','SelectByName', obj.SelectByName); - statements(end+1) = Statement(expression.Text, expression.RequiredImports); - end - - sequence = Sequence(statements); - end - end - - methods (Access = private) - function [statement, success] = buildSelectorStatement(obj, provider, name, type, varargin) - import scriptgen.Statement; - - statement = obj.buildSelectIfStatement(provider.createExpression(type, varargin{:})); - if isempty(statement) - success = false; - msg = ['Unable to create ' name '. This problem might be due to a MATLAB release ' ... - 'or operating system that does not support generating the specified artifact, ' ... - 'a missing toolbox, or a missing license.']; - statement = Statement(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - return; - end - - success = true; - end - - function statement = buildSelectIfStatement(obj, expression) - import scriptgen.Statement; - - if isempty(expression) - statement = Statement.empty(); - return; - end - statement = Statement(sprintf('%s = %s.selectIf(%s);', obj.SuiteName, obj.SuiteName, expression.Text), expression.RequiredImports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m deleted file mode 100644 index 0f9ce75..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m +++ /dev/null @@ -1,30 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputDetailStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - import scriptgen.internal.numericVerbosity; - - imports = {'matlab.unittest.TestRunner'}; - - nvpairs = {}; - if ~isempty(obj.LoggingLevel) - nvpairs{end+1} = sprintf('''LoggingLevel'', %s', num2str(numericVerbosity(obj.LoggingLevel))); - end - if ~isempty(obj.OutputDetail) - nvpairs{end+1} = sprintf('''OutputDetail'', %s', num2str(numericVerbosity(obj.OutputDetail))); - end - - text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m deleted file mode 100644 index 8f00299..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - imports = {'matlab.unittest.TestRunner'}; - - text = sprintf('%s = TestRunner.withTextOutput();', obj.RunnerName); - - if ~isempty(obj.LoggingLevel) || ~isempty(obj.OutputDetail) - text = [text ' % Unable to specify the logging level or output detail in this release of MATLAB.']; - end - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m deleted file mode 100644 index 326fe39..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014b') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - import scriptgen.internal.numericVerbosity; - - imports = {'matlab.unittest.TestRunner'}; - - if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) - verbosity = max(numericVerbosity(obj.LoggingLevel), numericVerbosity(obj.OutputDetail)); - elseif ~isempty(obj.LoggingLevel) - verbosity = numericVerbosity(obj.LoggingLevel); - elseif ~isempty(obj.OutputDetail) - verbosity = numericVerbosity(obj.OutputDetail); - else - verbosity = []; - end - - nvpairs = {}; - if ~isempty(verbosity) - nvpairs{end+1} = sprintf('''Verbosity'', %s', num2str(verbosity)); - end - - text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); - - if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) - text = [text ' % Unable to specify the logging level and output detail independently in this release of MATLAB.']; - end - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m deleted file mode 100644 index a35272f..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateTestSuiteUsingFromFolderStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - imports = {'matlab.unittest.TestSuite'}; - - text = sprintf('%s = TestSuite.fromFolder(pwd, ''IncludingSubfolders'', true);', obj.SuiteName); - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m deleted file mode 100644 index f9ffc69..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateTestSuiteUsingTestsuiteStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - text = sprintf('%s = testsuite(pwd, ''IncludeSubfolders'', true);', obj.SuiteName); - - statement = Statement(text); - end - end -end - diff --git a/+scriptgen/+internal/CodeBuilderFactory.m b/+scriptgen/+internal/CodeBuilderFactory.m deleted file mode 100644 index de0be85..0000000 --- a/+scriptgen/+internal/CodeBuilderFactory.m +++ /dev/null @@ -1,40 +0,0 @@ -classdef CodeBuilderFactory < handle - % CodeBuilderFactory - Factory that creates CodeBuilders - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - Locator - end - - methods - function obj = CodeBuilderFactory(locator) - obj.Locator = locator; - end - - function builder = create(obj, type) - % create - Creates a single CodeBuilder - % - % Creates the most preferable CodeBuilder supported by the - % current runtime environment or empty. - - import scriptgen.internal.MissingCodeBuilder; - - metaclasses = obj.Locator.locate(type); - builder = MissingCodeBuilder.empty(); - for i = numel(metaclasses):-1:1 - constructor = str2func(metaclasses(i).Name); - builder(i) = constructor(); - end - - isSupported = arrayfun(@(b)b.isSupportedByCurrentEnvironment(), builder); - builder = builder(isSupported); - - if numel(builder) > 1 - builder = builder.sortByPreferability(); - builder = builder(end); - end - end - end -end - diff --git a/+scriptgen/+internal/CodeBuilderLocator.m b/+scriptgen/+internal/CodeBuilderLocator.m deleted file mode 100644 index b6addb6..0000000 --- a/+scriptgen/+internal/CodeBuilderLocator.m +++ /dev/null @@ -1,55 +0,0 @@ -classdef CodeBuilderLocator - % CodeBuilderLocator - Locator of CodeBuilder metaclasses - - % Copyright 2020 The MathWorks, Inc. - - properties (Dependent, Access = private) - ImplementationPackage - InterfacePackage - end - - properties (Access = private) - ImplementationPackageName - InterfacePackageName - end - - methods - function obj = CodeBuilderLocator(implPackage, intfPackage) - if ~ischar(implPackage) || ~ischar(intfPackage) - error('Packages must be provided as character arrays'); - end - obj.ImplementationPackageName = implPackage; - obj.InterfacePackageName = intfPackage; - end - - function p = get.ImplementationPackage(obj) - p = meta.package.fromName(obj.ImplementationPackageName); - end - - function p = get.InterfacePackage(obj) - p = meta.package.fromName(obj.InterfacePackageName); - end - - function metaclasses = locate(obj, type) - if ischar(type) - type = prependPrefix([obj.InterfacePackage.Name '.'], type); - type = meta.class.fromName(type); - end - if isempty(type) - metaclasses = type; - return; - end - classes = obj.ImplementationPackage.ClassList; - classes = classes(classes <= type); - classes = classes(~[classes.Abstract]); - metaclasses = classes; - end - end -end - -function name = prependPrefix(prefix, name) - if isempty(regexp(name, ['^' prefix '\w*'], 'once')) - name = [prefix name]; - end -end - diff --git a/+scriptgen/+internal/MissingCode.m b/+scriptgen/+internal/MissingCode.m deleted file mode 100644 index 06f9524..0000000 --- a/+scriptgen/+internal/MissingCode.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef MissingCode < scriptgen.Code - % Copyright 2020 The MathWorks, Inc. - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(~, ~) - error('Called write on MissingCode'); - end - end -end - diff --git a/+scriptgen/+internal/MissingCodeBuilder.m b/+scriptgen/+internal/MissingCodeBuilder.m deleted file mode 100644 index 70c8d0e..0000000 --- a/+scriptgen/+internal/MissingCodeBuilder.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef MissingCodeBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - methods - function code = build(~) %#ok - error('Called build on MissingCodeBuilder'); - end - end -end - diff --git a/+scriptgen/+internal/PrunedStackException.m b/+scriptgen/+internal/PrunedStackException.m deleted file mode 100644 index 71e7853..0000000 --- a/+scriptgen/+internal/PrunedStackException.m +++ /dev/null @@ -1,49 +0,0 @@ -classdef PrunedStackException < MException - % Copyright 2020 MathWorks, Inc. - - properties(SetAccess=immutable, GetAccess=protected) - PrunedStack - end - - methods - function pruned = PrunedStackException(other, frameToPrune) - if nargin < 2 - % If no frame is specified, prune the frame of the caller - s = dbstack('-completenames'); - if numel(s) > 1 - frameToPrune = rmfield(s(2), 'line'); - else - frameToPrune = struct('file', {}); - end - end - - pruned = pruned@MException(other.identifier, '%s', other.message); - if isprop(pruned, 'type') && isprop(other, 'type') - pruned.type = other.type; - end - for idx = 1:numel(other.cause) - pruned = pruned.addCause(scriptgen.internal.PrunedStackException(other.cause{idx}, frameToPrune)); - end - - stack = other.getStack(); - remove = ismember({stack.file}, {frameToPrune.file}); - if isfield(frameToPrune, 'name') - remove = ismember({stack.name}, {frameToPrune.name}) & remove; - end - if isfield(frameToPrune, 'line') - remove = ismember([stack.line], [frameToPrune.line]) & remove; - end - stack(remove) = []; - - pruned.PrunedStack = stack; - end - end - - methods(Access=protected) - function stack = getStack(pruned) - stack = pruned.PrunedStack; - end - end -end - - diff --git a/+scriptgen/+internal/Version.m b/+scriptgen/+internal/Version.m deleted file mode 100644 index 8572e51..0000000 --- a/+scriptgen/+internal/Version.m +++ /dev/null @@ -1,118 +0,0 @@ -classdef Version - % Version - A MATLAB-style version - % - % Valid versions take the form XXX.XXX.XXX.XXXXXXXXX, where X may be - % a digit only. - % - % Examples of valid versions: - % - % 9 - % 9.7 - % 9.7.0.1261785 - % - % Examples of invalid versions: - % - % 9.1-beta - % R2019a - - % Copyright 2020-2022 The MathWorks, Inc. - - properties (SetAccess = immutable) - Parts - end - - methods - function obj = Version(verstr) - p = sscanf(verstr, '%3d.%3d.%3d.%9d'); - s = strjoin(strtrim(cellstr(num2str(p)))', '.'); - if ~strcmp(s, verstr) - error('scriptgen:Version:invalidFormat', 'invalid verstr format'); - end - p(end+1:4) = 0; - obj.Parts = p(:)'; - end - - function t = eq(a, b) - t = diff(a, b) == 0; - end - - function t = ne(a, b) - t = diff(a, b) ~= 0; - end - - function t = lt(a, b) - t = diff(a, b) < 0; - end - - function t = le(a, b) - t = diff(a, b) <= 0; - end - - function t = gt(a, b) - t = diff(a, b) > 0; - end - - function t = ge(a, b) - t = diff(a, b) >= 0; - end - end - - methods (Access = private) - function d = diff(a, b) - if ~isa(a, 'scriptgen.internal.Version') || ~isa(b, 'scriptgen.internal.Version') - error('incompatible types'); - end - d = a.num - b.num; - end - - function n = num(obj) - n = arrayfun(@(v)str2double(sprintf('%03d%03d%03d%09d', v.Parts)), obj); - end - end - - properties (Access = private, Constant) - ReleaseVersions = map( ... - 'R2022b', '9.13', ... - 'R2022a', '9.12', ... - 'R2021b', '9.11', ... - 'R2021a', '9.10', ... - 'R2020b', '9.9', ... - 'R2020a', '9.8', ... - 'R2019b', '9.7', ... - 'R2019a', '9.6', ... - 'R2018b', '9.5', ... - 'R2018a', '9.4', ... - 'R2017b', '9.3', ... - 'R2017a', '9.2', ... - 'R2016b', '9.1', ... - 'R2016a', '9.0', ... - 'R2015b', '8.6', ... - 'R2015a', '8.5', ... - 'R2014b', '8.4', ... - 'R2014a', '8.3', ... - 'R2013b', '8.2', ... - 'R2013a', '8.1'); - end - - methods (Static) - function v = forRelease(release) - r = scriptgen.internal.Version.ReleaseVersions; - if ~r.isKey(release) - error('scriptgen:Version:unknownRelease', 'unknown release'); - end - v = scriptgen.internal.Version(r(release)); - end - - function v = forCurrentRelease() - s = strsplit(version()); - v = scriptgen.internal.Version(s{1}); - end - end -end - -function m = map(varargin) -m = containers.Map(); -for i = 1:2:numel(varargin) - m(varargin{i}) = varargin{i+1}; -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/isAbsolutePath.m b/+scriptgen/+internal/isAbsolutePath.m deleted file mode 100644 index d25ab5f..0000000 --- a/+scriptgen/+internal/isAbsolutePath.m +++ /dev/null @@ -1,8 +0,0 @@ -function tf = isAbsolutePath(p) -if ispc() - tf = ~isempty(regexp(p, '^.:', 'once')) || strncmp(p, '\\', 2); -else - tf = any(strncmp(p, {'/', '~'}, 1)); -end -end - diff --git a/+scriptgen/+internal/numericVerbosity.m b/+scriptgen/+internal/numericVerbosity.m deleted file mode 100644 index ee7759d..0000000 --- a/+scriptgen/+internal/numericVerbosity.m +++ /dev/null @@ -1,20 +0,0 @@ -function n = numericVerbosity(verbosity) -% Copyright 2022 The MathWorks, Inc. -if isnumeric(verbosity) - n = verbosity; -elseif strcmpi(verbosity, 'none') - n = 0; -elseif strcmpi(verbosity, 'terse') - n = 1; -elseif strcmpi(verbosity, 'concise') - n = 2; -elseif strcmpi(verbosity, 'detailed') - n = 3; -elseif strcmpi(verbosity, 'verbose') - n = 4; -else - warning('scriptgen:numericVerbosity:unknownVerbosity', ... - 'Unknown verbosity level. Defaulting to maximum verbosity.'); - n = 4; -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/unquoteText.m b/+scriptgen/+internal/unquoteText.m deleted file mode 100644 index 18caebe..0000000 --- a/+scriptgen/+internal/unquoteText.m +++ /dev/null @@ -1,11 +0,0 @@ -function u = unquoteText(text) -% Copyright 2020 The MathWorks, Inc. -s = regexp(text, '^''', 'once'); -e = regexp(text, '''$', 'once'); -if isempty(s) || isempty(e) - u = text; -else - u = text(s+1:e-1); -end -end - diff --git a/+scriptgen/+internal/validateText.m b/+scriptgen/+internal/validateText.m deleted file mode 100644 index c7d578e..0000000 --- a/+scriptgen/+internal/validateText.m +++ /dev/null @@ -1,9 +0,0 @@ -function validateText(value) -% Copyright 2020 The MathWorks, Inc. -if ischar(value) - scriptgen.internal.validateTextScalar(value); -else - scriptgen.internal.validateTextArray(value); -end -end - diff --git a/+scriptgen/+internal/validateTextArray.m b/+scriptgen/+internal/validateTextArray.m deleted file mode 100644 index aff6396..0000000 --- a/+scriptgen/+internal/validateTextArray.m +++ /dev/null @@ -1,7 +0,0 @@ -function validateTextArray(value) -% Copyright 2020 The MathWorks, Inc. -if ~iscellstr(value) || ~(isempty(value) || isvector(value)) %#ok - error('MATLAB:invalidType', 'Expected input to be cellstr vector'); -end -end - diff --git a/+scriptgen/+internal/validateTextScalar.m b/+scriptgen/+internal/validateTextScalar.m deleted file mode 100644 index 7aca2ad..0000000 --- a/+scriptgen/+internal/validateTextScalar.m +++ /dev/null @@ -1,7 +0,0 @@ -function validateTextScalar(value) -% Copyright 2020 The MathWorks, Inc. -if isempty(value) && ischar(value) - return; -end -validateattributes(value, {'char'}, {'vector'}); -end diff --git a/+scriptgen/+internal/validateVerbosityScalar.m b/+scriptgen/+internal/validateVerbosityScalar.m deleted file mode 100644 index 6f555b3..0000000 --- a/+scriptgen/+internal/validateVerbosityScalar.m +++ /dev/null @@ -1,9 +0,0 @@ -function validateVerbosityScalar(value) -% Copyright 2022 The MathWorks, Inc. -if ischar(value) - scriptgen.internal.validateTextScalar(value); -else - validateattributes(value, {'numeric'}, {'scalar'}); -end -end - diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m deleted file mode 100644 index b1caf40..0000000 --- a/+scriptgen/+scripts/TestScriptBuilder.m +++ /dev/null @@ -1,122 +0,0 @@ -classdef TestScriptBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - WorkingFolder = '' - PDFTestReport = '' - HTMLTestReport = '' - TAPTestResults = '' - JUnitTestResults = '' - SimulinkTestResults = '' - CoberturaCodeCoverage = '' - HTMLCodeCoverage = '' - CoberturaModelCoverage = '' - HTMLModelCoverage = '' - SourceFolder = '' - SelectByFolder = '' - SelectByTag = '' - LoggingLevel = '' - OutputDetail = '' - Strict = false - UseParallel = false - SelectByName = '' - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.WorkingFolder(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.WorkingFolder = value; - end - - function set.PDFTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.PDFTestReport = value; - end - - function set.HTMLTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLTestReport = value; - end - - function set.TAPTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.TAPTestResults = value; - end - - function set.JUnitTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.JUnitTestResults = value; - end - - function set.SimulinkTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SimulinkTestResults = value; - end - - function set.CoberturaCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaCodeCoverage = value; - end - - function set.HTMLCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLCodeCoverage = value; - end - - function set.CoberturaModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaModelCoverage = value; - end - - function set.HTMLModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLModelCoverage = value; - end - - function set.SourceFolder(obj, value) - scriptgen.internal.validateText(value); - obj.SourceFolder = value; - end - - function set.SelectByFolder(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByFolder = value; - end - - function set.SelectByTag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SelectByTag = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - - function set.Strict(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.Strict = value; - end - - function set.UseParallel(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.UseParallel = value; - end - function set.SelectByName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SelectByName = value; - end - end -end - diff --git a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m deleted file mode 100644 index 760eadb..0000000 --- a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef AssertNoFailuresSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - ResultsName = 'results' - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.ResultsName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.ResultsName = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m deleted file mode 100644 index b714b97..0000000 --- a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m +++ /dev/null @@ -1,104 +0,0 @@ -classdef CreateTestRunnerSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - RunnerName = 'runner' - PDFTestReport = '' - HTMLTestReport = '' - TAPTestResults = '' - JUnitTestResults = '' - SimulinkTestResults = '' - CoberturaCodeCoverage = '' - HTMLCodeCoverage = '' - CoberturaModelCoverage = '' - HTMLModelCoverage = '' - SourceFolder = {} - LoggingLevel = '' - OutputDetail = '' - Strict = false - UseParallel = false - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.RunnerName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.RunnerName = value; - end - - function set.PDFTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.PDFTestReport = value; - end - - function set.HTMLTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLTestReport = value; - end - - function set.TAPTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.TAPTestResults = value; - end - - function set.JUnitTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.JUnitTestResults = value; - end - - function set.SimulinkTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SimulinkTestResults = value; - end - - function set.CoberturaCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaCodeCoverage = value; - end - - function set.HTMLCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLCodeCoverage = value; - end - - function set.CoberturaModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaModelCoverage = value; - end - - function set.HTMLModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLModelCoverage = value; - end - - function set.SourceFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.SourceFolder = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - - function set.Strict(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.Strict = value; - end - - function set.UseParallel(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.UseParallel = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m deleted file mode 100644 index 3421c03..0000000 --- a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ /dev/null @@ -1,39 +0,0 @@ -classdef CreateTestSuiteSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - SuiteName = 'suite' - SelectByFolder = {} - SelectByTag = '' - SelectByName = '' - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.SuiteName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SuiteName = value; - end - - function set.SelectByFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.SelectByFolder = value; - end - - function set.SelectByTag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SelectByTag = value; - end - - function set.SelectByName(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByName = value; - end - end -end - diff --git a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m deleted file mode 100644 index d641f2c..0000000 --- a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m +++ /dev/null @@ -1,27 +0,0 @@ -classdef CreateTestRunnerStatementBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - RunnerName = 'runner' - LoggingLevel = 'terse' - OutputDetail = 'concise' - end - - methods - function set.RunnerName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.RunnerName = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - end -end - diff --git a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m deleted file mode 100644 index 041aff8..0000000 --- a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateTestSuiteStatementBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - SuiteName = 'suite' - end - - methods - function set.SuiteName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SuiteName = value; - end - end -end - diff --git a/+scriptgen/Code.m b/+scriptgen/Code.m deleted file mode 100644 index e142341..0000000 --- a/+scriptgen/Code.m +++ /dev/null @@ -1,38 +0,0 @@ -classdef Code < matlab.mixin.Heterogeneous - % Code - Base class for all classes writable by CodeWriter - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Contents - end - - methods - function contents = get.Contents(obj) - import scriptgen.TextOutput; - stream = TextOutput(); - obj.writeToStream(stream); - contents = stream.Text; - end - end - - methods (Abstract, Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - write(obj, writer) - end - - methods (Access = protected) - function writeToStream(obj, stream) - import scriptgen.CodeWriter; - writer = CodeWriter(stream); - close = onCleanup(@()writer.close()); - obj.write(writer); - end - end - - methods (Static, Sealed, Access = protected) - function builder = getDefaultScalarElement() - builder = scriptgen.internal.MissingCode(); - end - end -end - diff --git a/+scriptgen/CodeBuilder.m b/+scriptgen/CodeBuilder.m deleted file mode 100644 index 893213c..0000000 --- a/+scriptgen/CodeBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef CodeBuilder < matlab.mixin.Heterogeneous & scriptgen.internal.mixin.SetGet ... - & scriptgen.internal.mixin.EnvironmentDependent ... - & scriptgen.internal.mixin.Preferable - % CodeBuilder - Base class for builders of immutable code objects - - % Copyright 2020 The MathWorks, Inc. - - methods (Abstract) - code = build(obj) - end - - methods (Static, Sealed, Access = protected) - function builder = getDefaultScalarElement() - builder = scriptgen.internal.MissingCodeBuilder(); - end - end -end - diff --git a/+scriptgen/CodeProvider.m b/+scriptgen/CodeProvider.m deleted file mode 100644 index fd64af5..0000000 --- a/+scriptgen/CodeProvider.m +++ /dev/null @@ -1,128 +0,0 @@ -classdef CodeProvider < handle - % CodeProvider - Provider of immutable code objects - % - % The scriptgen.CodeProvider class serves as the primary interface - % for creating pre-made code objects. To create code objects the - % CodeProvider utilizes builders under the following packages: - % - % scriptgen.expressions - Expression builders - % scriptgen.scripts - Script builders - % scriptgen.sequences - Sequence builders - % scriptgen.statements - Statement builders - % - % To locate a builder, the CodeProvider relies on the builder's class - % name. For example, when called to create a Script of type 'Test', - % the CodeProvider will look for a Script builder under - % scriptgen.scripts with the class name 'TestScriptBuilder'. It will - % then utilize an internal implementation of that builder to create - % the requested Script object. - % - % Builders may also exist under subpackages. To access builders under - % subpackages, a new CodeProvider must be instantiated with the - % subpackage name. The withSubpackage method is a convenience for - % instantiating new providers off an existing provider. - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = private) - Subpackage - end - - properties (Access = private) - ExpressionBuilderFactory - StatementBuilderFactory - SequenceBuilderFactory - ScriptBuilderFactory - end - - methods - function obj = CodeProvider(subpackage) - import scriptgen.internal.validateTextScalar; - - if nargin < 1 - subpackage = ''; - end - validateTextScalar(subpackage); - - obj.ExpressionBuilderFactory = obj.createFactory('expressions', subpackage); - obj.StatementBuilderFactory = obj.createFactory('statements', subpackage); - obj.SequenceBuilderFactory = obj.createFactory('sequences', subpackage); - obj.ScriptBuilderFactory = obj.createFactory('scripts', subpackage); - - obj.Subpackage = subpackage; - end - - function expression = createExpression(obj, type, varargin) - type = appendSuffix(type, 'ExpressionBuilder'); - expression = obj.createCode(obj.ExpressionBuilderFactory, type, varargin{:}); - end - - function statement = createStatement(obj, type, varargin) - type = appendSuffix(type, 'StatementBuilder'); - statement = obj.createCode(obj.StatementBuilderFactory, type, varargin{:}); - end - - function sequence = createSequence(obj, type, varargin) - type = appendSuffix(type, 'SequenceBuilder'); - sequence = obj.createCode(obj.SequenceBuilderFactory, type, varargin{:}); - end - - function script = createScript(obj, type, varargin) - type = appendSuffix(type, 'ScriptBuilder'); - script = obj.createCode(obj.ScriptBuilderFactory, type, varargin{:}); - end - - function provider = withSubpackage(obj, subpackage) - import scriptgen.CodeProvider; - - sub = pkgjoin({obj.Subpackage, subpackage}); - provider = CodeProvider(sub); - end - end - - methods (Access = private) - function factory = createFactory(~, type, subpackage) - import scriptgen.internal.CodeBuilderLocator; - import scriptgen.internal.CodeBuilderFactory; - - implPackage = pkgjoin({'scriptgen.internal', type, subpackage}); - intfPackage = pkgjoin({'scriptgen', type, subpackage}); - - locator = CodeBuilderLocator(implPackage, intfPackage); - factory = CodeBuilderFactory(locator); - end - - function code = createCode(~, factory, type, varargin) - builder = factory.create(type); - if isempty(builder) - code = scriptgen.internal.MissingCode.empty(); - return; - end - if ~isempty(varargin) - set(builder, varargin{:}); - end - code = builder.build(); - end - end - - methods (Static) - function provider = default() - persistent singleton; - if isempty(singleton) - singleton = scriptgen.CodeProvider(); - end - provider = singleton; - end - end -end - -function name = appendSuffix(name, suffix) -if isempty(regexp(name, ['\w*' suffix '$'], 'once')) - name = [name suffix]; -end -end - -function p = pkgjoin(names) -tf = cellfun(@(n)~isempty(n), names); -p = strjoin(names(tf), '.'); -end \ No newline at end of file diff --git a/+scriptgen/CodeWriter.m b/+scriptgen/CodeWriter.m deleted file mode 100644 index 76862c8..0000000 --- a/+scriptgen/CodeWriter.m +++ /dev/null @@ -1,64 +0,0 @@ -classdef CodeWriter < handle - % CodeWriter - Writes code objects in to code - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - OutputStream - WhitespaceBuffer - end - - methods - function obj = CodeWriter(stream) - validateattributes(stream, {'scriptgen.OutputStream'}, {'scalar'}); - obj.OutputStream = stream; - end - - function writeExpression(obj, expression) - obj.flushWhitespaceBuffer(); - expression.write(obj); - end - - function writeStatement(obj, statement) - obj.flushWhitespaceBuffer(); - statement.write(obj); - obj.bufferNewLine(); - end - - function writeSequence(obj, sequence) - obj.flushWhitespaceBuffer(); - sequence.write(obj); - obj.bufferNewLine(); - end - - function writeScript(obj, script) - obj.flushWhitespaceBuffer(); - script.write(obj); - end - - function close(obj) - obj.OutputStream.close(); - end - end - - methods (Access = {?scriptgen.Code}) - function write(obj, format, varargin) - text = sprintf(format, varargin{:}); - obj.OutputStream.write(text); - end - end - - methods (Access = private) - function bufferNewLine(obj) - obj.WhitespaceBuffer = strcat(obj.WhitespaceBuffer, '\n'); - end - - function flushWhitespaceBuffer(obj) - if ~isempty(obj.WhitespaceBuffer) - obj.write(obj.WhitespaceBuffer); - obj.WhitespaceBuffer = []; - end - end - end -end - diff --git a/+scriptgen/Expression.m b/+scriptgen/Expression.m deleted file mode 100644 index b8719db..0000000 --- a/+scriptgen/Expression.m +++ /dev/null @@ -1,42 +0,0 @@ -classdef Expression < scriptgen.Code - % Expression - A unit of code that returns a value - % - % Expressions are typically located in statements on the right- or - % left-hand side of an equals sign. - % - % Example expressions: - % - % 1 + 2 - % zeros(5,1) - % A(1:3,2) - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Text - RequiredImports - end - - methods - function obj = Expression(text, imports) - if nargin < 2 - imports = {}; - end - if ischar(imports) - imports = {imports}; - end - scriptgen.internal.validateTextScalar(text); - scriptgen.internal.validateTextArray(imports); - - obj.Text = text; - obj.RequiredImports = imports; - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - writer.write('%s', obj.Text); - end - end -end - diff --git a/+scriptgen/FileOutput.m b/+scriptgen/FileOutput.m deleted file mode 100644 index 84110e5..0000000 --- a/+scriptgen/FileOutput.m +++ /dev/null @@ -1,22 +0,0 @@ -classdef FileOutput < scriptgen.OutputStream - % Copyright 2020 The MathWorks, Inc. - - properties (GetAccess = private, SetAccess = immutable) - Fid - end - - methods - function obj = FileOutput(filename) - obj.Fid = fopen(filename, 'w'); - end - - function write(obj, text) - fprintf(obj.Fid, '%s', text); - end - - function close(obj) - fclose(obj.Fid); - end - end -end - diff --git a/+scriptgen/OutputStream.m b/+scriptgen/OutputStream.m deleted file mode 100644 index 1e2ced0..0000000 --- a/+scriptgen/OutputStream.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef OutputStream < handle - % Copyright 2020 The MathWorks, Inc. - - methods - function close(~) - % Available for subclasses to override - end - end - - methods (Abstract) - write(obj, text); - end -end - diff --git a/+scriptgen/Script.m b/+scriptgen/Script.m deleted file mode 100644 index 9311181..0000000 --- a/+scriptgen/Script.m +++ /dev/null @@ -1,83 +0,0 @@ -classdef Script < scriptgen.Code - % Script - A collection of statements organized in to sequences - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Sequences - end - - methods - function obj = Script(sequences) - import scriptgen.Sequence; - - if iscellstr(sequences) || (ischar(sequences) && isvector(sequences)) %#ok - sequences = Sequence(sequences); - end - - validateattributes(sequences, {'scriptgen.Sequence'}, {'vector'}); - - obj.Sequences = sequences; - end - - function file = writeToFile(obj, file) - import scriptgen.FileOutput; - [~,~] = mkdir(fileparts(file)); - stream = FileOutput(file); - obj.writeToStream(stream); - end - - function text = writeToText(obj) - % DEPRECATED - Use the Contents property - text = obj.Contents; - end - - function run(obj) - % RUN - Run script - % - % RUN(SCRIPT) runs the code contents of the SCRIPT in the callers - % workspace as if it were executed from a script file on disk. - % - % This method is roughly equivalent to writing the contents of the - % SCRIPT to a file in the current working directory and executing - % the file by typing its name. - - tempFolder = tempname(); - [~, name] = fileparts(tempFolder); - scriptName = ['tempscript_' name(end-3:end)]; - scriptPath = fullfile(tempFolder, [scriptName '.m']); - - obj.writeToFile(scriptPath); - oldPath = addpath(tempFolder); - - restoreState = onCleanup(@()cleanup(oldPath, tempFolder)); - function cleanup(p, f) - path(p); - rmdir(f, 's'); - end - - try - evalin('caller', strcat(scriptName, ';')); - catch e - throw(scriptgen.internal.PrunedStackException(e)); - end - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - import scriptgen.Sequence; - import scriptgen.Statement; - - imports = sort(unique([obj.Sequences.RequiredImports])); - if ~isempty(imports) - importText = cellfun(@(i)sprintf('import %s;', i), imports, 'UniformOutput', false); - writer.writeSequence(Sequence(importText)); - end - - for sequence = obj.Sequences - writer.writeSequence(sequence); - end - end - end -end \ No newline at end of file diff --git a/+scriptgen/Sequence.m b/+scriptgen/Sequence.m deleted file mode 100644 index 8be416e..0000000 --- a/+scriptgen/Sequence.m +++ /dev/null @@ -1,43 +0,0 @@ -classdef Sequence < scriptgen.Code - % Sequence - A collection of statements that achieve a task - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Statements - RequiredImports - end - - methods - function obj = Sequence(statements) - import scriptgen.Statement; - - if iscellstr(statements) || (ischar(statements) && isvector(statements)) %#ok - statements = Statement(statements); - end - validateattributes(statements, {'scriptgen.Statement'}, {'vector'}); - - obj.Statements = statements; - - % unique may return 0x1 cell array, valueOrElse ensures it is - % converted to a 0x0 cell array. - obj.RequiredImports = valueOrElse(unique([statements.RequiredImports]), {}); - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - for s = obj.Statements - writer.writeStatement(s); - end - end - end -end - -function v = valueOrElse(value, default) -if ~isempty(value) - v = value; -else - v = default; -end -end \ No newline at end of file diff --git a/+scriptgen/Statement.m b/+scriptgen/Statement.m deleted file mode 100644 index 99d3a42..0000000 --- a/+scriptgen/Statement.m +++ /dev/null @@ -1,55 +0,0 @@ -classdef Statement < scriptgen.Code - % Statement - A unit of code that executes an action - % - % Statements are typically terminated with a semicolon. - % - % Example statements: - % - % a = 1 + 2; - % disp('hello world'); - % z = zeros(5,1); - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Text - RequiredImports - end - - methods - function obj = Statement(text, imports) - import scriptgen.internal.validateTextArray; - import scriptgen.internal.validateTextArray; - - if nargin < 2 - imports = {}; - end - if ischar(text) - text = {text}; - end - if ischar(imports) - imports = {imports}; - end - validateTextArray(text); - validateTextArray(imports); - - % Support array construction. - m = size(text, 1); - n = size(text, 2); - obj(1:m,1:n) = obj; - for i = 1:m - for j = 1:n - obj(i,j).Text = text{i,j}; - obj(i,j).RequiredImports = imports; - end - end - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - writer.write('%s', obj.Text); - end - end -end - diff --git a/+scriptgen/TextOutput.m b/+scriptgen/TextOutput.m deleted file mode 100644 index 50e3dee..0000000 --- a/+scriptgen/TextOutput.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef TextOutput < scriptgen.OutputStream - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = private) - Text - end - - methods - function write(obj, text) - obj.Text = [obj.Text sprintf('%s', text)]; - end - end -end - diff --git a/baseline_API.mat b/baseline_API.mat deleted file mode 100644 index 6134a5e6f06e9e30b325e224a199269bacd53ee0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220520 zcmeI5e{dYfb?18t(Sj|?S;>k`+p)bi{R6ROX(dq-CE3eG|cGqnc`<(X<@a&F=L(}nWU*N(sR#Nh`EM;B_SFov#)id8k+{JXGkmIc)ompTJLsTSMSSe4X9< zj`zJII{M(CyUXSEMD}TL+qS8%3`7ZtYp!z@`;oKoqJ>v%|D2P5&Kgy>?$pVV z5$7dQK0@2gy|rI|p&X<$+#3W&M~2ICrKjz3k63uk^vt5}P<{Gbz2S}3`9o3CM72?s zABXCTXX|g&8#PNmv{0L@dlBeuA(HO=lcv9;+8o@J>E&wrdt^|{jxM6}FihFy1fajm zcAe1Ui=WhlG(BrRs`-}>_XcR}rI(N8yj3sS?gy*dV4(LUi&w@q-PF_-Our!)>U+V; zJN?!6@|qUET+wvc>%vzw-rH4d{a!iuHnkN7BxgNZE~g3LgmA$3bMiay|0~l{bP@Y~ zOw#x5+ZTxr`f}vQK(264Bw*6|+qwHKE;7$NetpupCbG6PRK2>p)vq_-o_#t)mR)#P zwjA_t=|7SiC>Cjg+OQa**sQeAT za2|jJNPq-LfCTn1fsOaiiaW|bTWy@<#(Pv*T7J(S)}6h0>ESpB?w2YbP#S6eeRw~X zCKuk1f$_$-(<3{oo$CGhem7)*ithud?%}8Z zHM{Rd`gRF7Uav|!O0PDa$0&Jt<&Vb&%e#sP+B@d=lH;U0W}*_UangZcoOIv5%4f_t zG~;2IZ97g1J9g;nwT1fh+^nB+inc@b>iPMZ+Sv5>)S{$AXBQ_YYYTCFrZ#)7F$HmV zNG7s;4C6`_E2rPVYX04uAJ!wH9{YWKmbbkLr1^Ix8zN|7bS( zQOhoVJX;R_UEyQda`5k5%R+URhn=`m=$^mTsT;3Xl^vy58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Z-NZ+iZBhew&O+2P%KI)$f8D|v3(s3PYvG)Q z^A>*1LR?qD;$eVsyCKV1ek1JB+V{{_<^7A_RXLO&-Y>(SNWMe9y(Ep5EU{_r3gw0E ztlPfZDGlvo$Sz}5rzi7w%5U@stNGQSi~2>ppZ?Ot z7qryoxc1psEEJZ#=wm!1_hu^EI4)=)_DFzn!DYK% z*y++2RWDlon9o<+qneV{uXGz%n4fP4iuSy9<1G1-oKY`!tsmnoF%Psn<%50|<9%`@b8c%th|&hhx@Fda<&}K=JXe`<-+sWZgJ?>M)nuouDKU|T5CU<)xOr-U+h?J zcd&kGW4ZO``A}!=4tBWnenDI4c76YAIBtwKV)IEdr5SDZ{f9ado}Zqn$=nm-Cu@zx zh1ub{yqBi#=b$hS2LHEW<@7ti`0dqEwSRAYUcL=}Qy(j3_(e~qo`=eb|p3j!MU_0VoI4lS8rv1RZGOi=E8y8Iu_tKDa zV|pHifD_8!tPuVE*7@OsCArpK{HA{R;a|f9NNXlu$*X?t(^*KLRQgi3-oXC7^=h`9 zmcDoXLceyLAKs%s34L0x9}Yhxv=f`V!Z diff --git a/genscript.m b/genscript.m deleted file mode 100644 index e672aa9..0000000 --- a/genscript.m +++ /dev/null @@ -1,26 +0,0 @@ -function script = genscript(type, varargin) -% genscript - Generates a script -% -% The genscript function provides a convenient way to generate a pre-made -% script object. -% -% SCRIPT = genscript(TYPE) generates and returns a script of TYPE. TYPE -% must be a character vector and match the name of a script builder -% located in the scriptgen.scripts package. -% -% SCRIPT = genscript(TYPE, NAME, VALUE, ...) generates and returns a -% script of TYPE setting those name-value pairs on the script builder. -% -% Examples: -% -% testScript = genscript('Test', 'JUnitTestResults', 'results.xml'); -% writeToFile(testScript, 'myscript.m'); - -% Copyright 2020 The MathWorks, Inc. - -import scriptgen.CodeProvider; - -provider = CodeProvider.default(); -script = provider.createScript(type, varargin{:}); -end - diff --git a/my_genscript.m b/my_genscript.m deleted file mode 100644 index 0b31373..0000000 --- a/my_genscript.m +++ /dev/null @@ -1,35 +0,0 @@ -function scriptText = my_genscript(varargin) - %GENSCRIPT Generate a MATLAB script for running tests. - TestFiles= varargin{35}; - testFilesStr = strjoin(cellfun(@(x) ['''', x, ''''], TestFiles, 'UniformOutput', false), ', '); - scriptText = join([ ... - "import matlab.unittest.TestRunner;", ... - "import matlab.unittest.plugins.XMLPlugin;", ... - "import matlab.unittest.TestSuite;", ... - newline, ... - "suite = testsuite(pwd, 'IncludingSubfolders', true);", ... - "TestFiles = {" + testFilesStr + "};", ... - "suites = {};", ... - "for i = 1:length(TestFiles)", ... - " suites{end+1} = TestSuite.fromFile(TestFiles{i});",... - "end", ... - "suite = [suites{:}];", ... - newline, ... - "runner = TestRunner.withTextOutput();", ... - "runner.addPlugin(XMLPlugin.producingJUnitFormat('results.xml'));", ... - newline, ... - "results = runner.run(suite);", ... - "display(results);", ... - newline, ... - "assertSuccess(results);" ... - ], newline); - - % Convert to character array - scriptText = char(scriptText); - disp('Running MATLAB script with contents:'); - disp('__________'); - disp(scriptText); - disp('__________'); - - eval(scriptText); -end \ No newline at end of file diff --git a/tests/BaseClassWithMethodsToBeOverridden.m b/tests/BaseClassWithMethodsToBeOverridden.m deleted file mode 100644 index e4b024f..0000000 --- a/tests/BaseClassWithMethodsToBeOverridden.m +++ /dev/null @@ -1,58 +0,0 @@ -classdef BaseClassWithMethodsToBeOverridden < matlab.unittest.TestCase - - % Because MCOS returns methods in the reverse of the order they're - % defined in, we define some of the methods to be overridden first and - % some of the methods to be overridden second. Because of the - % subclass/superclass relationship, this order will not matter; the - % class hierarchy will impose a stronger constraint that superclass - % setup methods are called first. - - % Copyright 2014 The MathWorks, Inc. - - methods (TestClassSetup) - % Method to be overridden defined first - function commonTestClassSetup(testCase) - testCase.log('commonTestClassSetup'); - end - function baseTestClassSetup(testCase) - testCase.log('baseTestClassSetup'); - end - end - - methods (TestClassTeardown) - % Method to be overridden defined second - function baseTestClassTeardown(testCase) - testCase.log('baseTestClassTeardown'); - end - function commonTestClassTeardown(testCase) - testCase.log('commonTestClassTeardown'); - end - end - - methods (TestMethodSetup) - % Method to be overridden defined first - function commonTestMethodSetup(testCase) - testCase.log('commonTestMethodSetup'); - end - function baseTestMethodSetup(testCase) - testCase.log('baseTestMethodSetup'); - end - end - - methods (TestMethodTeardown) - % Method to be overridden defined second - function baseTestMethodTeardown(testCase) - testCase.log('baseTestMethodTeardown'); - end - function commonTestMethodTeardown(testCase) - testCase.log('commonTestMethodTeardown'); - end - end - - methods (Test) - function test1(testCase) - testCase.log('test1'); - end - end -end - diff --git a/tests/BaseTestCase.m b/tests/BaseTestCase.m deleted file mode 100644 index fc68822..0000000 --- a/tests/BaseTestCase.m +++ /dev/null @@ -1,69 +0,0 @@ -classdef BaseTestCase < matlab.unittest.TestCase - % TestCase base class meant to ensure that method order respects class hierarchies - % TestCase - - - - - % Copyright 2011 The MathWorks, Inc. - methods(TestClassSetup) - function baseTestClassSetup(testCase) - disp baseTestClassSetup - testCase.addTeardown(@disp, 'baseTestClassSetupAddTeardown'); - end - function baseTestClassSetup2(testCase) - disp baseTestClassSetup - testCase.addTeardown(@disp, 'baseTestClassSetupAddTeardown'); - end - end - methods(TestClassTeardown) - function baseTestClassTeardown(testCase) - disp baseTestClassTeardown - testCase.addTeardown(@disp, 'baseTestClassTeardownAddTeardown'); - end - function baseTestClassTeardown2(testCase) - disp baseTestClassTeardown - testCase.addTeardown(@disp, 'baseTestClassTeardownAddTeardown'); - end - end - methods(TestMethodSetup) - function baseTestMethodSetup(testCase) - disp baseTestMethodSetup - testCase.addTeardown(@disp, 'baseTestMethodSetupAddTeardown'); - end - function baseTestMethodSetup2(testCase) - disp baseTestMethodSetup - testCase.addTeardown(@disp, 'baseTestMethodSetupAddTeardown'); - end - end - methods(TestMethodTeardown) - function baseTestMethodTeardown(testCase) - disp baseTestMethodTeardown - testCase.addTeardown(@disp, 'baseTestMethodTeardownAddTeardown'); - end - function baseTestMethodTeardown2(testCase) - disp baseTestMethodTeardown - testCase.addTeardown(@disp, 'baseTestMethodTeardownAddTeardown'); - end - end - - % lets have two tests to ensure correct invocation counts of class level & - % method level setup - methods(Test) - - function baseTest(testCase) - disp baseTest - testCase.addTeardown(@disp, 'baseTestAddTeardown'); - end - - function baseTest2(testCase) - % Disp the same as the other test since test order is not defined - disp baseTest - testCase.addTeardown(@disp, 'baseTestAddTeardown'); - end - - end - - -end - diff --git a/tests/ClassTestWithNotATestMethod.m b/tests/ClassTestWithNotATestMethod.m deleted file mode 100644 index bf02f98..0000000 --- a/tests/ClassTestWithNotATestMethod.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef ClassTestWithNotATestMethod < matlab.unittest.TestCase - - % Copyright 2017 The MathWorks, Inc. - - methods(Test) - function test1(~) - end - end - - methods - function notATest(~) - end - end - -end \ No newline at end of file diff --git a/tests/ClassWithNonAlphaNumericTestTags.m b/tests/ClassWithNonAlphaNumericTestTags.m deleted file mode 100644 index 5a5adb0..0000000 --- a/tests/ClassWithNonAlphaNumericTestTags.m +++ /dev/null @@ -1,64 +0,0 @@ -classdef (TestTags = {''''}) ClassWithNonAlphaNumericTestTags < matlab.unittest.TestCase - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'*foo*'}) - function test1(~) - end - end - - methods (Test, TestTags = {'bar$'}) - function test2(~) - end - end - - methods (Test, TestTags = {'^'}) - function test3(~) - end - end - - methods (Test, TestTags = {'$'}) - function test4(~) - end - end - - methods (Test, TestTags = {'foo*'}) - function test5(~) - end - end - - methods (Test, TestTags = {'<>'}) - function test6(~) - end - end - - methods (Test, TestTags = {'>'}) - function test7(~) - end - end - - methods (Test, TestTags = {''}) - function test8(~) - end - end - - methods (Test, TestTags = {'.*'}) - function test9(~) - end - end - - methods (Test, TestTags = {'*'}) - function test10(~) - end - end - - methods (Test, TestTags = {''}) - function test12(~) - end - end -end \ No newline at end of file diff --git a/tests/Copy_2_of_testModelSim.m b/tests/Copy_2_of_testModelSim.m deleted file mode 100644 index b47ceda..0000000 --- a/tests/Copy_2_of_testModelSim.m +++ /dev/null @@ -1,59 +0,0 @@ -classdef Copy_2_of_testModelSim < matlab.unittest.TestCase - %TESTMODELSIM Summary of this class goes here - % Detailed explanation goes here - properties - temp; - ogDir; - end - methods(TestClassSetup) - function testClassSetup(testCase) - sltest.testmanager.clear; - sltest.testmanager.clearResults; - testCase.ogDir = pwd; - testCase.temp = fullfile(pwd, 'temp'); - mkdir(testCase.temp); - matlab.unittest.fixtures.PathFixture(testCase.temp); - cd(testCase.temp); - end - end - - methods(TestClassTeardown) - function teardown(testCase) - sltest.testmanager.clear; - sltest.testmanager.clearResults; - sltest.testmanager.close; - A = dir(testCase.temp); - for k = 3:length(A) - delete([testCase.temp filesep A(k).name]) - end - cd(testCase.ogDir); - rmdir(testCase.temp); - end - end - - methods(Test) - function testSquare(testCase) - %TESTCALC Construct an instance of this class - % Detailed explanation goes here - - % Introduce a random delay between 1 and 5 seconds - pause(3); - - % Change directory to the root where the model is located - rootDir = fileparts(testCase.ogDir); % Assuming the root is one level up from the test directory - cd(rootDir); - - tf = sltest.testmanager.TestFile('test.mldatx'); - ts = tf.getTestSuites; - tc = ts.getTestCases; - tc.setProperty('model', 'sampleModel.slx'); - captureBaselineCriteria(tc,'baseline_API.mat',true); - res = tc.run(); - - % Change back to the original directory - cd(testCase.ogDir); - - testCase.verifyEqual(res.Outcome, sltest.testmanager.TestResultOutcomes.Passed); - end - end -end \ No newline at end of file diff --git a/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m b/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m deleted file mode 100644 index f1b2259..0000000 --- a/tests/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags < matlab.unittest.TestCase - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'a', 'b'}) - function test1(~) - end - end - - methods (Test) - function testNoTags1(~) - end - function testNoTags2(~) - end - end - -end \ No newline at end of file diff --git a/tests/HasSealedTestTags.m b/tests/HasSealedTestTags.m deleted file mode 100644 index 390087a..0000000 --- a/tests/HasSealedTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef HasSealedTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Sealed, Test, TestTags = {'Sealed'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/HasUnsealedTestTags.m b/tests/HasUnsealedTestTags.m deleted file mode 100644 index c89b46a..0000000 --- a/tests/HasUnsealedTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef HasUnsealedTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'Unsealed'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/SimpleTestCase.m b/tests/SimpleTestCase.m deleted file mode 100644 index 7aa5e4c..0000000 --- a/tests/SimpleTestCase.m +++ /dev/null @@ -1,54 +0,0 @@ -classdef SimpleTestCase < matlab.unittest.TestCase - % Basic simple testcase class meant to ensure that TestRunner correctly - % runs TestCase tests - - % Copyright 2012 The MathWorks, Inc. - methods(TestClassSetup) - function beforeClass(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestClassTeardown) - function afterClass(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestMethodSetup) - function before(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestMethodTeardown) - function after(testCase) - testCase.callAllPassingQualifications(); - end - end - - % lets have two tests to ensure correct invocation counts of class level & - % method level setup - methods(Test) - - function test1(testCase) - testCase.callAllPassingQualifications(); - end - - function test2(testCase) - testCase.callAllPassingQualifications(); - end - end - - methods - function helperMethod(~) - end - function callAllPassingQualifications(testCase) - testCase.verifyTrue(true); - testCase.assertTrue(true); - testCase.fatalAssertTrue(true); - testCase.assumeTrue(true); - end - - end - - -end - diff --git a/tests/SuperclassHasTestMethodTestTags.m b/tests/SuperclassHasTestMethodTestTags.m deleted file mode 100644 index d6a4891..0000000 --- a/tests/SuperclassHasTestMethodTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef SuperclassHasTestMethodTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'Original'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/SuperclassHasTestMethodWithNoTestTags.m b/tests/SuperclassHasTestMethodWithNoTestTags.m deleted file mode 100644 index c43bb34..0000000 --- a/tests/SuperclassHasTestMethodWithNoTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef SuperclassHasTestMethodWithNoTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/dummyClassName.m b/tests/dummyClassName.m deleted file mode 100644 index 79c6eee..0000000 --- a/tests/dummyClassName.m +++ /dev/null @@ -1,13 +0,0 @@ -classdef dummyClassName < matlab.unittest.TestCase - - % Copyright 2019 The MathWorks, Inc. - - methods (Test) - - function test2(~) - disp('calling from folder A'); - end - - end - -end diff --git a/tests/sampleFunctionTest.m b/tests/sampleFunctionTest.m deleted file mode 100644 index d0c1b84..0000000 --- a/tests/sampleFunctionTest.m +++ /dev/null @@ -1,12 +0,0 @@ -function tests = sampleFunctionTest - -% Copyright 2021 The MathWorks, Inc. - -tests = functiontests(localfunctions); -end - -function testFunction1(~) -end - -function testFunction2(~) -end diff --git a/tests/sampleModel.slx b/tests/sampleModel.slx deleted file mode 100644 index d4b10b0e64ffc761bd7b29d3718fc7944ae057b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21064 zcmaHzV{~Qj^5C$+HddQ~qdZ309{-KxON9(#F%h3#i^`o4h~}2*&Pk^0N!0gmA6v!WN?sZ^9ptpruJHX+}a77^s;K8=EUD}y&u;$=_+#M@QLw3 z;Ex8H5&~49U2I&~8_5@+!(a&NiE6{4RGxEOC&XYEly#2Q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%-|- zuB}cdwKdw8oJq~^7+GR z#_FGw#bPp@*ZrX+V42kRWHfOP-{21Yl)2!`&qjV4Zu=1<=wZ^FVAe30sCf89xwu^W zt0FBy%Q=Uf_QbTjZ6WysvBE#&Sxp(!x>4KHk#ANdB8dB+D5RP~+1gJ%5H4_3-M+XFt;$n_z2e5I~-s|#+N1A|?s-@w z?>QG#5*yjaX4M7fI`N!!$|mU@Db~A#~j%W$HS?{4HWVl`

vsObKrd92l%*slAN8U^^=f)r0`BcXdQ5_t?= zHgI_GX@FesXxIa{n>6)fCv1PcG(Q?RxqDr0`-w)88SM{-u`VOkNAEj^YbDM$q%#%P zZnU%3pPxl@I<#;_wPOxC#V-c0bo*yL*4(?xw4AuB%geT$p?sT+?;6SXB6z3#UQn4m z&|jpWa2WaaT&d>v^G~`napaQjgPt-8x5#GZw+I;pie^!Noe?XOewQAm@c|MV@IV6J zue)MF+X@0IraphTcw~V9&_HS7%0<9>=#N&|DS;P)K0ok<*^r?18?HYf2(+kyL7I>X zZ5hPPum(hdW-l;mH{|^BRn#i$7mx}1r@%}tNagueCg7$5Qb9M81?u8wALLK6OkL$o z0y03!_rmpyQzs|3;vfVC;2;LnA;XvsaV{8Gl?;MF^(zdzDX{|d4J|B41QnPt(H~j@ z%SZhp@ry3@lO7X9g6c*X=^?cOxmxQ8LO_8J49SBU>*csWxetf|UsZ)MicqP)j9I?1 zPcN>55U{I@42PRD$t{^Q{ zo?N;ikO(#}Ffqo63-N2M42T7L4j8Ly%mw?E4g{ovg+EN?aH9fk07wH1cbInmUtD5b xUB-hju=0js()+o*@&Ij%D3)M9WAq(x!lI9EF{sxO5_p1N^ From e90a861e8be52c89f761c66f1e0e758274458213 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 18:10:52 +0530 Subject: [PATCH 35/55] changed test-deploy --- .circleci/test-deploy.yml | 239 ++++++++++++++++++++++++++++++++------ 1 file changed, 206 insertions(+), 33 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 1e7e2d8..28d089b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -11,9 +11,8 @@ filters: &filters integration-tests: &integration-tests [ orb-tools/pack, - #integration-test-install, - # integration-test-install-release, - #integration-test-install-release-macos-intel-on-arm, + integration-test-install, + integration-test-install-release, integration-test-run-command, integration-test-run-tests ] @@ -23,10 +22,6 @@ executors: machine: image: ubuntu-2204:2024.01.1 macos: - macos: - xcode: 15.1.0 - resource_class: macos.x86.medium.gen2 - macos-arm: macos: xcode: 15.3.0 resource_class: macos.m1.medium.gen1 @@ -129,26 +124,209 @@ jobs: executor: type: executor executor: <> - parallelism: 2 steps: - - checkout # Setup for Integ tests for matlab/run-tests - matlab/install: products: Simulink Simulink_Test Simulink_Coverage Parallel_Computing_Toolbox no-output-timeout: 30m - + - run: + command: | + echo 'myvar = 123' > startup.m + mkdir src + echo 'function c=add(a,b);c=a+b;' > src/add.m + mkdir tests + echo "%% StartupTest" > tests/mytest.m + echo "evalin('base','assert(myvar==123)')" >> tests/mytest.m + echo "%% FirstTest" >> tests/mytest.m + echo "assert(add(1,2)==3)" >> tests/mytest.m + mkdir tests/filteredTest + echo "%% simpleTest" >> tests/filteredTest/filtertest.m + echo "assert(2==2)" >> tests/filteredTest/filtertest.m + printf "%% FilterByTag\n" >> tests/filteredTest/TaggedTest.m + printf "classdef (TestTags = {'FILTERED'}) TaggedTest < matlab.unittest.TestCase\n" >> tests/filteredTest/TaggedTest.m + printf "methods (Test)\n function testTag (testCase)\n assert(2==2);\n end\n end\n end" >> tests/filteredTest/TaggedTest.m + shell: bash + + # Integ tests for matlab/run-tests + - matlab/run-tests: + source-folder: src + startup-options: -logfile console.log + - matlab/run-tests: + test-results-junit: test-results/matlab/results.xml + code-coverage-cobertura: code-coverage/coverage.xml + source-folder: src + - matlab/run-tests: + test-results-html: test-results/matlab/html + code-coverage-html: code-coverage/html + source-folder: src + - matlab/run-tests: + test-results-junit: test-results/matlab/filterdtestresult.xml + select-by-folder: tests/filteredTest + - matlab/run-tests: + test-results-junit: test-results/matlab/filterdtagresult.xml + select-by-tag: FILTERED + + - run: + name: Verify tests ran with startup options + command: | + set -e + grep mytest console.log + grep TaggedTest console.log + grep filtertest console.log + rm console.log + shell: bash + - run: + name: Verify test results file was created + command: | + set -e + grep -q FirstTest test-results/matlab/results.xml + shell: bash + - run: + name: Verify HTML test results report was created + command: | + set -e + grep -q FirstTest test-results/matlab/html/index.html + shell: bash + - run: + name: Verify code coverage file was created + command: | + set -e + grep -q add code-coverage/coverage.xml + shell: bash + - run: + name: Verify HTML code coverage report was created + command: | + set -e + grep -q CoverageSummary code-coverage/html/index.html + shell: bash + - run: + name: Verify filtered test results file was created + command: | + set -e + grep -q simpleTest test-results/matlab/filterdtestresult.xml + grep -v FirstTest test-results/matlab/filterdtestresult.xml + shell: bash + - run: + name: Verify filter by tag test results file was created + command: | + set -e + grep -q TaggedTest test-results/matlab/filterdtagresult.xml + grep -v FirstTest test-results/matlab/filterdtagresult.xml + grep -v simpleTest test-results/matlab/filterdtagresult.xml + shell: bash + + - run: + name: Set up diary for logging + command: | + echo 'diary console.log' >> startup.m + shell: bash + - matlab/run-tests: + strict: true + source-folder: src + - run: + name: Verify tests ran with strict checks + command: | + set -e + grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log + rm console.log + shell: bash + - matlab/run-tests: + use-parallel: true + source-folder: src + - run: + name: Verify tests ran in parallel + command: | + set -e + grep -q "parallel pool" console.log + rm console.log + shell: bash + - matlab/run-tests: + output-detail: Detailed + source-folder: src + - run: + name: Verify tests ran with detailed display level for event details + command: | + set -e + grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log + rm console.log + shell: bash - matlab/run-tests: - select-by-folder: 'tests' - test-results-junit: results - - - store_test_results: - path: results + logging-level: Detailed + source-folder: src + - run: + name: Verify tests ran with detailed verbosity level for logged diagnostics + command: | + set -e + grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log + rm console.log + shell: bash - - store_artifacts: - path: results - destination: test-results/results - - + # Set up for model coverage artifact tests + - when: + condition: + equal: [*linux-executor, <>] + steps: + - run: + command: | + mkdir simtests + cat \<<'_EOF' >> "simtests/createModelAndTest.m" + model = 'simple_model'; + evalin('base','bdclose all'); + if exist('simple_model.slx', 'file') == 0 + new_system(model); + load_system(model); + add_block('built-in/Constant', [model, '/Constant']); + save_system(model); + close_system(model); + sltest.testmanager.clear; + sltest.testmanager.clearResults; + tf = sltest.testmanager.TestFile('test.mldatx'); + cs = tf.getCoverageSettings; + cs.RecordCoverage = true; + cs.MdlRefCoverage = true; + cs.MetricSettings = 'd'; + ts = tf.getTestSuites; + tc = ts.getTestCases; + tc.setProperty('model', model); + tf.saveToFile; + tf.close; + sltest.testmanager.close; + end + disp('Created Model and Simulink Test file to simulate the model.'); + _EOF + shell: bash + - matlab/run-command: + command: cd simtests;createModelAndTest; + - matlab/run-tests: + select-by-folder: simtests + model-coverage-cobertura: model-coverage/coverage.xml + model-coverage-html: model-coverage/html + test-results-pdf: test-results/matlab/pdfresults.pdf + test-results-simulink-test: test-results/matlab/simulinkTest.mldatx + - run: + name: Verify pdf test report file generation + command: | + set -e + test -f test-results/matlab/pdfresults.pdf + shell: bash + - run: + name: Verify Simulink Test result file generation + command: | + set -e + test -f test-results/matlab/simulinkTest.mldatx + shell: bash + - run: + name: Verify model coverage file was created + command: | + set -e + grep -q simple_model model-coverage/coverage.xml + shell: bash + - run: + name: Verify HTML model coverage report was created + command: | + set -e + grep -r "simple_model Coverage Report" --include="*.html" model-coverage/html + shell: bash integration-test-run-build: parameters: @@ -280,33 +458,28 @@ workflows: - integration-test-install: matrix: parameters: - executor: [linux] - - # - integration-test-install-release: - # matrix: - # parameters: - # executor: [linux] - # release: [R2023bU1] + executor: [linux, windows, macos] - integration-test-install-release: - name: integration-test-install-release-macos-intel-on-arm - executor: macos-arm - release: R2023aU1 + matrix: + parameters: + executor: [linux, windows, macos] + release: [R2023bU1] - integration-test-run-command: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - integration-test-run-tests: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - integration-test-run-build: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - orb-tools/pack: filters: *filters From 9364ef5c6e30b2ae2572141bab3479eca66e7163 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 20:48:58 +0530 Subject: [PATCH 36/55] cell array --- ...erturaAndHTMLCodePluginExpressionBuilder.m | 27 ++ ...dHTMLCodePluginParallelExpressionBuilder.m | 5 + ...AndHTMLCodePluginSerialExpressionBuilder.m | 5 + ...eateCoberturaCodePluginExpressionBuilder.m | 21 ++ ...rturaCodePluginParallelExpressionBuilder.m | 5 + ...berturaCodePluginSerialExpressionBuilder.m | 5 + ...ateCoberturaModelPluginExpressionBuilder.m | 15 ++ ...turaModelPluginParallelExpressionBuilder.m | 5 + ...erturaModelPluginSerialExpressionBuilder.m | 5 + ...ateFailOnWarningsPluginExpressionBuilder.m | 4 + ...nWarningsPluginParallelExpressionBuilder.m | 5 + ...lOnWarningsPluginSerialExpressionBuilder.m | 5 + .../CreateHTMLCodePluginExpressionBuilder.m | 20 ++ ...eHTMLCodePluginParallelExpressionBuilder.m | 4 + ...ateHTMLCodePluginSerialExpressionBuilder.m | 4 + .../CreateHTMLModelPluginExpressionBuilder.m | 14 + ...HTMLModelPluginParallelExpressionBuilder.m | 4 + ...teHTMLModelPluginSerialExpressionBuilder.m | 4 + ...ateHTMLTestReportPluginExpressionBuilder.m | 14 + ...estReportPluginParallelExpressionBuilder.m | 4 + ...LTestReportPluginSerialExpressionBuilder.m | 4 + ...teHasBaseFolderSelectorExpressionBuilder.m | 14 + .../CreateHasNameSelectorExpressionBuilder.m | 14 + .../CreateHasTagSelectorExpressionBuilder.m | 15 ++ .../CreateJUnitPluginExpressionBuilder.m | 15 ++ ...eateJUnitPluginParallelExpressionBuilder.m | 5 + ...CreateJUnitPluginSerialExpressionBuilder.m | 5 + .../+test/CreatePDFPluginExpressionBuilder.m | 15 ++ ...CreatePDFPluginParallelExpressionBuilder.m | 5 + .../CreatePDFPluginSerialExpressionBuilder.m | 5 + ...reateSimulinkTestPluginExpressionBuilder.m | 4 + ...ulinkTestPluginParallelExpressionBuilder.m | 5 + ...imulinkTestPluginSerialExpressionBuilder.m | 5 + ...mulinkTestResultsPluginExpressionBuilder.m | 15 ++ ...stResultsPluginParallelExpressionBuilder.m | 5 + ...TestResultsPluginSerialExpressionBuilder.m | 5 + .../+test/CreateTAPPluginExpressionBuilder.m | 15 ++ ...CreateTAPPluginParallelExpressionBuilder.m | 5 + .../CreateTAPPluginSerialExpressionBuilder.m | 5 + ...dHTMLCodePluginParallelExpressionBuilder.m | 17 ++ ...AndHTMLCodePluginSerialExpressionBuilder.m | 25 ++ ...rturaCodePluginParallelExpressionBuilder.m | 17 ++ ...berturaCodePluginSerialExpressionBuilder.m | 24 ++ ...turaModelPluginParallelExpressionBuilder.m | 19 ++ ...erturaModelPluginSerialExpressionBuilder.m | 25 ++ ...nWarningsPluginParallelExpressionBuilder.m | 17 ++ ...lOnWarningsPluginSerialExpressionBuilder.m | 21 ++ ...eHTMLCodePluginParallelExpressionBuilder.m | 17 ++ ...ateHTMLCodePluginSerialExpressionBuilder.m | 24 ++ ...HTMLModelPluginParallelExpressionBuilder.m | 19 ++ ...teHTMLModelPluginSerialExpressionBuilder.m | 34 +++ ...estReportPluginParallelExpressionBuilder.m | 16 ++ ...LTestReportPluginSerialExpressionBuilder.m | 20 ++ ...teHasBaseFolderSelectorExpressionBuilder.m | 36 +++ .../CreateHasNameSelectorExpressionBuilder.m | 25 ++ .../CreateHasTagSelectorExpressionBuilder.m | 23 ++ ...eateJUnitPluginParallelExpressionBuilder.m | 17 ++ ...CreateJUnitPluginSerialExpressionBuilder.m | 21 ++ ...CreatePDFPluginParallelExpressionBuilder.m | 19 ++ .../CreatePDFPluginSerialExpressionBuilder.m | 23 ++ ...DFPluginWithMacParallelExpressionBuilder.m | 17 ++ ...ePDFPluginWithMacSerialExpressionBuilder.m | 21 ++ ...ulinkTestPluginParallelExpressionBuilder.m | 19 ++ ...imulinkTestPluginSerialExpressionBuilder.m | 23 ++ ...stResultsPluginParallelExpressionBuilder.m | 19 ++ ...TestResultsPluginSerialExpressionBuilder.m | 23 ++ ...gOriginalFormatParallelExpressionBuilder.m | 33 +++ ...ingOriginalFormatSerialExpressionBuilder.m | 32 +++ ...nUsingVersion13ParallelExpressionBuilder.m | 32 +++ ...ginUsingVersion13SerialExpressionBuilder.m | 23 ++ .../+internal/+mixin/EnvironmentDependent.m | 41 +++ +scriptgen/+internal/+mixin/PathDependent.m | 24 ++ .../+internal/+mixin/PlatformDependent.m | 25 ++ +scriptgen/+internal/+mixin/Preferable.m | 75 ++++++ +scriptgen/+internal/+mixin/SetGet.m | 35 +++ .../+internal/+mixin/VersionDependent.m | 41 +++ .../+internal/+scripts/TestScriptBuilder.m | 249 ++++++++++++++++++ ...ssertNoFailuresWithAssertSequenceBuilder.m | 18 ++ ...FailuresWithAssertSuccessSequenceBuilder.m | 18 ++ .../+test/CreateTestRunnerSequenceBuilder.m | 214 +++++++++++++++ .../+test/CreateTestSuiteSequenceBuilder.m | 67 +++++ ...singWithTextOutputDetailStatementBuilder.m | 30 +++ ...unnerUsingWithTextOutputStatementBuilder.m | 25 ++ ...gWithTextOutputVerbosityStatementBuilder.m | 41 +++ ...TestSuiteUsingFromFolderStatementBuilder.m | 21 ++ ...eTestSuiteUsingTestsuiteStatementBuilder.m | 19 ++ +scriptgen/+internal/CodeBuilderFactory.m | 40 +++ +scriptgen/+internal/CodeBuilderLocator.m | 55 ++++ +scriptgen/+internal/MissingCode.m | 10 + +scriptgen/+internal/MissingCodeBuilder.m | 10 + +scriptgen/+internal/PrunedStackException.m | 49 ++++ +scriptgen/+internal/Version.m | 118 +++++++++ +scriptgen/+internal/isAbsolutePath.m | 8 + +scriptgen/+internal/numericVerbosity.m | 20 ++ +scriptgen/+internal/unquoteText.m | 11 + +scriptgen/+internal/validateText.m | 9 + +scriptgen/+internal/validateTextArray.m | 7 + +scriptgen/+internal/validateTextScalar.m | 7 + .../+internal/validateVerbosityScalar.m | 9 + +scriptgen/+scripts/TestScriptBuilder.m | 122 +++++++++ .../+test/AssertNoFailuresSequenceBuilder.m | 20 ++ .../+test/CreateTestRunnerSequenceBuilder.m | 104 ++++++++ .../+test/CreateTestSuiteSequenceBuilder.m | 39 +++ .../+test/CreateTestRunnerStatementBuilder.m | 27 ++ .../+test/CreateTestSuiteStatementBuilder.m | 15 ++ +scriptgen/Code.m | 38 +++ +scriptgen/CodeBuilder.m | 18 ++ +scriptgen/CodeProvider.m | 128 +++++++++ +scriptgen/CodeWriter.m | 64 +++++ +scriptgen/Expression.m | 42 +++ +scriptgen/FileOutput.m | 22 ++ +scriptgen/OutputStream.m | 14 + +scriptgen/Script.m | 83 ++++++ +scriptgen/Sequence.m | 43 +++ +scriptgen/Statement.m | 55 ++++ +scriptgen/TextOutput.m | 14 + .circleci/test-deploy.yml | 240 +++-------------- genscript.m | 26 ++ src/commands/run-tests.yml | 14 - src/scripts/run-tests.sh | 16 +- tests/baseline_API.mat | Bin 0 -> 220520 bytes .../BaseClassWithMethodsToBeOverridden.m | 58 ++++ tests/folderA/BaseTestCase.m | 69 +++++ tests/folderA/ClassTestWithNotATestMethod.m | 15 ++ .../ClassWithNonAlphaNumericTestTags.m | 64 +++++ tests/folderA/Copy_2_of_testModelSim.m | 59 +++++ ...sTagsButHasTestMethodsWithAndWithoutTags.m | 17 ++ tests/folderA/HasSealedTestTags.m | 10 + tests/folderA/HasUnsealedTestTags.m | 10 + tests/folderA/SimpleTestCase.m | 54 ++++ .../folderA/SuperclassHasTestMethodTestTags.m | 10 + .../SuperclassHasTestMethodWithNoTestTags.m | 10 + tests/folderA/dummyClassName.m | 13 + tests/folderA/sampleFunctionTest.m | 12 + tests/folderA/sampleModel.slx | Bin 0 -> 21064 bytes tests/folderB/dummyClassName.m | 13 + tests/test.mldatx | Bin 0 -> 6655 bytes 137 files changed, 3663 insertions(+), 228 deletions(-) create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m create mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m create mode 100644 +scriptgen/+internal/+mixin/EnvironmentDependent.m create mode 100644 +scriptgen/+internal/+mixin/PathDependent.m create mode 100644 +scriptgen/+internal/+mixin/PlatformDependent.m create mode 100644 +scriptgen/+internal/+mixin/Preferable.m create mode 100644 +scriptgen/+internal/+mixin/SetGet.m create mode 100644 +scriptgen/+internal/+mixin/VersionDependent.m create mode 100644 +scriptgen/+internal/+scripts/TestScriptBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m create mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m create mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m create mode 100644 +scriptgen/+internal/CodeBuilderFactory.m create mode 100644 +scriptgen/+internal/CodeBuilderLocator.m create mode 100644 +scriptgen/+internal/MissingCode.m create mode 100644 +scriptgen/+internal/MissingCodeBuilder.m create mode 100644 +scriptgen/+internal/PrunedStackException.m create mode 100644 +scriptgen/+internal/Version.m create mode 100644 +scriptgen/+internal/isAbsolutePath.m create mode 100644 +scriptgen/+internal/numericVerbosity.m create mode 100644 +scriptgen/+internal/unquoteText.m create mode 100644 +scriptgen/+internal/validateText.m create mode 100644 +scriptgen/+internal/validateTextArray.m create mode 100644 +scriptgen/+internal/validateTextScalar.m create mode 100644 +scriptgen/+internal/validateVerbosityScalar.m create mode 100644 +scriptgen/+scripts/TestScriptBuilder.m create mode 100644 +scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m create mode 100644 +scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m create mode 100644 +scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m create mode 100644 +scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m create mode 100644 +scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m create mode 100644 +scriptgen/Code.m create mode 100644 +scriptgen/CodeBuilder.m create mode 100644 +scriptgen/CodeProvider.m create mode 100644 +scriptgen/CodeWriter.m create mode 100644 +scriptgen/Expression.m create mode 100644 +scriptgen/FileOutput.m create mode 100644 +scriptgen/OutputStream.m create mode 100644 +scriptgen/Script.m create mode 100644 +scriptgen/Sequence.m create mode 100644 +scriptgen/Statement.m create mode 100644 +scriptgen/TextOutput.m create mode 100644 genscript.m create mode 100644 tests/baseline_API.mat create mode 100644 tests/folderA/BaseClassWithMethodsToBeOverridden.m create mode 100644 tests/folderA/BaseTestCase.m create mode 100644 tests/folderA/ClassTestWithNotATestMethod.m create mode 100644 tests/folderA/ClassWithNonAlphaNumericTestTags.m create mode 100644 tests/folderA/Copy_2_of_testModelSim.m create mode 100644 tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m create mode 100644 tests/folderA/HasSealedTestTags.m create mode 100644 tests/folderA/HasUnsealedTestTags.m create mode 100644 tests/folderA/SimpleTestCase.m create mode 100644 tests/folderA/SuperclassHasTestMethodTestTags.m create mode 100644 tests/folderA/SuperclassHasTestMethodWithNoTestTags.m create mode 100644 tests/folderA/dummyClassName.m create mode 100644 tests/folderA/sampleFunctionTest.m create mode 100644 tests/folderA/sampleModel.slx create mode 100644 tests/folderB/dummyClassName.m create mode 100644 tests/test.mldatx diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m new file mode 100644 index 0000000..b676ca4 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m @@ -0,0 +1,27 @@ +classdef CreateCoberturaAndHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2022 The MathWorks, Inc. + + properties + CoberturaFilePath = '''coverage.xml''' + HTMLFolderPath = '''htmlCodeCoverage''' + Source = {'pwd'} + end + + methods + function set.CoberturaFilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaFilePath = value; + end + + function set.HTMLFolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLFolderPath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..7ebedb1 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..c40200a --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m new file mode 100644 index 0000000..b9895ae --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateCoberturaCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''coverage.xml''' + Source = {'pwd'} + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..fc21b3f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..babd2ad --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m new file mode 100644 index 0000000..d28898e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateCoberturaModelPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''coverage.xml''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f5a05f7 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaModelPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..225b946 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateCoberturaModelPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m new file mode 100644 index 0000000..cd1cf92 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateFailOnWarningsPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f856a7b --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateFailOnWarningsPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..f88742f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateFailOnWarningsPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m new file mode 100644 index 0000000..9d3af0b --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m @@ -0,0 +1,20 @@ +classdef CreateHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FolderPath = '''htmlCodeCoverage''' + Source = {'pwd'} + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + + function set.Source(obj, value) + scriptgen.internal.validateTextArray(value); + obj.Source = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..ef3da65 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLCodePluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..ba627ec --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLCodePluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m new file mode 100644 index 0000000..5ca0813 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHTMLModelPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2021 The MathWorks, Inc. + + properties + FolderPath = '''htmlModelCoverage''' + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..f6035a8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLModelPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..5eec86e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLModelPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m new file mode 100644 index 0000000..1ec207d --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHTMLTestReportPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2021 The MathWorks, Inc. + + properties + FolderPath = '''report''' + end + + methods + function set.FolderPath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FolderPath = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..529027f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLTestReportPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..111bc61 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateHTMLTestReportPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m new file mode 100644 index 0000000..b6ea0d9 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + BaseFolder = {'pwd'} + end + + methods + function set.BaseFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.BaseFolder = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m new file mode 100644 index 0000000..3a7c690 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m @@ -0,0 +1,14 @@ +classdef CreateHasNameSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + SelectByName = {} + end + + methods + function set.SelectByName(obj, value) + scriptgen.internal.validateText(value); + obj.SelectByName = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m new file mode 100644 index 0000000..701c8e2 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateHasTagSelectorExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + Tag = '''tag''' + end + + methods + function set.Tag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.Tag = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m new file mode 100644 index 0000000..b43f40d --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateJUnitPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.xml''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..95eeec8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateJUnitPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..4263785 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateJUnitPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m new file mode 100644 index 0000000..8d2a739 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreatePDFPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''report.pdf''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..3dcb143 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreatePDFPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreatePDFPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..9b5aaa8 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreatePDFPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreatePDFPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m new file mode 100644 index 0000000..8c6cc60 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m @@ -0,0 +1,4 @@ +classdef CreateSimulinkTestPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..62624b7 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..6342a96 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m new file mode 100644 index 0000000..c72b63c --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateSimulinkTestResultsPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.mldatx''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..76eea06 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..e0c7d2e --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m new file mode 100644 index 0000000..bab3767 --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m @@ -0,0 +1,15 @@ +classdef CreateTAPPluginExpressionBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + FilePath = '''results.tap''' + end + + methods + function set.FilePath(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.FilePath = value; + end + end +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..32b775a --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateTAPPluginParallelExpressionBuilder < ... + scriptgen.expressions.test.CreateTAPPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..167fe0f --- /dev/null +++ b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m @@ -0,0 +1,5 @@ +classdef CreateTAPPluginSerialExpressionBuilder < ... + scriptgen.expressions.test.CreateTAPPluginExpressionBuilder + % Copyright 2022 The MathWorks, Inc. +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..13407f7 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..bd6dacc --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,25 @@ +classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'matlab.unittest.plugins.codecoverage.CoverageReport', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', [CoberturaFormat(%s) CoverageReport(%s)])', source, obj.CoberturaFilePath, obj.HTMLFolderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..bf30634 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateCoberturaCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..a1c4d26 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m @@ -0,0 +1,24 @@ +classdef CreateCoberturaCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoberturaFormat(%s))', source, obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..2f65f4d --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateCoberturaModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..8f5ddaa --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m @@ -0,0 +1,25 @@ +classdef CreateCoberturaModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... + 'sltest.plugins.ModelCoveragePlugin'}; + + text = sprintf('ModelCoveragePlugin(''Producing'', CoberturaFormat(%s))', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..880bab9 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateFailOnWarningsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..7bb13ef --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateFailOnWarningsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') + end + + methods + function expression = build(~) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.FailOnWarningsPlugin'}; + + text = 'FailOnWarningsPlugin()'; + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m new file mode 100644 index 0000000..8d36823 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m new file mode 100644 index 0000000..d655874 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m @@ -0,0 +1,24 @@ +classdef CreateHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.codecoverage.CoverageReport', ... + 'matlab.unittest.plugins.CodeCoveragePlugin'}; + + source = strjoin(obj.Source, ', '); + text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoverageReport(%s))', source, obj.FolderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..1327a8c --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateHTMLModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..a18bb0c --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m @@ -0,0 +1,34 @@ +classdef CreateHTMLModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'sltest.plugins.coverage.ModelCoverageReport', ... + 'sltest.plugins.ModelCoveragePlugin'}; + + % ModelCoverage report does not handle relative paths + if ~strcmp(obj.FolderPath, unquoteText(obj.FolderPath)) && ~isAbsolutePath(unquoteText(obj.FolderPath)) + folderPath = ['fullfile(pwd, ' obj.FolderPath ')']; + else + folderPath = obj.FolderPath; + end + + text = sprintf('ModelCoveragePlugin(''Producing'', ModelCoverageReport(%s))', folderPath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..4e484e6 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m @@ -0,0 +1,16 @@ +classdef CreateHTMLTestReportPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..56157bf --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m @@ -0,0 +1,20 @@ +classdef CreateHTMLTestReportPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingHTML(%s)', obj.FolderPath); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m new file mode 100644 index 0000000..824b670 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m @@ -0,0 +1,36 @@ +classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasBaseFolderSelectorExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') + end + + methods + function expression = build(obj) + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.selectors.HasBaseFolder', ... + 'matlab.unittest.constraints.StartsWithSubstring'}; + + constraints = {}; + for i = 1:numel(obj.BaseFolder) + folder = obj.BaseFolder{i}; + if ~strcmp(folder, unquoteText(folder)) && ~isAbsolutePath(unquoteText(folder)) + text = sprintf('StartsWithSubstring(fullfile(pwd, %s))', folder); + else + text = sprintf('StartsWithSubstring(%s)', folder); + end + constraints{end+1} = text; %#ok + end + + text = sprintf('HasBaseFolder(%s)', strjoin(constraints, ' | ')); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m new file mode 100644 index 0000000..f97c34f --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m @@ -0,0 +1,25 @@ +classdef CreateHasNameSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasNameSelectorExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') + end + + methods + function expression = build(obj) + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + import scriptgen.Expression; + + TestFiles = cellfun(@(x) ['''' x ''''], obj.SelectByName, 'UniformOutput', false); + TestFiles = ['{' strjoin(TestFiles, ', ') '}']; + text = sprintf('names = %s;',TestFiles); + suiteStr = 'suite = suite.selectIf(''Name'', names);'; + fullText = sprintf('%s\n%s', text, suiteStr); + + expression = Expression(fullText); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m new file mode 100644 index 0000000..77c853e --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateHasTagSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasTagSelectorExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.selectors.HasTag'}; + + text = sprintf('HasTag(%s)', obj.Tag); + + expression = Expression(text, imports); + end + end +end + + + diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..dafdf71 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreateJUnitPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateJUnitPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..3d2c691 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreateJUnitPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.XMLPlugin'}; + + text = sprintf('XMLPlugin.producingJUnitFormat(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..e2ab00e --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreatePDFPluginParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PlatformDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + SupportedPlatforms = {'GLN', 'PC'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreatePDFPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..8a51d62 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreatePDFPluginSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PlatformDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017a') + SupportedPlatforms = {'GLN', 'PC'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m new file mode 100644 index 0000000..e2f02b0 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m @@ -0,0 +1,17 @@ +classdef CreatePDFPluginWithMacParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreatePDFPluginWithMacSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m new file mode 100644 index 0000000..1fb5f26 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m @@ -0,0 +1,21 @@ +classdef CreatePDFPluginWithMacSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2021-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'matlab.unittest.plugins.TestReportPlugin'}; + + text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..44ad9c1 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateSimulinkTestPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..9fa3ad7 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateSimulinkTestPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(~) + import scriptgen.Expression; + + imports = {'sltest.plugins.TestManagerResultsPlugin'}; + + text = sprintf('TestManagerResultsPlugin()'); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m new file mode 100644 index 0000000..ef4a6d8 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m @@ -0,0 +1,19 @@ +classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + builder = scriptgen.internal.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder(); + set(builder, get(obj)); + expression = builder.build(); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m new file mode 100644 index 0000000..d114f61 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent ... + & scriptgen.internal.mixin.PathDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') + RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = {'sltest.plugins.TestManagerResultsPlugin'}; + + text = sprintf('TestManagerResultsPlugin(''ExportToFile'', %s)', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m new file mode 100644 index 0000000..9296d60 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m @@ -0,0 +1,33 @@ +classdef CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'matlab.unittest.plugins.ToUniqueFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + filePath = scriptgen.internal.unquoteText(obj.FilePath); + hadQuotes = ~strcmp(filePath, obj.FilePath); + if hadQuotes + [fp,name,ext] = fileparts(filePath); + filePath = ['''' fullfile(fp, name) '''']; + else + ext = '.tap'; + end + + text = sprintf('TAPPlugin.producingOriginalFormat(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m new file mode 100644 index 0000000..1d560ec --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m @@ -0,0 +1,32 @@ +classdef CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + import scriptgen.internal.unquoteText; + import scriptgen.internal.isAbsolutePath; + + imports = { ... + 'matlab.unittest.plugins.ToFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + % Fixes an issue where ToFile did not properly resolve + % fullpaths prior to R2015a. + if ~strcmp(obj.FilePath, unquoteText(obj.FilePath)) && ~isAbsolutePath(unquoteText(obj.FilePath)) + filePath = ['fullfile(pwd, ' obj.FilePath ')']; + else + filePath = obj.FilePath; + end + + text = sprintf('TAPPlugin.producingOriginalFormat(ToFile(%s))', filePath); + + expression = Expression(text, imports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m new file mode 100644 index 0000000..63d8a45 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m @@ -0,0 +1,32 @@ +classdef CreateTAPPluginUsingVersion13ParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.ToUniqueFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + filePath = scriptgen.internal.unquoteText(obj.FilePath); + hadQuotes = ~strcmp(filePath, obj.FilePath); + if hadQuotes + [fp,name,ext] = fileparts(filePath); + filePath = ['''' fullfile(fp, name) '''']; + else + ext = '.tap'; + end + + text = sprintf('TAPPlugin.producingVersion13(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m new file mode 100644 index 0000000..1c722c9 --- /dev/null +++ b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m @@ -0,0 +1,23 @@ +classdef CreateTAPPluginUsingVersion13SerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016b') + end + + methods + function expression = build(obj) + import scriptgen.Expression; + + imports = { ... + 'matlab.unittest.plugins.ToFile', ... + 'matlab.unittest.plugins.TAPPlugin'}; + + text = sprintf('TAPPlugin.producingVersion13(ToFile(%s))', obj.FilePath); + + expression = Expression(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/EnvironmentDependent.m b/+scriptgen/+internal/+mixin/EnvironmentDependent.m new file mode 100644 index 0000000..abfaf51 --- /dev/null +++ b/+scriptgen/+internal/+mixin/EnvironmentDependent.m @@ -0,0 +1,41 @@ +classdef (Hidden, HandleCompatible) EnvironmentDependent + % EnvironmentDependent - Base class for mixins that indicate a class is + % dependent on the runtime environment in some way + % + % When a mixin class subclasses EnvironmentDependent, it should call + % the addIsSupportedFunction method in its constructor and add a + % function that evaluates to true/false depending on the current + % runtime environment. + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + IsSupportedFunctions + end + + methods + function tf = isSupportedByCurrentEnvironment(obj) + for i = 1:numel(obj.IsSupportedFunctions) + isSupported = obj.IsSupportedFunctions{i}; + if ~isSupported(obj) + tf = false; + return; + end + end + tf = true; + end + end + + methods (Hidden, Access = protected) + function obj = EnvironmentDependent() + if isempty(obj.IsSupportedFunctions) + obj.IsSupportedFunctions = {}; + end + end + + function obj = addIsSupportedFunction(obj, fcn) + obj.IsSupportedFunctions{end+1} = fcn; + end + end +end + diff --git a/+scriptgen/+internal/+mixin/PathDependent.m b/+scriptgen/+internal/+mixin/PathDependent.m new file mode 100644 index 0000000..b7067d3 --- /dev/null +++ b/+scriptgen/+internal/+mixin/PathDependent.m @@ -0,0 +1,24 @@ +classdef (Hidden, HandleCompatible) PathDependent < scriptgen.internal.mixin.EnvironmentDependent + % PathDependent - Indicates a class requires a set of path names on the + % current MATLAB search path + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + RequiredPathNames + end + + methods (Hidden, Access = protected) + function obj = PathDependent() + obj = obj.addIsSupportedFunction(@requiredNamesExistOnCurrentPath); + end + end + + methods (Access = protected) + function tf = requiredNamesExistOnCurrentPath(obj) + ret = cellfun(@(n)exist(n), obj.RequiredPathNames); %#ok + tf = all(ismember(ret, [2 3 4 5 6 7 8])); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/PlatformDependent.m b/+scriptgen/+internal/+mixin/PlatformDependent.m new file mode 100644 index 0000000..b6617c7 --- /dev/null +++ b/+scriptgen/+internal/+mixin/PlatformDependent.m @@ -0,0 +1,25 @@ +classdef (Hidden, HandleCompatible) PlatformDependent < scriptgen.internal.mixin.EnvironmentDependent + % PlatformDependent - Indicates a class requires a particular runtime + % platform like PCWIN64 or MACI64 + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + SupportedPlatforms + end + + methods (Hidden, Access = protected) + function obj = PlatformDependent() + obj = obj.addIsSupportedFunction(@isSupportedByCurrentPlatform); + end + end + + methods (Access = protected) + function tf = isSupportedByCurrentPlatform(obj) + exp = ['^(' strjoin(obj.SupportedPlatforms, '|') ')\w*']; + matches = regexp(computer(), exp, 'once'); + tf = any(matches); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/Preferable.m b/+scriptgen/+internal/+mixin/Preferable.m new file mode 100644 index 0000000..b9fd4a5 --- /dev/null +++ b/+scriptgen/+internal/+mixin/Preferable.m @@ -0,0 +1,75 @@ +classdef (Hidden, HandleCompatible) Preferable + % Preferable - Base class for mixins that indicate an array of class + % objects may be sorted by some type of preferability + % + % When a mixin class subclasses Preferable, it should call the + % addPreferabilityComparator method in its constructor and add a + % function that accepts two objects and returns a negative value, + % zero, or positive value if the first object is less than, equal to, + % or greater than the second object. + % + % Note: one or both objects passed to the comparator may not derive + % from the mixin class. + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + PreferabilityComparators + end + + methods (Sealed) + function sorted = sortByPreferability(array) + map = mergeMaps({array.PreferabilityComparators}); + sorted = insertionSort(array, @(a,b)chainedComparator(a,b,map.values)); + end + end + + methods (Hidden, Access = protected) + function obj = Preferable() + if isempty(obj.PreferabilityComparators) + obj.PreferabilityComparators = containers.Map(); + end + end + + function obj = addPreferabilityComparator(obj, mixinClass, comparator) + obj.PreferabilityComparators(mixinClass) = comparator; + end + end +end + +function sorted = insertionSort(array, comparator) +for i = 2:numel(array) + key = array(i); + j = i - 1; + while j >= 1 && comparator(array(j), key) > 0 + array(j+1) = array(j); + j = j - 1; + end + array(j+1) = key; +end +sorted = array; +end + +function p = chainedComparator(a, b, comparators) +for i = 1:numel(comparators) + compare = comparators{i}; + value = compare(a, b); + assert(compare(b, a) == -value, 'comparator violates contract!'); + if value ~= 0 + p = value; + return; + end +end +p = 0; +end + +function m = mergeMaps(maps) +m = containers.Map(); +for i = 1:numel(maps) + map = maps{i}; + keys = map.keys; + for j = 1:numel(keys) + m(keys{j}) = map(keys{j}); + end +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+mixin/SetGet.m b/+scriptgen/+internal/+mixin/SetGet.m new file mode 100644 index 0000000..cad3030 --- /dev/null +++ b/+scriptgen/+internal/+mixin/SetGet.m @@ -0,0 +1,35 @@ +classdef (Abstract) SetGet < handle + % SetGet - A primitive alternative to matlab.mixin.SetGet that works + % with releases prior to R2014b + + % Copyright 2020-2022 The MathWorks, Inc. + + methods + function set(obj, varargin) + if nargin == 2 + value = varargin{1}; + names = fieldnames(value); + for i = 1:numel(names) + obj.(names{i}) = value.(names{i}); + end + return; + end + for i = 1:2:numel(varargin) + obj.(varargin{i}) = varargin{i+1}; + end + end + + function value = get(obj, name) + if nargin == 1 + value = struct(); + props = properties(obj); + for i = 1:numel(props) + value.(props{i}) = obj.(props{i}); + end + return; + end + value = obj.(name); + end + end +end + diff --git a/+scriptgen/+internal/+mixin/VersionDependent.m b/+scriptgen/+internal/+mixin/VersionDependent.m new file mode 100644 index 0000000..8108a08 --- /dev/null +++ b/+scriptgen/+internal/+mixin/VersionDependent.m @@ -0,0 +1,41 @@ +classdef (Hidden, HandleCompatible) VersionDependent < scriptgen.internal.mixin.EnvironmentDependent ... + & scriptgen.internal.mixin.Preferable + % VersionDependent - Indicates a class requires a particular version of + % MATLAB + + % Copyright 2020 The MathWorks, Inc. + + properties (Abstract, Constant, Access = protected) + MinSupportedVersion + end + + methods (Hidden, Access = protected) + function obj = VersionDependent() + obj = obj.addIsSupportedFunction(@isSupportedByCurrentVersion); + obj = obj.addPreferabilityComparator('scriptgen.internal.mixin.VersionDependent', @comparePreferabilityByMinVersion); + end + end + + methods (Access = protected) + function tf = isSupportedByCurrentVersion(obj) + import scriptgen.internal.Version; + tf = obj.MinSupportedVersion <= Version.forCurrentRelease(); + end + end +end + +function p = comparePreferabilityByMinVersion(a, b) + if ~isa(a, 'scriptgen.internal.mixin.VersionDependent') && ~isa(b, 'scriptgen.internal.mixin.VersionDependent') + p = 0; + elseif ~isa(a, 'scriptgen.internal.mixin.VersionDependent') + p = -1; + elseif ~isa(b, 'scriptgen.internal.mixin.VersionDependent') + p = 1; + elseif a.MinSupportedVersion == b.MinSupportedVersion + p = 0; + elseif a.MinSupportedVersion < b.MinSupportedVersion + p = -1; + else + p = 1; + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+scripts/TestScriptBuilder.m b/+scriptgen/+internal/+scripts/TestScriptBuilder.m new file mode 100644 index 0000000..3941676 --- /dev/null +++ b/+scriptgen/+internal/+scripts/TestScriptBuilder.m @@ -0,0 +1,249 @@ +classdef TestScriptBuilder < scriptgen.scripts.TestScriptBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function script = build(obj) + import scriptgen.Script; + import scriptgen.Sequence; + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + suiteName = 'suite'; + runnerName = 'runner'; + resultsName = 'results'; + + sequences = Sequence.empty(); + + if ~isempty(obj.WorkingFolder) + sequences(end+1) = Sequence(sprintf('cd(''%s'');', escape(obj.WorkingFolder))); + end + + sequences = [sequences obj.buildAddpathSequence()]; + + sequences(end+1) = testCodeProvider.createSequence('CreateTestSuite', ... + 'CodeProvider', obj.CodeProvider, ... + 'SuiteName', suiteName,... + 'SelectByFolder', quoteCell(splitPath(obj.SelectByFolder)),... + 'SelectByTag', quote(obj.SelectByTag), ... + 'SelectByName', (obj.SelectByName)); + + sequences = [sequences obj.buildMkdirSequence()]; + + runnerSequence = Sequence.empty(); + + if obj.UseParallel + [canUseParallel, cannotUseParallelMsg] = canRunInParallel(); + if canUseParallel + runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, true); + if isempty(runnerSequence) + msg = ['Unable to generate all artifacts while running tests in parallel. ' ... + 'Running tests in serial instead.']; + sequences(end+1) = Sequence(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + end + else + msg = [cannotUseParallelMsg '. Running tests in serial instead.']; + sequences(end+1) = Sequence(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + end + end + + if isempty(runnerSequence) + sequences = [sequences obj.buildDeleteTAPResultsSequence()]; + runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, false); + runStatement = sprintf('%s = %s.run(%s);', resultsName, runnerName, suiteName); + else + runStatement = sprintf('%s = %s.runInParallel(%s);', resultsName, runnerName, suiteName); + end + + sequences(end+1) = runnerSequence; + sequences(end+1) = Sequence({ ... + runStatement, ... + sprintf('display(%s);', resultsName)}); + + sequences(end+1) = testCodeProvider.createSequence('AssertNoFailures', ... + 'CodeProvider', obj.CodeProvider, ... + 'ResultsName', resultsName); + + script = Script(sequences); + end + end + + methods (Access = private) + function s = buildAddpathSequence(obj) + import scriptgen.Sequence; + + dirs = splitPath(obj.SourceFolder); + + if isempty(dirs) + s = Sequence.empty(); + return; + end + + for i = numel(dirs):-1:1 + code{i} = sprintf('addpath(genpath(''%s''));', escape(dirs{i})); + end + s = Sequence(code); + end + + function s = buildMkdirSequence(obj) + import scriptgen.Sequence; + + dirs = cellfun(@(f)fileparts(f), { ... + obj.PDFTestReport, ... + obj.TAPTestResults, ... + obj.JUnitTestResults, ... + obj.SimulinkTestResults, ... + obj.CoberturaCodeCoverage, ... + obj.CoberturaModelCoverage}, ... + 'UniformOutput', false); + + % TAP results require a folder when running in parallel + if ~isempty(obj.TAPTestResults) && obj.UseParallel + [fp,name] = fileparts(obj.TAPTestResults); + dirs = [dirs {fullfile(fp,name)}]; + end + + % HTML artifacts take in folder path + htmlDirs = {obj.HTMLTestReport, ... + obj.HTMLCodeCoverage, ... + obj.HTMLModelCoverage}; + + dirs = [dirs htmlDirs]; + + dirs = dirs(~cellfun(@isempty, dirs)); + dirs = unique(dirs); + + if isempty(dirs) + s = Sequence.empty(); + return; + end + + for i = numel(dirs):-1:1 + code{i} = sprintf('[~,~] = mkdir(''%s'');', escape(dirs{i})); + end + s = Sequence(code); + end + + function s = buildDeleteTAPResultsSequence(obj) + import scriptgen.Sequence; + import scriptgen.internal.isAbsolutePath; + + % Only pre-existing TAP results need to be explicitly deleted + % at the moment. Other artifacts are automatically overwritten + % by their respective plugin. + files = {obj.TAPTestResults}; + files = files(~cellfun(@isempty, files)); + files = unique(files); + + if isempty(files) + s = Sequence.empty(); + return; + end + + code = {}; + for i = 1:numel(files) + filePath = escape(files{i}); + if ~isAbsolutePath(filePath) + fullFilePath = sprintf('fullfile(pwd, ''%s'')', filePath); + else + fullFilePath = sprintf('''%s''', filePath); + end + c{1} = sprintf('if exist(%s, ''file'') == 2', fullFilePath); + c{2} = sprintf(' delete(''%s'');', filePath); + c{3} = sprintf('end'); + code = [code c]; %#ok + end + s = Sequence(code); + end + + function s = buildCreateTestRunnerSequence(obj, provider, runnerName, useParallel) + source = obj.SourceFolder; + if isempty(source) + source = '.'; + end + + s = provider.createSequence('CreateTestRunner', ... + 'CodeProvider', obj.CodeProvider, ... + 'RunnerName', runnerName, ... + 'PDFTestReport', quote(obj.PDFTestReport), ... + 'HTMLTestReport', quote(obj.HTMLTestReport), ... + 'TAPTestResults', quote(obj.TAPTestResults), ... + 'JUnitTestResults', quote(obj.JUnitTestResults), ... + 'SimulinkTestResults', quote(obj.SimulinkTestResults), ... + 'CoberturaCodeCoverage', quote(obj.CoberturaCodeCoverage), ... + 'HTMLCodeCoverage', quote(obj.HTMLCodeCoverage), ... + 'CoberturaModelCoverage', quote(obj.CoberturaModelCoverage), ... + 'HTMLModelCoverage', quote(obj.HTMLModelCoverage), ... + 'SourceFolder', quoteCell(splitPath(source)), ... + 'LoggingLevel', obj.LoggingLevel, ... + 'OutputDetail', obj.OutputDetail, ... + 'Strict', obj.Strict, ... + 'UseParallel', useParallel); + end + end +end + +function [tf,msg] = canRunInParallel() +tf = false; +msg = ''; + +mc = meta.class.fromName('matlab.unittest.TestRunner'); +runInParallelMethod = mc.MethodList.findobj('Name', 'runInParallel'); +if isempty(runInParallelMethod) + msg = 'Unable to find a runInParallel method on matlab.unittest.TestRunner'; + return; +end + +licenseName = 'Distrib_Computing_Toolbox'; +if ~license('test', licenseName) + msg = 'Unable to find a license for Parallel Computing Toolbox'; + return; +end + +[canCheckout,~] = license('checkout', licenseName); +if ~canCheckout + msg = 'Unable to check out a license for Parallel Computing Toolbox'; + return; +end + +if isempty(gcp()) + msg = 'Unable to get or start a parallel pool'; + return; +end + +tf = true; +end + +function text = splitPath(text) +if iscellstr(text) %#ok + return; +elseif isempty(text) + text = {}; +else + text = strtrim(strsplit(text, {';', ':'})); +end +end + +function text = quote(text) +if isempty(text) + return; +end +text = ['''' escape(text) '''']; +end + +function text = quoteCell(text) +text = cellfun(@(t)['''' t ''''], escape(text), 'UniformOutput', false); +end + +function text = escape(text) +if isempty(text) + return; +end +text = strrep(text, '''', ''''''); +end diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m new file mode 100644 index 0000000..a20e496 --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m @@ -0,0 +1,18 @@ +classdef AssertNoFailuresWithAssertSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + sequence = Sequence( ... + sprintf('assert(~any([%s.Failed]), ''At least one test failed in the test session.'');', obj.ResultsName)); + end + end +end + diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m new file mode 100644 index 0000000..1b9820f --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m @@ -0,0 +1,18 @@ +classdef AssertNoFailuresWithAssertSuccessSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + sequence = Sequence( ... + sprintf('assertSuccess(%s);', obj.ResultsName)); + end + end +end + diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m new file mode 100644 index 0000000..bd660dd --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m @@ -0,0 +1,214 @@ +classdef CreateTestRunnerSequenceBuilder < scriptgen.sequences.test.CreateTestRunnerSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2024 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + + if ~isempty(obj.CoberturaCodeCoverage) && isempty(obj.SourceFolder) + error('scriptgen:CreateTestRunner:sourceRequiredForCoberturaCodeCoverage', ... + '''SourceFolder'' is required when specifying ''CoberturaCodeCoverage''.'); + end + + if ~isempty(obj.HTMLCodeCoverage) && isempty(obj.SourceFolder) + error('scriptgen:CreateTestRunner:sourceRequiredForHTMLCodeCoverage', ... + '''SourceFolder'' is required when specifying ''HTMLCodeCoverage''.'); + end + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + sequence = Sequence.empty(); + + statements = testCodeProvider.createStatement('CreateTestRunner', ... + 'RunnerName', obj.RunnerName, ... + 'LoggingLevel', obj.LoggingLevel, ... + 'OutputDetail', obj.OutputDetail); + + if obj.Strict + fowStatement = obj.buildPluginStatement(testCodeProvider, 'fails tests when they issue warnings', ... + 'CreateFailOnWarningsPlugin'); + if isempty(fowStatement) + return; + end + statements(end+1) = fowStatement; + end + + hasPDF = false; + if ~isempty(obj.PDFTestReport) + [pdfStatement, hasPDF] = obj.buildPluginStatement(testCodeProvider, 'generates a PDF test results report', ... + 'CreatePDFPlugin', 'FilePath', obj.PDFTestReport); + if isempty(pdfStatement) + return; + end + statements(end+1) = pdfStatement; + end + + hasHTML = false; + if ~isempty(obj.HTMLTestReport) + [htmlReportStatement, hasHTML] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML test results report', ... + 'CreateHTMLTestReportPlugin', 'FolderPath', obj.HTMLTestReport); + if isempty(htmlReportStatement) + return; + end + statements(end+1) = htmlReportStatement; + end + + if ~isempty(obj.TAPTestResults) + tapStatement = obj.buildPluginStatement(testCodeProvider, 'generates a TAP test results report', ... + 'CreateTAPPlugin', 'FilePath', obj.TAPTestResults); + if isempty(tapStatement) + return; + end + statements(end+1) = tapStatement; + end + + if ~isempty(obj.JUnitTestResults) + junitStatement = obj.buildPluginStatement(testCodeProvider, 'generates a JUnit test results report', ... + 'CreateJUnitPlugin', 'FilePath', obj.JUnitTestResults); + if isempty(junitStatement) + return; + end + statements(end+1) = junitStatement; + end + + hasSimTest = false; + if ~isempty(obj.SimulinkTestResults) + [simResultsStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... + 'CreateSimulinkTestResultsPlugin', 'FilePath', obj.SimulinkTestResults); + if isempty(simResultsStatement) + return; + end + statements(end+1) = simResultsStatement; + end + + if (hasPDF || hasHTML) && ~hasSimTest + % Do not warn if we cannot add Simulink Test plugin because the user did + % not explicitly request it. + warningState = warning('off', 'scriptgen:featureNotAvailable'); + restoreState = onCleanup(@()warning(warningState)); + [simTestStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... + 'CreateSimulinkTestPlugin'); + delete(restoreState); + if isempty(simTestStatement) + return; + end + if hasSimTest + statements(end+1) = simTestStatement; + end + end + + if (hasPDF || hasHTML) && hasSimTest && obj.UseParallel && verLessThan('matlab', '9.13') + % g2730113. Fall back to running serially. + return; + end + + % More than one CodeCoveragePlugin cannot exist on the same runner if they + % have overlapping source files. + hasCodeCov = false; + if ~isempty(obj.CoberturaCodeCoverage) && ~isempty(obj.HTMLCodeCoverage) + [dualCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates Cobertura and HTML code coverage reports', ... + 'CreateCoberturaAndHTMLCodePlugin', ... + 'CoberturaFilePath', obj.CoberturaCodeCoverage, ... + 'HTMLFolderPath', obj.HTMLCodeCoverage, ... + 'Source', obj.SourceFolder); + if isempty(dualCodeStatement) + return; + end + statements(end+1) = dualCodeStatement; + end + + if ~isempty(obj.CoberturaCodeCoverage) && ~hasCodeCov + [coberturaCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura code coverage report', ... + 'CreateCoberturaCodePlugin', 'FilePath', obj.CoberturaCodeCoverage, 'Source', obj.SourceFolder); + if isempty(coberturaCodeStatement) + return; + end + statements(end+1) = coberturaCodeStatement; + end + + if ~isempty(obj.HTMLCodeCoverage) && ~hasCodeCov + [htmlCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML code coverage report', ... + 'CreateHTMLCodePlugin', 'FolderPath', obj.HTMLCodeCoverage, 'Source', obj.SourceFolder); %#ok + if isempty(htmlCodeStatement) + return; + end + statements(end+1) = htmlCodeStatement; + end + + if ~isempty(obj.CoberturaModelCoverage) + coberturaModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura model coverage report', ... + 'CreateCoberturaModelPlugin', 'FilePath', obj.CoberturaModelCoverage); + if isempty(coberturaModelStatement) + return; + end + statements(end+1) = coberturaModelStatement; + end + + if ~isempty(obj.HTMLModelCoverage) + htmlModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates an HTML model coverage report', ... + 'CreateHTMLModelPlugin', 'FolderPath', obj.HTMLModelCoverage); + if isempty(htmlModelStatement) + return; + end + statements(end+1) = htmlModelStatement; + end + + sequence = Sequence(statements); + end + end + + methods (Access = private) + function [statement, success] = buildPluginStatement(obj, provider, purpose, type, varargin) + import scriptgen.Statement; + + statement = Statement.empty(); + success = false; + + if obj.UseParallel + statement = obj.buildAddPluginStatement(provider.createExpression([type 'Parallel'], varargin{:})); + end + + if isempty(statement) + statement = obj.buildAddPluginStatement(provider.createExpression([type 'Serial'], varargin{:})); + if ~isempty(statement) && obj.UseParallel + % We could not create the parallel statement but we could create the + % non-parallel statement. Return empty so we can fall back to running + % serially, as we prefer to produce requested artifacts over running in + % parallel. + warning('scriptgen:featureNotAvailable', ... + ['Unable to add a plugin that ' purpose ' while running tests in parallel.']); + statement = Statement.empty(); + return; + end + end + + if isempty(statement) + % We could not create the parallel or non-parallel statement. No point in + % falling back at this point. Put a comment in place of the statement. + msg = ['Unable to add a plugin that ' purpose '. This problem might be due to a MATLAB release ' ... + 'or operating system that does not support the plugin, ' ... + 'a missing toolbox, or a missing license.']; + statement = Statement(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + return; + end + + success = true; + end + + function statement = buildAddPluginStatement(obj, expression) + import scriptgen.Statement; + + if isempty(expression) + statement = Statement.empty(); + return; + end + statement = Statement(sprintf('%s.addPlugin(%s);', obj.RunnerName, expression.Text), expression.RequiredImports); + end + end +end \ No newline at end of file diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m new file mode 100644 index 0000000..6839529 --- /dev/null +++ b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -0,0 +1,67 @@ +classdef CreateTestSuiteSequenceBuilder < scriptgen.sequences.test.CreateTestSuiteSequenceBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function sequence = build(obj) + import scriptgen.Sequence; + import scriptgen.Statement; + + testCodeProvider = obj.CodeProvider.withSubpackage('test'); + + statements = testCodeProvider.createStatement('CreateTestSuite', ... + 'SuiteName', obj.SuiteName); + + if ~isempty(obj.SelectByFolder) + statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'base folder selector', ... + 'CreateHasBaseFolderSelector', 'BaseFolder', obj.SelectByFolder); + end + + if ~isempty(obj.SelectByTag) + statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'tag selector', ... + 'CreateHasTagSelector', 'Tag', obj.SelectByTag); + end + + if ~isempty(obj.SelectByName) + expression= testCodeProvider.createExpression('CreateHasNameSelector','SelectByName', obj.SelectByName); + statements(end+1) = Statement(expression.Text, expression.RequiredImports); + end + + sequence = Sequence(statements); + end + end + + methods (Access = private) + function [statement, success] = buildSelectorStatement(obj, provider, name, type, varargin) + import scriptgen.Statement; + + statement = obj.buildSelectIfStatement(provider.createExpression(type, varargin{:})); + if isempty(statement) + success = false; + msg = ['Unable to create ' name '. This problem might be due to a MATLAB release ' ... + 'or operating system that does not support generating the specified artifact, ' ... + 'a missing toolbox, or a missing license.']; + statement = Statement(['% ' msg]); + warning('scriptgen:featureNotAvailable', msg); + return; + end + + success = true; + end + + function statement = buildSelectIfStatement(obj, expression) + import scriptgen.Statement; + + if isempty(expression) + statement = Statement.empty(); + return; + end + statement = Statement(sprintf('%s = %s.selectIf(%s);', obj.SuiteName, obj.SuiteName, expression.Text), expression.RequiredImports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m new file mode 100644 index 0000000..0f9ce75 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m @@ -0,0 +1,30 @@ +classdef CreateTestRunnerUsingWithTextOutputDetailStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + import scriptgen.internal.numericVerbosity; + + imports = {'matlab.unittest.TestRunner'}; + + nvpairs = {}; + if ~isempty(obj.LoggingLevel) + nvpairs{end+1} = sprintf('''LoggingLevel'', %s', num2str(numericVerbosity(obj.LoggingLevel))); + end + if ~isempty(obj.OutputDetail) + nvpairs{end+1} = sprintf('''OutputDetail'', %s', num2str(numericVerbosity(obj.OutputDetail))); + end + + text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m new file mode 100644 index 0000000..8f00299 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m @@ -0,0 +1,25 @@ +classdef CreateTestRunnerUsingWithTextOutputStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + imports = {'matlab.unittest.TestRunner'}; + + text = sprintf('%s = TestRunner.withTextOutput();', obj.RunnerName); + + if ~isempty(obj.LoggingLevel) || ~isempty(obj.OutputDetail) + text = [text ' % Unable to specify the logging level or output detail in this release of MATLAB.']; + end + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m new file mode 100644 index 0000000..326fe39 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m @@ -0,0 +1,41 @@ +classdef CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020-2022 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014b') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + import scriptgen.internal.numericVerbosity; + + imports = {'matlab.unittest.TestRunner'}; + + if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) + verbosity = max(numericVerbosity(obj.LoggingLevel), numericVerbosity(obj.OutputDetail)); + elseif ~isempty(obj.LoggingLevel) + verbosity = numericVerbosity(obj.LoggingLevel); + elseif ~isempty(obj.OutputDetail) + verbosity = numericVerbosity(obj.OutputDetail); + else + verbosity = []; + end + + nvpairs = {}; + if ~isempty(verbosity) + nvpairs{end+1} = sprintf('''Verbosity'', %s', num2str(verbosity)); + end + + text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); + + if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) + text = [text ' % Unable to specify the logging level and output detail independently in this release of MATLAB.']; + end + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m new file mode 100644 index 0000000..a35272f --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m @@ -0,0 +1,21 @@ +classdef CreateTestSuiteUsingFromFolderStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + imports = {'matlab.unittest.TestSuite'}; + + text = sprintf('%s = TestSuite.fromFolder(pwd, ''IncludingSubfolders'', true);', obj.SuiteName); + + statement = Statement(text, imports); + end + end +end + diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m new file mode 100644 index 0000000..f9ffc69 --- /dev/null +++ b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m @@ -0,0 +1,19 @@ +classdef CreateTestSuiteUsingTestsuiteStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... + & scriptgen.internal.mixin.VersionDependent + % Copyright 2020 The MathWorks, Inc. + + properties (Constant, Access = protected) + MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') + end + + methods + function statement = build(obj) + import scriptgen.Statement; + + text = sprintf('%s = testsuite(pwd, ''IncludeSubfolders'', true);', obj.SuiteName); + + statement = Statement(text); + end + end +end + diff --git a/+scriptgen/+internal/CodeBuilderFactory.m b/+scriptgen/+internal/CodeBuilderFactory.m new file mode 100644 index 0000000..de0be85 --- /dev/null +++ b/+scriptgen/+internal/CodeBuilderFactory.m @@ -0,0 +1,40 @@ +classdef CodeBuilderFactory < handle + % CodeBuilderFactory - Factory that creates CodeBuilders + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + Locator + end + + methods + function obj = CodeBuilderFactory(locator) + obj.Locator = locator; + end + + function builder = create(obj, type) + % create - Creates a single CodeBuilder + % + % Creates the most preferable CodeBuilder supported by the + % current runtime environment or empty. + + import scriptgen.internal.MissingCodeBuilder; + + metaclasses = obj.Locator.locate(type); + builder = MissingCodeBuilder.empty(); + for i = numel(metaclasses):-1:1 + constructor = str2func(metaclasses(i).Name); + builder(i) = constructor(); + end + + isSupported = arrayfun(@(b)b.isSupportedByCurrentEnvironment(), builder); + builder = builder(isSupported); + + if numel(builder) > 1 + builder = builder.sortByPreferability(); + builder = builder(end); + end + end + end +end + diff --git a/+scriptgen/+internal/CodeBuilderLocator.m b/+scriptgen/+internal/CodeBuilderLocator.m new file mode 100644 index 0000000..b6addb6 --- /dev/null +++ b/+scriptgen/+internal/CodeBuilderLocator.m @@ -0,0 +1,55 @@ +classdef CodeBuilderLocator + % CodeBuilderLocator - Locator of CodeBuilder metaclasses + + % Copyright 2020 The MathWorks, Inc. + + properties (Dependent, Access = private) + ImplementationPackage + InterfacePackage + end + + properties (Access = private) + ImplementationPackageName + InterfacePackageName + end + + methods + function obj = CodeBuilderLocator(implPackage, intfPackage) + if ~ischar(implPackage) || ~ischar(intfPackage) + error('Packages must be provided as character arrays'); + end + obj.ImplementationPackageName = implPackage; + obj.InterfacePackageName = intfPackage; + end + + function p = get.ImplementationPackage(obj) + p = meta.package.fromName(obj.ImplementationPackageName); + end + + function p = get.InterfacePackage(obj) + p = meta.package.fromName(obj.InterfacePackageName); + end + + function metaclasses = locate(obj, type) + if ischar(type) + type = prependPrefix([obj.InterfacePackage.Name '.'], type); + type = meta.class.fromName(type); + end + if isempty(type) + metaclasses = type; + return; + end + classes = obj.ImplementationPackage.ClassList; + classes = classes(classes <= type); + classes = classes(~[classes.Abstract]); + metaclasses = classes; + end + end +end + +function name = prependPrefix(prefix, name) + if isempty(regexp(name, ['^' prefix '\w*'], 'once')) + name = [prefix name]; + end +end + diff --git a/+scriptgen/+internal/MissingCode.m b/+scriptgen/+internal/MissingCode.m new file mode 100644 index 0000000..06f9524 --- /dev/null +++ b/+scriptgen/+internal/MissingCode.m @@ -0,0 +1,10 @@ +classdef MissingCode < scriptgen.Code + % Copyright 2020 The MathWorks, Inc. + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(~, ~) + error('Called write on MissingCode'); + end + end +end + diff --git a/+scriptgen/+internal/MissingCodeBuilder.m b/+scriptgen/+internal/MissingCodeBuilder.m new file mode 100644 index 0000000..70c8d0e --- /dev/null +++ b/+scriptgen/+internal/MissingCodeBuilder.m @@ -0,0 +1,10 @@ +classdef MissingCodeBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + methods + function code = build(~) %#ok + error('Called build on MissingCodeBuilder'); + end + end +end + diff --git a/+scriptgen/+internal/PrunedStackException.m b/+scriptgen/+internal/PrunedStackException.m new file mode 100644 index 0000000..71e7853 --- /dev/null +++ b/+scriptgen/+internal/PrunedStackException.m @@ -0,0 +1,49 @@ +classdef PrunedStackException < MException + % Copyright 2020 MathWorks, Inc. + + properties(SetAccess=immutable, GetAccess=protected) + PrunedStack + end + + methods + function pruned = PrunedStackException(other, frameToPrune) + if nargin < 2 + % If no frame is specified, prune the frame of the caller + s = dbstack('-completenames'); + if numel(s) > 1 + frameToPrune = rmfield(s(2), 'line'); + else + frameToPrune = struct('file', {}); + end + end + + pruned = pruned@MException(other.identifier, '%s', other.message); + if isprop(pruned, 'type') && isprop(other, 'type') + pruned.type = other.type; + end + for idx = 1:numel(other.cause) + pruned = pruned.addCause(scriptgen.internal.PrunedStackException(other.cause{idx}, frameToPrune)); + end + + stack = other.getStack(); + remove = ismember({stack.file}, {frameToPrune.file}); + if isfield(frameToPrune, 'name') + remove = ismember({stack.name}, {frameToPrune.name}) & remove; + end + if isfield(frameToPrune, 'line') + remove = ismember([stack.line], [frameToPrune.line]) & remove; + end + stack(remove) = []; + + pruned.PrunedStack = stack; + end + end + + methods(Access=protected) + function stack = getStack(pruned) + stack = pruned.PrunedStack; + end + end +end + + diff --git a/+scriptgen/+internal/Version.m b/+scriptgen/+internal/Version.m new file mode 100644 index 0000000..8572e51 --- /dev/null +++ b/+scriptgen/+internal/Version.m @@ -0,0 +1,118 @@ +classdef Version + % Version - A MATLAB-style version + % + % Valid versions take the form XXX.XXX.XXX.XXXXXXXXX, where X may be + % a digit only. + % + % Examples of valid versions: + % + % 9 + % 9.7 + % 9.7.0.1261785 + % + % Examples of invalid versions: + % + % 9.1-beta + % R2019a + + % Copyright 2020-2022 The MathWorks, Inc. + + properties (SetAccess = immutable) + Parts + end + + methods + function obj = Version(verstr) + p = sscanf(verstr, '%3d.%3d.%3d.%9d'); + s = strjoin(strtrim(cellstr(num2str(p)))', '.'); + if ~strcmp(s, verstr) + error('scriptgen:Version:invalidFormat', 'invalid verstr format'); + end + p(end+1:4) = 0; + obj.Parts = p(:)'; + end + + function t = eq(a, b) + t = diff(a, b) == 0; + end + + function t = ne(a, b) + t = diff(a, b) ~= 0; + end + + function t = lt(a, b) + t = diff(a, b) < 0; + end + + function t = le(a, b) + t = diff(a, b) <= 0; + end + + function t = gt(a, b) + t = diff(a, b) > 0; + end + + function t = ge(a, b) + t = diff(a, b) >= 0; + end + end + + methods (Access = private) + function d = diff(a, b) + if ~isa(a, 'scriptgen.internal.Version') || ~isa(b, 'scriptgen.internal.Version') + error('incompatible types'); + end + d = a.num - b.num; + end + + function n = num(obj) + n = arrayfun(@(v)str2double(sprintf('%03d%03d%03d%09d', v.Parts)), obj); + end + end + + properties (Access = private, Constant) + ReleaseVersions = map( ... + 'R2022b', '9.13', ... + 'R2022a', '9.12', ... + 'R2021b', '9.11', ... + 'R2021a', '9.10', ... + 'R2020b', '9.9', ... + 'R2020a', '9.8', ... + 'R2019b', '9.7', ... + 'R2019a', '9.6', ... + 'R2018b', '9.5', ... + 'R2018a', '9.4', ... + 'R2017b', '9.3', ... + 'R2017a', '9.2', ... + 'R2016b', '9.1', ... + 'R2016a', '9.0', ... + 'R2015b', '8.6', ... + 'R2015a', '8.5', ... + 'R2014b', '8.4', ... + 'R2014a', '8.3', ... + 'R2013b', '8.2', ... + 'R2013a', '8.1'); + end + + methods (Static) + function v = forRelease(release) + r = scriptgen.internal.Version.ReleaseVersions; + if ~r.isKey(release) + error('scriptgen:Version:unknownRelease', 'unknown release'); + end + v = scriptgen.internal.Version(r(release)); + end + + function v = forCurrentRelease() + s = strsplit(version()); + v = scriptgen.internal.Version(s{1}); + end + end +end + +function m = map(varargin) +m = containers.Map(); +for i = 1:2:numel(varargin) + m(varargin{i}) = varargin{i+1}; +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/isAbsolutePath.m b/+scriptgen/+internal/isAbsolutePath.m new file mode 100644 index 0000000..d25ab5f --- /dev/null +++ b/+scriptgen/+internal/isAbsolutePath.m @@ -0,0 +1,8 @@ +function tf = isAbsolutePath(p) +if ispc() + tf = ~isempty(regexp(p, '^.:', 'once')) || strncmp(p, '\\', 2); +else + tf = any(strncmp(p, {'/', '~'}, 1)); +end +end + diff --git a/+scriptgen/+internal/numericVerbosity.m b/+scriptgen/+internal/numericVerbosity.m new file mode 100644 index 0000000..ee7759d --- /dev/null +++ b/+scriptgen/+internal/numericVerbosity.m @@ -0,0 +1,20 @@ +function n = numericVerbosity(verbosity) +% Copyright 2022 The MathWorks, Inc. +if isnumeric(verbosity) + n = verbosity; +elseif strcmpi(verbosity, 'none') + n = 0; +elseif strcmpi(verbosity, 'terse') + n = 1; +elseif strcmpi(verbosity, 'concise') + n = 2; +elseif strcmpi(verbosity, 'detailed') + n = 3; +elseif strcmpi(verbosity, 'verbose') + n = 4; +else + warning('scriptgen:numericVerbosity:unknownVerbosity', ... + 'Unknown verbosity level. Defaulting to maximum verbosity.'); + n = 4; +end +end \ No newline at end of file diff --git a/+scriptgen/+internal/unquoteText.m b/+scriptgen/+internal/unquoteText.m new file mode 100644 index 0000000..18caebe --- /dev/null +++ b/+scriptgen/+internal/unquoteText.m @@ -0,0 +1,11 @@ +function u = unquoteText(text) +% Copyright 2020 The MathWorks, Inc. +s = regexp(text, '^''', 'once'); +e = regexp(text, '''$', 'once'); +if isempty(s) || isempty(e) + u = text; +else + u = text(s+1:e-1); +end +end + diff --git a/+scriptgen/+internal/validateText.m b/+scriptgen/+internal/validateText.m new file mode 100644 index 0000000..c7d578e --- /dev/null +++ b/+scriptgen/+internal/validateText.m @@ -0,0 +1,9 @@ +function validateText(value) +% Copyright 2020 The MathWorks, Inc. +if ischar(value) + scriptgen.internal.validateTextScalar(value); +else + scriptgen.internal.validateTextArray(value); +end +end + diff --git a/+scriptgen/+internal/validateTextArray.m b/+scriptgen/+internal/validateTextArray.m new file mode 100644 index 0000000..aff6396 --- /dev/null +++ b/+scriptgen/+internal/validateTextArray.m @@ -0,0 +1,7 @@ +function validateTextArray(value) +% Copyright 2020 The MathWorks, Inc. +if ~iscellstr(value) || ~(isempty(value) || isvector(value)) %#ok + error('MATLAB:invalidType', 'Expected input to be cellstr vector'); +end +end + diff --git a/+scriptgen/+internal/validateTextScalar.m b/+scriptgen/+internal/validateTextScalar.m new file mode 100644 index 0000000..7aca2ad --- /dev/null +++ b/+scriptgen/+internal/validateTextScalar.m @@ -0,0 +1,7 @@ +function validateTextScalar(value) +% Copyright 2020 The MathWorks, Inc. +if isempty(value) && ischar(value) + return; +end +validateattributes(value, {'char'}, {'vector'}); +end diff --git a/+scriptgen/+internal/validateVerbosityScalar.m b/+scriptgen/+internal/validateVerbosityScalar.m new file mode 100644 index 0000000..6f555b3 --- /dev/null +++ b/+scriptgen/+internal/validateVerbosityScalar.m @@ -0,0 +1,9 @@ +function validateVerbosityScalar(value) +% Copyright 2022 The MathWorks, Inc. +if ischar(value) + scriptgen.internal.validateTextScalar(value); +else + validateattributes(value, {'numeric'}, {'scalar'}); +end +end + diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m new file mode 100644 index 0000000..10992f3 --- /dev/null +++ b/+scriptgen/+scripts/TestScriptBuilder.m @@ -0,0 +1,122 @@ +classdef TestScriptBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + WorkingFolder = '' + PDFTestReport = '' + HTMLTestReport = '' + TAPTestResults = '' + JUnitTestResults = '' + SimulinkTestResults = '' + CoberturaCodeCoverage = '' + HTMLCodeCoverage = '' + CoberturaModelCoverage = '' + HTMLModelCoverage = '' + SourceFolder = '' + SelectByFolder = '' + SelectByTag = '' + LoggingLevel = '' + OutputDetail = '' + Strict = false + UseParallel = false + SelectByName = {} + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.WorkingFolder(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.WorkingFolder = value; + end + + function set.PDFTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.PDFTestReport = value; + end + + function set.HTMLTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLTestReport = value; + end + + function set.TAPTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.TAPTestResults = value; + end + + function set.JUnitTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.JUnitTestResults = value; + end + + function set.SimulinkTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SimulinkTestResults = value; + end + + function set.CoberturaCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaCodeCoverage = value; + end + + function set.HTMLCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLCodeCoverage = value; + end + + function set.CoberturaModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaModelCoverage = value; + end + + function set.HTMLModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLModelCoverage = value; + end + + function set.SourceFolder(obj, value) + scriptgen.internal.validateText(value); + obj.SourceFolder = value; + end + + function set.SelectByFolder(obj, value) + scriptgen.internal.validateText(value); + obj.SelectByFolder = value; + end + + function set.SelectByTag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SelectByTag = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + + function set.Strict(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.Strict = value; + end + + function set.UseParallel(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.UseParallel = value; + end + function set.SelectByName(obj, value) + scriptgen.internal.validateText(value); + obj.SelectByName = value; + end + end +end + diff --git a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m new file mode 100644 index 0000000..760eadb --- /dev/null +++ b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m @@ -0,0 +1,20 @@ +classdef AssertNoFailuresSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + ResultsName = 'results' + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.ResultsName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.ResultsName = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m new file mode 100644 index 0000000..b714b97 --- /dev/null +++ b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m @@ -0,0 +1,104 @@ +classdef CreateTestRunnerSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + RunnerName = 'runner' + PDFTestReport = '' + HTMLTestReport = '' + TAPTestResults = '' + JUnitTestResults = '' + SimulinkTestResults = '' + CoberturaCodeCoverage = '' + HTMLCodeCoverage = '' + CoberturaModelCoverage = '' + HTMLModelCoverage = '' + SourceFolder = {} + LoggingLevel = '' + OutputDetail = '' + Strict = false + UseParallel = false + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.RunnerName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.RunnerName = value; + end + + function set.PDFTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.PDFTestReport = value; + end + + function set.HTMLTestReport(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLTestReport = value; + end + + function set.TAPTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.TAPTestResults = value; + end + + function set.JUnitTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.JUnitTestResults = value; + end + + function set.SimulinkTestResults(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SimulinkTestResults = value; + end + + function set.CoberturaCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaCodeCoverage = value; + end + + function set.HTMLCodeCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLCodeCoverage = value; + end + + function set.CoberturaModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.CoberturaModelCoverage = value; + end + + function set.HTMLModelCoverage(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.HTMLModelCoverage = value; + end + + function set.SourceFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.SourceFolder = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + + function set.Strict(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.Strict = value; + end + + function set.UseParallel(obj, value) + validateattributes(value, {'logical','numeric'}, {'scalar'}); + obj.UseParallel = value; + end + end +end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m new file mode 100644 index 0000000..5cecd32 --- /dev/null +++ b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m @@ -0,0 +1,39 @@ +classdef CreateTestSuiteSequenceBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + CodeProvider = scriptgen.CodeProvider.default() + SuiteName = 'suite' + SelectByFolder = {} + SelectByTag = '' + SelectByName = {} + end + + methods + function set.CodeProvider(obj, value) + validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); + obj.CodeProvider = value; + end + + function set.SuiteName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SuiteName = value; + end + + function set.SelectByFolder(obj, value) + scriptgen.internal.validateTextArray(value); + obj.SelectByFolder = value; + end + + function set.SelectByTag(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SelectByTag = value; + end + + function set.SelectByName(obj, value) + scriptgen.internal.validateTextArray(value); + obj.SelectByName = value; + end + end +end + diff --git a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m new file mode 100644 index 0000000..d641f2c --- /dev/null +++ b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m @@ -0,0 +1,27 @@ +classdef CreateTestRunnerStatementBuilder < scriptgen.CodeBuilder + % Copyright 2020-2022 The MathWorks, Inc. + + properties + RunnerName = 'runner' + LoggingLevel = 'terse' + OutputDetail = 'concise' + end + + methods + function set.RunnerName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.RunnerName = value; + end + + function set.LoggingLevel(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.LoggingLevel = value; + end + + function set.OutputDetail(obj, value) + scriptgen.internal.validateVerbosityScalar(value); + obj.OutputDetail = value; + end + end +end + diff --git a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m new file mode 100644 index 0000000..041aff8 --- /dev/null +++ b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m @@ -0,0 +1,15 @@ +classdef CreateTestSuiteStatementBuilder < scriptgen.CodeBuilder + % Copyright 2020 The MathWorks, Inc. + + properties + SuiteName = 'suite' + end + + methods + function set.SuiteName(obj, value) + scriptgen.internal.validateTextScalar(value); + obj.SuiteName = value; + end + end +end + diff --git a/+scriptgen/Code.m b/+scriptgen/Code.m new file mode 100644 index 0000000..e142341 --- /dev/null +++ b/+scriptgen/Code.m @@ -0,0 +1,38 @@ +classdef Code < matlab.mixin.Heterogeneous + % Code - Base class for all classes writable by CodeWriter + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Contents + end + + methods + function contents = get.Contents(obj) + import scriptgen.TextOutput; + stream = TextOutput(); + obj.writeToStream(stream); + contents = stream.Text; + end + end + + methods (Abstract, Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + write(obj, writer) + end + + methods (Access = protected) + function writeToStream(obj, stream) + import scriptgen.CodeWriter; + writer = CodeWriter(stream); + close = onCleanup(@()writer.close()); + obj.write(writer); + end + end + + methods (Static, Sealed, Access = protected) + function builder = getDefaultScalarElement() + builder = scriptgen.internal.MissingCode(); + end + end +end + diff --git a/+scriptgen/CodeBuilder.m b/+scriptgen/CodeBuilder.m new file mode 100644 index 0000000..893213c --- /dev/null +++ b/+scriptgen/CodeBuilder.m @@ -0,0 +1,18 @@ +classdef CodeBuilder < matlab.mixin.Heterogeneous & scriptgen.internal.mixin.SetGet ... + & scriptgen.internal.mixin.EnvironmentDependent ... + & scriptgen.internal.mixin.Preferable + % CodeBuilder - Base class for builders of immutable code objects + + % Copyright 2020 The MathWorks, Inc. + + methods (Abstract) + code = build(obj) + end + + methods (Static, Sealed, Access = protected) + function builder = getDefaultScalarElement() + builder = scriptgen.internal.MissingCodeBuilder(); + end + end +end + diff --git a/+scriptgen/CodeProvider.m b/+scriptgen/CodeProvider.m new file mode 100644 index 0000000..fd64af5 --- /dev/null +++ b/+scriptgen/CodeProvider.m @@ -0,0 +1,128 @@ +classdef CodeProvider < handle + % CodeProvider - Provider of immutable code objects + % + % The scriptgen.CodeProvider class serves as the primary interface + % for creating pre-made code objects. To create code objects the + % CodeProvider utilizes builders under the following packages: + % + % scriptgen.expressions - Expression builders + % scriptgen.scripts - Script builders + % scriptgen.sequences - Sequence builders + % scriptgen.statements - Statement builders + % + % To locate a builder, the CodeProvider relies on the builder's class + % name. For example, when called to create a Script of type 'Test', + % the CodeProvider will look for a Script builder under + % scriptgen.scripts with the class name 'TestScriptBuilder'. It will + % then utilize an internal implementation of that builder to create + % the requested Script object. + % + % Builders may also exist under subpackages. To access builders under + % subpackages, a new CodeProvider must be instantiated with the + % subpackage name. The withSubpackage method is a convenience for + % instantiating new providers off an existing provider. + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = private) + Subpackage + end + + properties (Access = private) + ExpressionBuilderFactory + StatementBuilderFactory + SequenceBuilderFactory + ScriptBuilderFactory + end + + methods + function obj = CodeProvider(subpackage) + import scriptgen.internal.validateTextScalar; + + if nargin < 1 + subpackage = ''; + end + validateTextScalar(subpackage); + + obj.ExpressionBuilderFactory = obj.createFactory('expressions', subpackage); + obj.StatementBuilderFactory = obj.createFactory('statements', subpackage); + obj.SequenceBuilderFactory = obj.createFactory('sequences', subpackage); + obj.ScriptBuilderFactory = obj.createFactory('scripts', subpackage); + + obj.Subpackage = subpackage; + end + + function expression = createExpression(obj, type, varargin) + type = appendSuffix(type, 'ExpressionBuilder'); + expression = obj.createCode(obj.ExpressionBuilderFactory, type, varargin{:}); + end + + function statement = createStatement(obj, type, varargin) + type = appendSuffix(type, 'StatementBuilder'); + statement = obj.createCode(obj.StatementBuilderFactory, type, varargin{:}); + end + + function sequence = createSequence(obj, type, varargin) + type = appendSuffix(type, 'SequenceBuilder'); + sequence = obj.createCode(obj.SequenceBuilderFactory, type, varargin{:}); + end + + function script = createScript(obj, type, varargin) + type = appendSuffix(type, 'ScriptBuilder'); + script = obj.createCode(obj.ScriptBuilderFactory, type, varargin{:}); + end + + function provider = withSubpackage(obj, subpackage) + import scriptgen.CodeProvider; + + sub = pkgjoin({obj.Subpackage, subpackage}); + provider = CodeProvider(sub); + end + end + + methods (Access = private) + function factory = createFactory(~, type, subpackage) + import scriptgen.internal.CodeBuilderLocator; + import scriptgen.internal.CodeBuilderFactory; + + implPackage = pkgjoin({'scriptgen.internal', type, subpackage}); + intfPackage = pkgjoin({'scriptgen', type, subpackage}); + + locator = CodeBuilderLocator(implPackage, intfPackage); + factory = CodeBuilderFactory(locator); + end + + function code = createCode(~, factory, type, varargin) + builder = factory.create(type); + if isempty(builder) + code = scriptgen.internal.MissingCode.empty(); + return; + end + if ~isempty(varargin) + set(builder, varargin{:}); + end + code = builder.build(); + end + end + + methods (Static) + function provider = default() + persistent singleton; + if isempty(singleton) + singleton = scriptgen.CodeProvider(); + end + provider = singleton; + end + end +end + +function name = appendSuffix(name, suffix) +if isempty(regexp(name, ['\w*' suffix '$'], 'once')) + name = [name suffix]; +end +end + +function p = pkgjoin(names) +tf = cellfun(@(n)~isempty(n), names); +p = strjoin(names(tf), '.'); +end \ No newline at end of file diff --git a/+scriptgen/CodeWriter.m b/+scriptgen/CodeWriter.m new file mode 100644 index 0000000..76862c8 --- /dev/null +++ b/+scriptgen/CodeWriter.m @@ -0,0 +1,64 @@ +classdef CodeWriter < handle + % CodeWriter - Writes code objects in to code + + % Copyright 2020 The MathWorks, Inc. + + properties (Access = private) + OutputStream + WhitespaceBuffer + end + + methods + function obj = CodeWriter(stream) + validateattributes(stream, {'scriptgen.OutputStream'}, {'scalar'}); + obj.OutputStream = stream; + end + + function writeExpression(obj, expression) + obj.flushWhitespaceBuffer(); + expression.write(obj); + end + + function writeStatement(obj, statement) + obj.flushWhitespaceBuffer(); + statement.write(obj); + obj.bufferNewLine(); + end + + function writeSequence(obj, sequence) + obj.flushWhitespaceBuffer(); + sequence.write(obj); + obj.bufferNewLine(); + end + + function writeScript(obj, script) + obj.flushWhitespaceBuffer(); + script.write(obj); + end + + function close(obj) + obj.OutputStream.close(); + end + end + + methods (Access = {?scriptgen.Code}) + function write(obj, format, varargin) + text = sprintf(format, varargin{:}); + obj.OutputStream.write(text); + end + end + + methods (Access = private) + function bufferNewLine(obj) + obj.WhitespaceBuffer = strcat(obj.WhitespaceBuffer, '\n'); + end + + function flushWhitespaceBuffer(obj) + if ~isempty(obj.WhitespaceBuffer) + obj.write(obj.WhitespaceBuffer); + obj.WhitespaceBuffer = []; + end + end + end +end + diff --git a/+scriptgen/Expression.m b/+scriptgen/Expression.m new file mode 100644 index 0000000..b8719db --- /dev/null +++ b/+scriptgen/Expression.m @@ -0,0 +1,42 @@ +classdef Expression < scriptgen.Code + % Expression - A unit of code that returns a value + % + % Expressions are typically located in statements on the right- or + % left-hand side of an equals sign. + % + % Example expressions: + % + % 1 + 2 + % zeros(5,1) + % A(1:3,2) + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Text + RequiredImports + end + + methods + function obj = Expression(text, imports) + if nargin < 2 + imports = {}; + end + if ischar(imports) + imports = {imports}; + end + scriptgen.internal.validateTextScalar(text); + scriptgen.internal.validateTextArray(imports); + + obj.Text = text; + obj.RequiredImports = imports; + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + writer.write('%s', obj.Text); + end + end +end + diff --git a/+scriptgen/FileOutput.m b/+scriptgen/FileOutput.m new file mode 100644 index 0000000..84110e5 --- /dev/null +++ b/+scriptgen/FileOutput.m @@ -0,0 +1,22 @@ +classdef FileOutput < scriptgen.OutputStream + % Copyright 2020 The MathWorks, Inc. + + properties (GetAccess = private, SetAccess = immutable) + Fid + end + + methods + function obj = FileOutput(filename) + obj.Fid = fopen(filename, 'w'); + end + + function write(obj, text) + fprintf(obj.Fid, '%s', text); + end + + function close(obj) + fclose(obj.Fid); + end + end +end + diff --git a/+scriptgen/OutputStream.m b/+scriptgen/OutputStream.m new file mode 100644 index 0000000..1e2ced0 --- /dev/null +++ b/+scriptgen/OutputStream.m @@ -0,0 +1,14 @@ +classdef OutputStream < handle + % Copyright 2020 The MathWorks, Inc. + + methods + function close(~) + % Available for subclasses to override + end + end + + methods (Abstract) + write(obj, text); + end +end + diff --git a/+scriptgen/Script.m b/+scriptgen/Script.m new file mode 100644 index 0000000..9311181 --- /dev/null +++ b/+scriptgen/Script.m @@ -0,0 +1,83 @@ +classdef Script < scriptgen.Code + % Script - A collection of statements organized in to sequences + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Sequences + end + + methods + function obj = Script(sequences) + import scriptgen.Sequence; + + if iscellstr(sequences) || (ischar(sequences) && isvector(sequences)) %#ok + sequences = Sequence(sequences); + end + + validateattributes(sequences, {'scriptgen.Sequence'}, {'vector'}); + + obj.Sequences = sequences; + end + + function file = writeToFile(obj, file) + import scriptgen.FileOutput; + [~,~] = mkdir(fileparts(file)); + stream = FileOutput(file); + obj.writeToStream(stream); + end + + function text = writeToText(obj) + % DEPRECATED - Use the Contents property + text = obj.Contents; + end + + function run(obj) + % RUN - Run script + % + % RUN(SCRIPT) runs the code contents of the SCRIPT in the callers + % workspace as if it were executed from a script file on disk. + % + % This method is roughly equivalent to writing the contents of the + % SCRIPT to a file in the current working directory and executing + % the file by typing its name. + + tempFolder = tempname(); + [~, name] = fileparts(tempFolder); + scriptName = ['tempscript_' name(end-3:end)]; + scriptPath = fullfile(tempFolder, [scriptName '.m']); + + obj.writeToFile(scriptPath); + oldPath = addpath(tempFolder); + + restoreState = onCleanup(@()cleanup(oldPath, tempFolder)); + function cleanup(p, f) + path(p); + rmdir(f, 's'); + end + + try + evalin('caller', strcat(scriptName, ';')); + catch e + throw(scriptgen.internal.PrunedStackException(e)); + end + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + import scriptgen.Sequence; + import scriptgen.Statement; + + imports = sort(unique([obj.Sequences.RequiredImports])); + if ~isempty(imports) + importText = cellfun(@(i)sprintf('import %s;', i), imports, 'UniformOutput', false); + writer.writeSequence(Sequence(importText)); + end + + for sequence = obj.Sequences + writer.writeSequence(sequence); + end + end + end +end \ No newline at end of file diff --git a/+scriptgen/Sequence.m b/+scriptgen/Sequence.m new file mode 100644 index 0000000..8be416e --- /dev/null +++ b/+scriptgen/Sequence.m @@ -0,0 +1,43 @@ +classdef Sequence < scriptgen.Code + % Sequence - A collection of statements that achieve a task + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Statements + RequiredImports + end + + methods + function obj = Sequence(statements) + import scriptgen.Statement; + + if iscellstr(statements) || (ischar(statements) && isvector(statements)) %#ok + statements = Statement(statements); + end + validateattributes(statements, {'scriptgen.Statement'}, {'vector'}); + + obj.Statements = statements; + + % unique may return 0x1 cell array, valueOrElse ensures it is + % converted to a 0x0 cell array. + obj.RequiredImports = valueOrElse(unique([statements.RequiredImports]), {}); + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + for s = obj.Statements + writer.writeStatement(s); + end + end + end +end + +function v = valueOrElse(value, default) +if ~isempty(value) + v = value; +else + v = default; +end +end \ No newline at end of file diff --git a/+scriptgen/Statement.m b/+scriptgen/Statement.m new file mode 100644 index 0000000..99d3a42 --- /dev/null +++ b/+scriptgen/Statement.m @@ -0,0 +1,55 @@ +classdef Statement < scriptgen.Code + % Statement - A unit of code that executes an action + % + % Statements are typically terminated with a semicolon. + % + % Example statements: + % + % a = 1 + 2; + % disp('hello world'); + % z = zeros(5,1); + + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = immutable) + Text + RequiredImports + end + + methods + function obj = Statement(text, imports) + import scriptgen.internal.validateTextArray; + import scriptgen.internal.validateTextArray; + + if nargin < 2 + imports = {}; + end + if ischar(text) + text = {text}; + end + if ischar(imports) + imports = {imports}; + end + validateTextArray(text); + validateTextArray(imports); + + % Support array construction. + m = size(text, 1); + n = size(text, 2); + obj(1:m,1:n) = obj; + for i = 1:m + for j = 1:n + obj(i,j).Text = text{i,j}; + obj(i,j).RequiredImports = imports; + end + end + end + end + + methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) + function write(obj, writer) + writer.write('%s', obj.Text); + end + end +end + diff --git a/+scriptgen/TextOutput.m b/+scriptgen/TextOutput.m new file mode 100644 index 0000000..50e3dee --- /dev/null +++ b/+scriptgen/TextOutput.m @@ -0,0 +1,14 @@ +classdef TextOutput < scriptgen.OutputStream + % Copyright 2020 The MathWorks, Inc. + + properties (SetAccess = private) + Text + end + + methods + function write(obj, text) + obj.Text = [obj.Text sprintf('%s', text)]; + end + end +end + diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 28d089b..2db7c5b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -11,8 +11,9 @@ filters: &filters integration-tests: &integration-tests [ orb-tools/pack, - integration-test-install, - integration-test-install-release, + #integration-test-install, + # integration-test-install-release, + #integration-test-install-release-macos-intel-on-arm, integration-test-run-command, integration-test-run-tests ] @@ -22,6 +23,10 @@ executors: machine: image: ubuntu-2204:2024.01.1 macos: + macos: + xcode: 15.1.0 + resource_class: macos.x86.medium.gen2 + macos-arm: macos: xcode: 15.3.0 resource_class: macos.m1.medium.gen1 @@ -124,209 +129,27 @@ jobs: executor: type: executor executor: <> + parallelism: 2 steps: + - checkout # Setup for Integ tests for matlab/run-tests - matlab/install: products: Simulink Simulink_Test Simulink_Coverage Parallel_Computing_Toolbox no-output-timeout: 30m - - run: - command: | - echo 'myvar = 123' > startup.m - mkdir src - echo 'function c=add(a,b);c=a+b;' > src/add.m - mkdir tests - echo "%% StartupTest" > tests/mytest.m - echo "evalin('base','assert(myvar==123)')" >> tests/mytest.m - echo "%% FirstTest" >> tests/mytest.m - echo "assert(add(1,2)==3)" >> tests/mytest.m - mkdir tests/filteredTest - echo "%% simpleTest" >> tests/filteredTest/filtertest.m - echo "assert(2==2)" >> tests/filteredTest/filtertest.m - printf "%% FilterByTag\n" >> tests/filteredTest/TaggedTest.m - printf "classdef (TestTags = {'FILTERED'}) TaggedTest < matlab.unittest.TestCase\n" >> tests/filteredTest/TaggedTest.m - printf "methods (Test)\n function testTag (testCase)\n assert(2==2);\n end\n end\n end" >> tests/filteredTest/TaggedTest.m - shell: bash - - # Integ tests for matlab/run-tests - - matlab/run-tests: - source-folder: src - startup-options: -logfile console.log - - matlab/run-tests: - test-results-junit: test-results/matlab/results.xml - code-coverage-cobertura: code-coverage/coverage.xml - source-folder: src - - matlab/run-tests: - test-results-html: test-results/matlab/html - code-coverage-html: code-coverage/html - source-folder: src - - matlab/run-tests: - test-results-junit: test-results/matlab/filterdtestresult.xml - select-by-folder: tests/filteredTest - - matlab/run-tests: - test-results-junit: test-results/matlab/filterdtagresult.xml - select-by-tag: FILTERED - - - run: - name: Verify tests ran with startup options - command: | - set -e - grep mytest console.log - grep TaggedTest console.log - grep filtertest console.log - rm console.log - shell: bash - - run: - name: Verify test results file was created - command: | - set -e - grep -q FirstTest test-results/matlab/results.xml - shell: bash - - run: - name: Verify HTML test results report was created - command: | - set -e - grep -q FirstTest test-results/matlab/html/index.html - shell: bash - - run: - name: Verify code coverage file was created - command: | - set -e - grep -q add code-coverage/coverage.xml - shell: bash - - run: - name: Verify HTML code coverage report was created - command: | - set -e - grep -q CoverageSummary code-coverage/html/index.html - shell: bash - - run: - name: Verify filtered test results file was created - command: | - set -e - grep -q simpleTest test-results/matlab/filterdtestresult.xml - grep -v FirstTest test-results/matlab/filterdtestresult.xml - shell: bash - - run: - name: Verify filter by tag test results file was created - command: | - set -e - grep -q TaggedTest test-results/matlab/filterdtagresult.xml - grep -v FirstTest test-results/matlab/filterdtagresult.xml - grep -v simpleTest test-results/matlab/filterdtagresult.xml - shell: bash - - - run: - name: Set up diary for logging - command: | - echo 'diary console.log' >> startup.m - shell: bash - - matlab/run-tests: - strict: true - source-folder: src - - run: - name: Verify tests ran with strict checks - command: | - set -e - grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log - rm console.log - shell: bash - - matlab/run-tests: - use-parallel: true - source-folder: src - - run: - name: Verify tests ran in parallel - command: | - set -e - grep -q "parallel pool" console.log - rm console.log - shell: bash - - matlab/run-tests: - output-detail: Detailed - source-folder: src - - run: - name: Verify tests ran with detailed display level for event details - command: | - set -e - grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log - rm console.log - shell: bash + - matlab/run-tests: - logging-level: Detailed - source-folder: src - - run: - name: Verify tests ran with detailed verbosity level for logged diagnostics - command: | - set -e - grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log - rm console.log - shell: bash + select-by-folder: 'tests' + select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') + test-results-junit: results + + - store_test_results: + path: results - # Set up for model coverage artifact tests - - when: - condition: - equal: [*linux-executor, <>] - steps: - - run: - command: | - mkdir simtests - cat \<<'_EOF' >> "simtests/createModelAndTest.m" - model = 'simple_model'; - evalin('base','bdclose all'); - if exist('simple_model.slx', 'file') == 0 - new_system(model); - load_system(model); - add_block('built-in/Constant', [model, '/Constant']); - save_system(model); - close_system(model); - sltest.testmanager.clear; - sltest.testmanager.clearResults; - tf = sltest.testmanager.TestFile('test.mldatx'); - cs = tf.getCoverageSettings; - cs.RecordCoverage = true; - cs.MdlRefCoverage = true; - cs.MetricSettings = 'd'; - ts = tf.getTestSuites; - tc = ts.getTestCases; - tc.setProperty('model', model); - tf.saveToFile; - tf.close; - sltest.testmanager.close; - end - disp('Created Model and Simulink Test file to simulate the model.'); - _EOF - shell: bash - - matlab/run-command: - command: cd simtests;createModelAndTest; - - matlab/run-tests: - select-by-folder: simtests - model-coverage-cobertura: model-coverage/coverage.xml - model-coverage-html: model-coverage/html - test-results-pdf: test-results/matlab/pdfresults.pdf - test-results-simulink-test: test-results/matlab/simulinkTest.mldatx - - run: - name: Verify pdf test report file generation - command: | - set -e - test -f test-results/matlab/pdfresults.pdf - shell: bash - - run: - name: Verify Simulink Test result file generation - command: | - set -e - test -f test-results/matlab/simulinkTest.mldatx - shell: bash - - run: - name: Verify model coverage file was created - command: | - set -e - grep -q simple_model model-coverage/coverage.xml - shell: bash - - run: - name: Verify HTML model coverage report was created - command: | - set -e - grep -r "simple_model Coverage Report" --include="*.html" model-coverage/html - shell: bash + - store_artifacts: + path: results + destination: test-results/results + + integration-test-run-build: parameters: @@ -458,28 +281,33 @@ workflows: - integration-test-install: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] + + # - integration-test-install-release: + # matrix: + # parameters: + # executor: [linux] + # release: [R2023bU1] - integration-test-install-release: - matrix: - parameters: - executor: [linux, windows, macos] - release: [R2023bU1] + name: integration-test-install-release-macos-intel-on-arm + executor: macos-arm + release: R2023aU1 - integration-test-run-command: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - integration-test-run-tests: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - integration-test-run-build: matrix: parameters: - executor: [linux, windows, macos] + executor: [linux] - orb-tools/pack: filters: *filters diff --git a/genscript.m b/genscript.m new file mode 100644 index 0000000..e672aa9 --- /dev/null +++ b/genscript.m @@ -0,0 +1,26 @@ +function script = genscript(type, varargin) +% genscript - Generates a script +% +% The genscript function provides a convenient way to generate a pre-made +% script object. +% +% SCRIPT = genscript(TYPE) generates and returns a script of TYPE. TYPE +% must be a character vector and match the name of a script builder +% located in the scriptgen.scripts package. +% +% SCRIPT = genscript(TYPE, NAME, VALUE, ...) generates and returns a +% script of TYPE setting those name-value pairs on the script builder. +% +% Examples: +% +% testScript = genscript('Test', 'JUnitTestResults', 'results.xml'); +% writeToFile(testScript, 'myscript.m'); + +% Copyright 2020 The MathWorks, Inc. + +import scriptgen.CodeProvider; + +provider = CodeProvider.default(); +script = provider.createScript(type, varargin{:}); +end + diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index ce660ed..e8aac84 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -14,13 +14,6 @@ parameters: folders using a colon-separated or semicolon-separated list. type: string default: '' - select-by-files: - description: > - Location of the folder used to select test suite elements, relative to the project root folder. - To create a test suite, MATLAB uses only the tests in the specified folder and its subfolders. - You can specify multiple folders using a colon-separated or semicolon-separated list. - type: string - default: '' select-by-name: description: > Name or pattern used to select test suite elements. To create a test suite, MATLAB uses only the test elements @@ -53,11 +46,6 @@ parameters: parameter requires a Parallel Computing Toolbox license. type: boolean default: false - split-type: - description: > - Option to use CircleCI Test Split feature. - type: string - default: '' output-detail: description: > Amount of event detail displayed for the test run, specified as `none`, `terse`, `concise`, `detailed`, @@ -145,8 +133,6 @@ steps: PARAM_TEST_RESULTS_PDF: <> PARAM_STRICT: <> PARAM_USE_PARALLEL: <> - PARAM_SPLIT_TYPE: <> - PARAM_SELECT_BY_FILES: <> PARAM_SELECT_BY_NAME: <> PARAM_OUTPUT_DETAIL: <> PARAM_LOGGING_LEVEL: <> diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 0161fd9..84eb407 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -60,15 +60,15 @@ if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then binext=".exe" fi -if [[ -n "$PARAM_SELECT_BY_NAME" ]]; then - selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{for(i=1;i<=NF;i++) printf "\x27\x27%s\x27\x27%s", $i, (i==NF ? "" : ", ")}') - selectByName="{$selectByName}" -else - selectByName='' -fi +selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{ + for(i=1; i<=NF; i++) { + gsub(/\047/, "\047\047", $i); + printf "\047%s\047%s", $i, (i==NF ? "" : ", "); + } +}') +selectByName="{$selectByName}" "${tmpdir}/bin/run-matlab-command$binext" "\ - addpath('${gendir}/scriptgen');\ testScript = genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ @@ -83,7 +83,7 @@ fi 'PDFTestReport','${PARAM_TEST_RESULTS_PDF}',\ 'Strict',${PARAM_STRICT},\ 'UseParallel',${PARAM_USE_PARALLEL},\ - 'SelectByName', '$selectByName',\ + 'SelectByName', $selectByName,\ 'OutputDetail','${PARAM_OUTPUT_DETAIL}',\ 'LoggingLevel','${PARAM_LOGGING_LEVEL}');\ disp('Running MATLAB script with contents:');\ diff --git a/tests/baseline_API.mat b/tests/baseline_API.mat new file mode 100644 index 0000000000000000000000000000000000000000..df831f7fcd53f9e22e5ea8b4de8343be037579d7 GIT binary patch literal 220520 zcmeI5e~?_)Rp)POtauX3q3wi3Nl55K`7tDp-L_?0c7C|W(%7TevO5~tRsxB-HPfRR zJerwI_he;uVLMB)D<}#Ec57GsC`y0o4+@3?3bRXrsQrQXtzy|KK|!sz_6GtAGEfw# z*sW;qdFOoly}sS=ji#sP_xGtZx9`2@-S^(-o_p?j_ulv3iQ!W(3_nwN;=xA?Cx%ab za&mg6_CTRLQ*BJnEu4Rft8~j}#v{To^s}>|=%c_*CtDweawR#bV*XLbuIf+jsl~elpw|0^jfJ?B2J% z_ifS92M66oPL7N? zFNyLI+HUU6{rU^#Af4gfATT;IT$U?6ZI^q*!fU2y7IlZ})9309Z>-KAijpR(jjH@O zR9`$>f4$zQS^A-c+GO2}KyM3?bmyNm{TSrmkT64Y^R?3s&Cg zFSnQ1wD{$Uro&zrzNGQqu43!=%DK0wtuP=t>(O#KO#ml^1HPY=-+BLEnUXmg?l0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6KaAtP z;_{Pvp3>LI)_H%ank~=wO?X?{@c(7&pB*hl<@Gv`4LcYW;{WJd-4@uKk=xJIg{kr7cS9sd$w&V`q;||}p zYRl4FJ%hoLguUpk_(V9bJ6Xrwt=|QQ@V*^f@ZOHlKf-b49ApdQ$$HW@UWnv6d1$(D z^jq{b1u0AZOB+JD>*W)FpRnjlm2%gnC$Z-o?cVx>`+_TnwZgBNeU0^TWBnCVCNz7Nw)e013+HE`!FL_MRt@3i#SES$0MyoIwC&RIBb z;a4ogbrmcg1{k*+vW(@|!yc`D4{cT6zxX4SL;2zTGW?0;JLKC-(pbq7o7S#SUf9mM z?Yo`Q&_0Ij0yg4%2Vj%D?)BQsI~m97rti?pevMb|6>ez9F?yDW-8y)Np8KgR~b{odD!QdeW`2XhyEh|f>rXY;@{{G zMlGrM8IXu&lE2CpL7$w=Oa4A>5%k%~yyWkSMUs7bGJmK1Mt`uHUk$pbU&QBQDOvqWw{eB}`F5aa&s#Unk}t^_^$8x)a z^-CMetv}C)I%{{Z!=3jF+CsPM`(MLxW3&;QPm(FkXtVD>)RFM)^h{0Wo)AA-Yb-9z z4%g+qG<81*g>f+WzZEN|-vP#Nua2tyd-HP|#{J#Kj^Co2Jm8wqrLA?oS!{`H2t`{k zemm}e%RMvV6G2=UC)eZ3nB!{xYf5Bd%Ij~?0{+TcIpzP(`AUV2&e0w}`vk9lUa zXZR!A1~Y=?W*!@w%i5V5%'}) + function test6(~) + end + end + + methods (Test, TestTags = {'>'}) + function test7(~) + end + end + + methods (Test, TestTags = {''}) + function test8(~) + end + end + + methods (Test, TestTags = {'.*'}) + function test9(~) + end + end + + methods (Test, TestTags = {'*'}) + function test10(~) + end + end + + methods (Test, TestTags = {''}) + function test12(~) + end + end +end \ No newline at end of file diff --git a/tests/folderA/Copy_2_of_testModelSim.m b/tests/folderA/Copy_2_of_testModelSim.m new file mode 100644 index 0000000..b47ceda --- /dev/null +++ b/tests/folderA/Copy_2_of_testModelSim.m @@ -0,0 +1,59 @@ +classdef Copy_2_of_testModelSim < matlab.unittest.TestCase + %TESTMODELSIM Summary of this class goes here + % Detailed explanation goes here + properties + temp; + ogDir; + end + methods(TestClassSetup) + function testClassSetup(testCase) + sltest.testmanager.clear; + sltest.testmanager.clearResults; + testCase.ogDir = pwd; + testCase.temp = fullfile(pwd, 'temp'); + mkdir(testCase.temp); + matlab.unittest.fixtures.PathFixture(testCase.temp); + cd(testCase.temp); + end + end + + methods(TestClassTeardown) + function teardown(testCase) + sltest.testmanager.clear; + sltest.testmanager.clearResults; + sltest.testmanager.close; + A = dir(testCase.temp); + for k = 3:length(A) + delete([testCase.temp filesep A(k).name]) + end + cd(testCase.ogDir); + rmdir(testCase.temp); + end + end + + methods(Test) + function testSquare(testCase) + %TESTCALC Construct an instance of this class + % Detailed explanation goes here + + % Introduce a random delay between 1 and 5 seconds + pause(3); + + % Change directory to the root where the model is located + rootDir = fileparts(testCase.ogDir); % Assuming the root is one level up from the test directory + cd(rootDir); + + tf = sltest.testmanager.TestFile('test.mldatx'); + ts = tf.getTestSuites; + tc = ts.getTestCases; + tc.setProperty('model', 'sampleModel.slx'); + captureBaselineCriteria(tc,'baseline_API.mat',true); + res = tc.run(); + + % Change back to the original directory + cd(testCase.ogDir); + + testCase.verifyEqual(res.Outcome, sltest.testmanager.TestResultOutcomes.Passed); + end + end +end \ No newline at end of file diff --git a/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m b/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m new file mode 100644 index 0000000..f1b2259 --- /dev/null +++ b/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m @@ -0,0 +1,17 @@ +classdef HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags < matlab.unittest.TestCase + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'a', 'b'}) + function test1(~) + end + end + + methods (Test) + function testNoTags1(~) + end + function testNoTags2(~) + end + end + +end \ No newline at end of file diff --git a/tests/folderA/HasSealedTestTags.m b/tests/folderA/HasSealedTestTags.m new file mode 100644 index 0000000..390087a --- /dev/null +++ b/tests/folderA/HasSealedTestTags.m @@ -0,0 +1,10 @@ +classdef HasSealedTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Sealed, Test, TestTags = {'Sealed'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/folderA/HasUnsealedTestTags.m b/tests/folderA/HasUnsealedTestTags.m new file mode 100644 index 0000000..c89b46a --- /dev/null +++ b/tests/folderA/HasUnsealedTestTags.m @@ -0,0 +1,10 @@ +classdef HasUnsealedTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'Unsealed'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/folderA/SimpleTestCase.m b/tests/folderA/SimpleTestCase.m new file mode 100644 index 0000000..7aa5e4c --- /dev/null +++ b/tests/folderA/SimpleTestCase.m @@ -0,0 +1,54 @@ +classdef SimpleTestCase < matlab.unittest.TestCase + % Basic simple testcase class meant to ensure that TestRunner correctly + % runs TestCase tests + + % Copyright 2012 The MathWorks, Inc. + methods(TestClassSetup) + function beforeClass(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestClassTeardown) + function afterClass(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestMethodSetup) + function before(testCase) + testCase.callAllPassingQualifications(); + end + end + methods(TestMethodTeardown) + function after(testCase) + testCase.callAllPassingQualifications(); + end + end + + % lets have two tests to ensure correct invocation counts of class level & + % method level setup + methods(Test) + + function test1(testCase) + testCase.callAllPassingQualifications(); + end + + function test2(testCase) + testCase.callAllPassingQualifications(); + end + end + + methods + function helperMethod(~) + end + function callAllPassingQualifications(testCase) + testCase.verifyTrue(true); + testCase.assertTrue(true); + testCase.fatalAssertTrue(true); + testCase.assumeTrue(true); + end + + end + + +end + diff --git a/tests/folderA/SuperclassHasTestMethodTestTags.m b/tests/folderA/SuperclassHasTestMethodTestTags.m new file mode 100644 index 0000000..d6a4891 --- /dev/null +++ b/tests/folderA/SuperclassHasTestMethodTestTags.m @@ -0,0 +1,10 @@ +classdef SuperclassHasTestMethodTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test, TestTags = {'Original'}) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m b/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m new file mode 100644 index 0000000..c43bb34 --- /dev/null +++ b/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m @@ -0,0 +1,10 @@ +classdef SuperclassHasTestMethodWithNoTestTags < matlab.unittest.TestCase + % Test double + + % Copyright 2014 The MathWorks, Inc. + + methods (Test) + function test1(~) + end + end +end \ No newline at end of file diff --git a/tests/folderA/dummyClassName.m b/tests/folderA/dummyClassName.m new file mode 100644 index 0000000..79c6eee --- /dev/null +++ b/tests/folderA/dummyClassName.m @@ -0,0 +1,13 @@ +classdef dummyClassName < matlab.unittest.TestCase + + % Copyright 2019 The MathWorks, Inc. + + methods (Test) + + function test2(~) + disp('calling from folder A'); + end + + end + +end diff --git a/tests/folderA/sampleFunctionTest.m b/tests/folderA/sampleFunctionTest.m new file mode 100644 index 0000000..d0c1b84 --- /dev/null +++ b/tests/folderA/sampleFunctionTest.m @@ -0,0 +1,12 @@ +function tests = sampleFunctionTest + +% Copyright 2021 The MathWorks, Inc. + +tests = functiontests(localfunctions); +end + +function testFunction1(~) +end + +function testFunction2(~) +end diff --git a/tests/folderA/sampleModel.slx b/tests/folderA/sampleModel.slx new file mode 100644 index 0000000000000000000000000000000000000000..d4b10b0e64ffc761bd7b29d3718fc7944ae057b7 GIT binary patch literal 21064 zcmaHzV{~Qj^5C$+HddQ~qdZ309{-KxON9(#F%h3#i^`o4h~}2*&Pk^0N!0gmA6v!WN?sZ^9ptpruJHX+}a77^s;K8=EUD}y&u;$=_+#M@QLw3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knrfTfD%CO{u9j{Nf$5F-uI%BCP_2+k6QY9L8`eh$5lob*=-%-|- zuB}cdwKdw8oJq~^7+GR z#_FGw#bPp@*ZrX+V42kRWHfOP-{21Yl)2!`&qjV4Zu=1<=wZ^FVAe30sCf89xwu^W zt0FBy%Q=Uf_QbTjZ6WysvBE#&Sxp(!x>4KHk#ANdB8dB+D5RP~+1gJ%5H4_3-M+XFt;$n_z2e5I~-s|#+N1A|?s-@w z?>QG#5*yjaX4M7fI`N!!$|mU@Db~A#~j%W$HS?{4HWVl`

vsObKrd92l%*slAN8U^^=f)r0`BcXdQ5_t?= zHgI_GX@FesXxIa{n>6)fCv1PcG(Q?RxqDr0`-w)88SM{-u`VOkNAEj^YbDM$q%#%P zZnU%3pPxl@I<#;_wPOxC#V-c0bo*yL*4(?xw4AuB%geT$p?sT+?;6SXB6z3#UQn4m z&|jpWa2WaaT&d>v^G~`napaQjgPt-8x5#GZw+I;pie^!Noe?XOewQAm@c|MV@IV6J zue)MF+X@0IraphTcw~V9&_HS7%0<9>=#N&|DS;P)K0ok<*^r?18?HYf2(+kyL7I>X zZ5hPPum(hdW-l;mH{|^BRn#i$7mx}1r@%}tNagueCg7$5Qb9M81?u8wALLK6OkL$o z0y03!_rmpyQzs|3;vfVC;2;LnA;XvsaV{8Gl?;MF^(zdzDX{|d4J|B41QnPt(H~j@ z%SZhp@ry3@lO7X9g6c*X=^?cOxmxQ8LO_8J49SBU>*csWxetf|UsZ)MicqP)j9I?1 zPcN>55U{I@42PRD$t{^Q{ zo?N;ikO(#}Ffqo63-N2M42T7L4j8Ly%mw?E4g{ovg+EN?aH9fk07wH1cbInmUtD5b xUB-hju=0js()+o*@&Ij%D3)M9WAq(x!lI9EF{sxO5_p1N^ literal 0 HcmV?d00001 diff --git a/tests/folderB/dummyClassName.m b/tests/folderB/dummyClassName.m new file mode 100644 index 0000000..465c262 --- /dev/null +++ b/tests/folderB/dummyClassName.m @@ -0,0 +1,13 @@ +classdef dummyClassName < matlab.unittest.TestCase + + % Copyright 2019 The MathWorks, Inc. + + methods (Test) + + function test2(~) + disp('calling from folder B'); + end + + end + +end diff --git a/tests/test.mldatx b/tests/test.mldatx new file mode 100644 index 0000000000000000000000000000000000000000..00e03a41b6bee3153619efaeceb9765c6778fc01 GIT binary patch literal 6655 zcmcJU2UJsCw#P&7Rf=?w7LY*by&I$nq4$=MP(uw;qzP1FN>_Yr^%et5fKjhU$ve$aS@SYS0=k;G@`?_x6>f3wXOzrKTAQO0f7G^e zK}&MfrhKdCdGcFxyjhenbZvZ+)V(t1D{CylFZjP1$rPqZ{&0;Plu0Njv$;u|B%l6% zjpn-wjUsJ=XfII6$>yuk>F9!9&JaQW`Io%%&qczc;H0y_hfc=C>>OzLgO{>Q--*-X zdZYyk{h_}RwcM*^RKgPN#S$gM61DR|xciC-|9sDxRP~Gi(-G~q<`u59X?Lxg-_W;O zMrCcaDGcE;7x1ETzHgi9-+P4b@BZj$RAlE6Wcsp!YsvY=8^I!l1fVJ}n#&|(eDn+y zP|_<0C6KUm(9m}lumJJLQ@MAZT(cS)q0K9F*KqsX!r1@fSv3L624zN=K)p-XNzrq2 zA{Y^Ujm$mdYip;m)w{{ILKcinlA94msgcje5E4tleOfIGKEe^Sy+RL1CV|tWx{)Wo z763l++5AD_H-tz7IB{AVUahj3F~Q=HwO8WlbZ|dW ze={4=8g9}WoKKYUsM~);F8V!g#}MSB7CN{ueiX(u#+SfWwIxNm){1K`a(?#%lhS65 zVKXyAF5NH7ls`l-Cdhe06+SNUJ~_{-Ci4>+i=WWO_v-4yAX!?IJvGIak746&>w#U&B2+vh{6gJ7l!pznP^Z^529dB^ zHF1SEp=VAA7;~m?q|Ir1-FwPVlHNch@JhGIRj@lcS42IwOiyS9D2+lY7AmB#8uWKC zjUm*wV12cyf-qywAhw&j9n0;m*E|8#C54vzc~BD1m7Vns+K7*XK2yy@p@82ZH|Y4;x)1;W6Vw2} zo&Nx2V|6=m85yvwqazXobAdZj_;flHRj07 zSs`oDSi2@22XU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e^NXb@96BxB z_>z*tegv$7dsNe_d1V_y{Tgi>W}NFxy$1Tf&JS6ts*xO4B*$tvY6H}Q_BU-mU1zKv z1p%b+^b}*{dJ96YerM_4?Y^ahL75Ic)v=()%Z!-MMJU{lP$)?u+U09Y#j^ZF;M>}3O& zWyhZ*|7O4td-(?u^76pTLfWr^%~%ir9kSZx886FDzh*qgHc9{A8UGz3)Md{uYc;<- zgJBh%f466ULAkl?=;bZNFGn4*n)AQi(aU}4Wp^$&xWC*%Q2YgV{;z2+SLa{TP|^Hp zt-kE<<=XShP!R1u82V?G=(4HH3Hz6+WbFSbfA1eIoBAz%U$%KUFaEL_g3TEJ(&nWs W3DqGW{5g^gd%*DlfN1)kpZ*J;1;SAP literal 0 HcmV?d00001 From d67add4964f00a72e862c161be40be3943cdd869 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 20:58:37 +0530 Subject: [PATCH 37/55] cell array --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 2db7c5b..7ff54f7 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') + select-by-name: select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') test-results-junit: results - store_test_results: From db9243cfb0853b416c64dc0661dee2b9d4a53ba7 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 21:05:01 +0530 Subject: [PATCH 38/55] cell array --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 7ff54f7..b69df1d 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') test-results-junit: results - store_test_results: From 313fa9c0b1b4e055eaa48b9c97ccb7ae8fb5956b Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 21:12:53 +0530 Subject: [PATCH 39/55] cell array file name --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index b69df1d..5fdde6d 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -139,7 +139,7 @@ jobs: - matlab/run-tests: select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[/.]' '{print $(NF-1) "/*"}') + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') test-results-junit: results - store_test_results: From e833cd0bc946c1b0deb7020666b1d73e99024352 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 21:20:11 +0530 Subject: [PATCH 40/55] without feature --- .circleci/test-deploy.yml | 240 ++++++++++++++++++++++++++++++++------ 1 file changed, 206 insertions(+), 34 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 5fdde6d..28d089b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -11,9 +11,8 @@ filters: &filters integration-tests: &integration-tests [ orb-tools/pack, - #integration-test-install, - # integration-test-install-release, - #integration-test-install-release-macos-intel-on-arm, + integration-test-install, + integration-test-install-release, integration-test-run-command, integration-test-run-tests ] @@ -23,10 +22,6 @@ executors: machine: image: ubuntu-2204:2024.01.1 macos: - macos: - xcode: 15.1.0 - resource_class: macos.x86.medium.gen2 - macos-arm: macos: xcode: 15.3.0 resource_class: macos.m1.medium.gen1 @@ -129,27 +124,209 @@ jobs: executor: type: executor executor: <> - parallelism: 2 steps: - - checkout # Setup for Integ tests for matlab/run-tests - matlab/install: products: Simulink Simulink_Test Simulink_Coverage Parallel_Computing_Toolbox no-output-timeout: 30m - + - run: + command: | + echo 'myvar = 123' > startup.m + mkdir src + echo 'function c=add(a,b);c=a+b;' > src/add.m + mkdir tests + echo "%% StartupTest" > tests/mytest.m + echo "evalin('base','assert(myvar==123)')" >> tests/mytest.m + echo "%% FirstTest" >> tests/mytest.m + echo "assert(add(1,2)==3)" >> tests/mytest.m + mkdir tests/filteredTest + echo "%% simpleTest" >> tests/filteredTest/filtertest.m + echo "assert(2==2)" >> tests/filteredTest/filtertest.m + printf "%% FilterByTag\n" >> tests/filteredTest/TaggedTest.m + printf "classdef (TestTags = {'FILTERED'}) TaggedTest < matlab.unittest.TestCase\n" >> tests/filteredTest/TaggedTest.m + printf "methods (Test)\n function testTag (testCase)\n assert(2==2);\n end\n end\n end" >> tests/filteredTest/TaggedTest.m + shell: bash + + # Integ tests for matlab/run-tests + - matlab/run-tests: + source-folder: src + startup-options: -logfile console.log + - matlab/run-tests: + test-results-junit: test-results/matlab/results.xml + code-coverage-cobertura: code-coverage/coverage.xml + source-folder: src + - matlab/run-tests: + test-results-html: test-results/matlab/html + code-coverage-html: code-coverage/html + source-folder: src + - matlab/run-tests: + test-results-junit: test-results/matlab/filterdtestresult.xml + select-by-folder: tests/filteredTest + - matlab/run-tests: + test-results-junit: test-results/matlab/filterdtagresult.xml + select-by-tag: FILTERED + + - run: + name: Verify tests ran with startup options + command: | + set -e + grep mytest console.log + grep TaggedTest console.log + grep filtertest console.log + rm console.log + shell: bash + - run: + name: Verify test results file was created + command: | + set -e + grep -q FirstTest test-results/matlab/results.xml + shell: bash + - run: + name: Verify HTML test results report was created + command: | + set -e + grep -q FirstTest test-results/matlab/html/index.html + shell: bash + - run: + name: Verify code coverage file was created + command: | + set -e + grep -q add code-coverage/coverage.xml + shell: bash + - run: + name: Verify HTML code coverage report was created + command: | + set -e + grep -q CoverageSummary code-coverage/html/index.html + shell: bash + - run: + name: Verify filtered test results file was created + command: | + set -e + grep -q simpleTest test-results/matlab/filterdtestresult.xml + grep -v FirstTest test-results/matlab/filterdtestresult.xml + shell: bash + - run: + name: Verify filter by tag test results file was created + command: | + set -e + grep -q TaggedTest test-results/matlab/filterdtagresult.xml + grep -v FirstTest test-results/matlab/filterdtagresult.xml + grep -v simpleTest test-results/matlab/filterdtagresult.xml + shell: bash + + - run: + name: Set up diary for logging + command: | + echo 'diary console.log' >> startup.m + shell: bash + - matlab/run-tests: + strict: true + source-folder: src + - run: + name: Verify tests ran with strict checks + command: | + set -e + grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log + rm console.log + shell: bash + - matlab/run-tests: + use-parallel: true + source-folder: src + - run: + name: Verify tests ran in parallel + command: | + set -e + grep -q "parallel pool" console.log + rm console.log + shell: bash + - matlab/run-tests: + output-detail: Detailed + source-folder: src + - run: + name: Verify tests ran with detailed display level for event details + command: | + set -e + grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log + rm console.log + shell: bash - matlab/run-tests: - select-by-folder: 'tests' - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[/.]' '{print $(NF-1) "/*"}') - test-results-junit: results - - - store_test_results: - path: results + logging-level: Detailed + source-folder: src + - run: + name: Verify tests ran with detailed verbosity level for logged diagnostics + command: | + set -e + grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log + rm console.log + shell: bash - - store_artifacts: - path: results - destination: test-results/results - - + # Set up for model coverage artifact tests + - when: + condition: + equal: [*linux-executor, <>] + steps: + - run: + command: | + mkdir simtests + cat \<<'_EOF' >> "simtests/createModelAndTest.m" + model = 'simple_model'; + evalin('base','bdclose all'); + if exist('simple_model.slx', 'file') == 0 + new_system(model); + load_system(model); + add_block('built-in/Constant', [model, '/Constant']); + save_system(model); + close_system(model); + sltest.testmanager.clear; + sltest.testmanager.clearResults; + tf = sltest.testmanager.TestFile('test.mldatx'); + cs = tf.getCoverageSettings; + cs.RecordCoverage = true; + cs.MdlRefCoverage = true; + cs.MetricSettings = 'd'; + ts = tf.getTestSuites; + tc = ts.getTestCases; + tc.setProperty('model', model); + tf.saveToFile; + tf.close; + sltest.testmanager.close; + end + disp('Created Model and Simulink Test file to simulate the model.'); + _EOF + shell: bash + - matlab/run-command: + command: cd simtests;createModelAndTest; + - matlab/run-tests: + select-by-folder: simtests + model-coverage-cobertura: model-coverage/coverage.xml + model-coverage-html: model-coverage/html + test-results-pdf: test-results/matlab/pdfresults.pdf + test-results-simulink-test: test-results/matlab/simulinkTest.mldatx + - run: + name: Verify pdf test report file generation + command: | + set -e + test -f test-results/matlab/pdfresults.pdf + shell: bash + - run: + name: Verify Simulink Test result file generation + command: | + set -e + test -f test-results/matlab/simulinkTest.mldatx + shell: bash + - run: + name: Verify model coverage file was created + command: | + set -e + grep -q simple_model model-coverage/coverage.xml + shell: bash + - run: + name: Verify HTML model coverage report was created + command: | + set -e + grep -r "simple_model Coverage Report" --include="*.html" model-coverage/html + shell: bash integration-test-run-build: parameters: @@ -281,33 +458,28 @@ workflows: - integration-test-install: matrix: parameters: - executor: [linux] - - # - integration-test-install-release: - # matrix: - # parameters: - # executor: [linux] - # release: [R2023bU1] + executor: [linux, windows, macos] - integration-test-install-release: - name: integration-test-install-release-macos-intel-on-arm - executor: macos-arm - release: R2023aU1 + matrix: + parameters: + executor: [linux, windows, macos] + release: [R2023bU1] - integration-test-run-command: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - integration-test-run-tests: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - integration-test-run-build: matrix: parameters: - executor: [linux] + executor: [linux, windows, macos] - orb-tools/pack: filters: *filters From d2062ebfc4f9542af620554b5ff811f79271a888 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 21:21:41 +0530 Subject: [PATCH 41/55] without feature --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 84eb407..bebea56 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -63,7 +63,7 @@ fi selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{ for(i=1; i<=NF; i++) { gsub(/\047/, "\047\047", $i); - printf "\047%s\047%s", $i, (i==NF ? "" : ", "); + printf "\047%s\047%s", $i, (i==NF ? "" : ", "); } }') selectByName="{$selectByName}" From 40683b6673fae585d94cc4411f9798a53dd026f0 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 29 Aug 2024 22:05:20 +0530 Subject: [PATCH 42/55] without feature --- src/scripts/run-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index bebea56..bf917f3 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -69,6 +69,7 @@ selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{ selectByName="{$selectByName}" "${tmpdir}/bin/run-matlab-command$binext" "\ + addpath('${gendir}/scriptgen');\ testScript = genscript('Test',\ 'JUnitTestResults','${PARAM_TEST_RESULTS_JUNIT}',\ 'CoberturaCodeCoverage','${PARAM_CODE_COVERAGE_COBERTURA}',\ From 20460138b68688fabfc74b354a15bdcdf173c1b3 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 2 Sep 2024 00:30:45 +0530 Subject: [PATCH 43/55] Cleaning repo --- ...erturaAndHTMLCodePluginExpressionBuilder.m | 27 -- ...dHTMLCodePluginParallelExpressionBuilder.m | 5 - ...AndHTMLCodePluginSerialExpressionBuilder.m | 5 - ...eateCoberturaCodePluginExpressionBuilder.m | 21 -- ...rturaCodePluginParallelExpressionBuilder.m | 5 - ...berturaCodePluginSerialExpressionBuilder.m | 5 - ...ateCoberturaModelPluginExpressionBuilder.m | 15 -- ...turaModelPluginParallelExpressionBuilder.m | 5 - ...erturaModelPluginSerialExpressionBuilder.m | 5 - ...ateFailOnWarningsPluginExpressionBuilder.m | 4 - ...nWarningsPluginParallelExpressionBuilder.m | 5 - ...lOnWarningsPluginSerialExpressionBuilder.m | 5 - .../CreateHTMLCodePluginExpressionBuilder.m | 20 -- ...eHTMLCodePluginParallelExpressionBuilder.m | 4 - ...ateHTMLCodePluginSerialExpressionBuilder.m | 4 - .../CreateHTMLModelPluginExpressionBuilder.m | 14 - ...HTMLModelPluginParallelExpressionBuilder.m | 4 - ...teHTMLModelPluginSerialExpressionBuilder.m | 4 - ...ateHTMLTestReportPluginExpressionBuilder.m | 14 - ...estReportPluginParallelExpressionBuilder.m | 4 - ...LTestReportPluginSerialExpressionBuilder.m | 4 - ...teHasBaseFolderSelectorExpressionBuilder.m | 14 - .../CreateHasNameSelectorExpressionBuilder.m | 14 - .../CreateHasTagSelectorExpressionBuilder.m | 15 -- .../CreateJUnitPluginExpressionBuilder.m | 15 -- ...eateJUnitPluginParallelExpressionBuilder.m | 5 - ...CreateJUnitPluginSerialExpressionBuilder.m | 5 - .../+test/CreatePDFPluginExpressionBuilder.m | 15 -- ...CreatePDFPluginParallelExpressionBuilder.m | 5 - .../CreatePDFPluginSerialExpressionBuilder.m | 5 - ...reateSimulinkTestPluginExpressionBuilder.m | 4 - ...ulinkTestPluginParallelExpressionBuilder.m | 5 - ...imulinkTestPluginSerialExpressionBuilder.m | 5 - ...mulinkTestResultsPluginExpressionBuilder.m | 15 -- ...stResultsPluginParallelExpressionBuilder.m | 5 - ...TestResultsPluginSerialExpressionBuilder.m | 5 - .../+test/CreateTAPPluginExpressionBuilder.m | 15 -- ...CreateTAPPluginParallelExpressionBuilder.m | 5 - .../CreateTAPPluginSerialExpressionBuilder.m | 5 - ...dHTMLCodePluginParallelExpressionBuilder.m | 17 -- ...AndHTMLCodePluginSerialExpressionBuilder.m | 25 -- ...rturaCodePluginParallelExpressionBuilder.m | 17 -- ...berturaCodePluginSerialExpressionBuilder.m | 24 -- ...turaModelPluginParallelExpressionBuilder.m | 19 -- ...erturaModelPluginSerialExpressionBuilder.m | 25 -- ...nWarningsPluginParallelExpressionBuilder.m | 17 -- ...lOnWarningsPluginSerialExpressionBuilder.m | 21 -- ...eHTMLCodePluginParallelExpressionBuilder.m | 17 -- ...ateHTMLCodePluginSerialExpressionBuilder.m | 24 -- ...HTMLModelPluginParallelExpressionBuilder.m | 19 -- ...teHTMLModelPluginSerialExpressionBuilder.m | 34 --- ...estReportPluginParallelExpressionBuilder.m | 16 -- ...LTestReportPluginSerialExpressionBuilder.m | 20 -- ...teHasBaseFolderSelectorExpressionBuilder.m | 36 --- .../CreateHasNameSelectorExpressionBuilder.m | 25 -- .../CreateHasTagSelectorExpressionBuilder.m | 23 -- ...eateJUnitPluginParallelExpressionBuilder.m | 17 -- ...CreateJUnitPluginSerialExpressionBuilder.m | 21 -- ...CreatePDFPluginParallelExpressionBuilder.m | 19 -- .../CreatePDFPluginSerialExpressionBuilder.m | 23 -- ...DFPluginWithMacParallelExpressionBuilder.m | 17 -- ...ePDFPluginWithMacSerialExpressionBuilder.m | 21 -- ...ulinkTestPluginParallelExpressionBuilder.m | 19 -- ...imulinkTestPluginSerialExpressionBuilder.m | 23 -- ...stResultsPluginParallelExpressionBuilder.m | 19 -- ...TestResultsPluginSerialExpressionBuilder.m | 23 -- ...gOriginalFormatParallelExpressionBuilder.m | 33 --- ...ingOriginalFormatSerialExpressionBuilder.m | 32 --- ...nUsingVersion13ParallelExpressionBuilder.m | 32 --- ...ginUsingVersion13SerialExpressionBuilder.m | 23 -- .../+internal/+mixin/EnvironmentDependent.m | 41 --- +scriptgen/+internal/+mixin/PathDependent.m | 24 -- .../+internal/+mixin/PlatformDependent.m | 25 -- +scriptgen/+internal/+mixin/Preferable.m | 75 ------ +scriptgen/+internal/+mixin/SetGet.m | 35 --- .../+internal/+mixin/VersionDependent.m | 41 --- .../+internal/+scripts/TestScriptBuilder.m | 249 ------------------ ...ssertNoFailuresWithAssertSequenceBuilder.m | 18 -- ...FailuresWithAssertSuccessSequenceBuilder.m | 18 -- .../+test/CreateTestRunnerSequenceBuilder.m | 214 --------------- .../+test/CreateTestSuiteSequenceBuilder.m | 67 ----- ...singWithTextOutputDetailStatementBuilder.m | 30 --- ...unnerUsingWithTextOutputStatementBuilder.m | 25 -- ...gWithTextOutputVerbosityStatementBuilder.m | 41 --- ...TestSuiteUsingFromFolderStatementBuilder.m | 21 -- ...eTestSuiteUsingTestsuiteStatementBuilder.m | 19 -- +scriptgen/+internal/CodeBuilderFactory.m | 40 --- +scriptgen/+internal/CodeBuilderLocator.m | 55 ---- +scriptgen/+internal/MissingCode.m | 10 - +scriptgen/+internal/MissingCodeBuilder.m | 10 - +scriptgen/+internal/PrunedStackException.m | 49 ---- +scriptgen/+internal/Version.m | 118 --------- +scriptgen/+internal/isAbsolutePath.m | 8 - +scriptgen/+internal/numericVerbosity.m | 20 -- +scriptgen/+internal/unquoteText.m | 11 - +scriptgen/+internal/validateText.m | 9 - +scriptgen/+internal/validateTextArray.m | 7 - +scriptgen/+internal/validateTextScalar.m | 7 - .../+internal/validateVerbosityScalar.m | 9 - +scriptgen/+scripts/TestScriptBuilder.m | 122 --------- .../+test/AssertNoFailuresSequenceBuilder.m | 20 -- .../+test/CreateTestRunnerSequenceBuilder.m | 104 -------- .../+test/CreateTestSuiteSequenceBuilder.m | 39 --- .../+test/CreateTestRunnerStatementBuilder.m | 27 -- .../+test/CreateTestSuiteStatementBuilder.m | 15 -- +scriptgen/Code.m | 38 --- +scriptgen/CodeBuilder.m | 18 -- +scriptgen/CodeProvider.m | 128 --------- +scriptgen/CodeWriter.m | 64 ----- +scriptgen/Expression.m | 42 --- +scriptgen/FileOutput.m | 22 -- +scriptgen/OutputStream.m | 14 - +scriptgen/Script.m | 83 ------ +scriptgen/Sequence.m | 43 --- +scriptgen/Statement.m | 55 ---- +scriptgen/TextOutput.m | 14 - genscript.m | 26 -- tests/baseline_API.mat | Bin 220520 -> 0 bytes .../BaseClassWithMethodsToBeOverridden.m | 58 ---- tests/folderA/BaseTestCase.m | 69 ----- tests/folderA/ClassTestWithNotATestMethod.m | 15 -- .../ClassWithNonAlphaNumericTestTags.m | 64 ----- tests/folderA/Copy_2_of_testModelSim.m | 59 ----- ...sTagsButHasTestMethodsWithAndWithoutTags.m | 17 -- tests/folderA/HasSealedTestTags.m | 10 - tests/folderA/HasUnsealedTestTags.m | 10 - tests/folderA/SimpleTestCase.m | 54 ---- .../folderA/SuperclassHasTestMethodTestTags.m | 10 - .../SuperclassHasTestMethodWithNoTestTags.m | 10 - tests/folderA/dummyClassName.m | 13 - tests/folderA/sampleFunctionTest.m | 12 - tests/folderA/sampleModel.slx | Bin 21064 -> 0 bytes tests/folderB/dummyClassName.m | 13 - tests/test.mldatx | Bin 6655 -> 0 bytes 134 files changed, 3621 deletions(-) delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m delete mode 100644 +scriptgen/+internal/+mixin/EnvironmentDependent.m delete mode 100644 +scriptgen/+internal/+mixin/PathDependent.m delete mode 100644 +scriptgen/+internal/+mixin/PlatformDependent.m delete mode 100644 +scriptgen/+internal/+mixin/Preferable.m delete mode 100644 +scriptgen/+internal/+mixin/SetGet.m delete mode 100644 +scriptgen/+internal/+mixin/VersionDependent.m delete mode 100644 +scriptgen/+internal/+scripts/TestScriptBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m delete mode 100644 +scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m delete mode 100644 +scriptgen/+internal/CodeBuilderFactory.m delete mode 100644 +scriptgen/+internal/CodeBuilderLocator.m delete mode 100644 +scriptgen/+internal/MissingCode.m delete mode 100644 +scriptgen/+internal/MissingCodeBuilder.m delete mode 100644 +scriptgen/+internal/PrunedStackException.m delete mode 100644 +scriptgen/+internal/Version.m delete mode 100644 +scriptgen/+internal/isAbsolutePath.m delete mode 100644 +scriptgen/+internal/numericVerbosity.m delete mode 100644 +scriptgen/+internal/unquoteText.m delete mode 100644 +scriptgen/+internal/validateText.m delete mode 100644 +scriptgen/+internal/validateTextArray.m delete mode 100644 +scriptgen/+internal/validateTextScalar.m delete mode 100644 +scriptgen/+internal/validateVerbosityScalar.m delete mode 100644 +scriptgen/+scripts/TestScriptBuilder.m delete mode 100644 +scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m delete mode 100644 +scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m delete mode 100644 +scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m delete mode 100644 +scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m delete mode 100644 +scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m delete mode 100644 +scriptgen/Code.m delete mode 100644 +scriptgen/CodeBuilder.m delete mode 100644 +scriptgen/CodeProvider.m delete mode 100644 +scriptgen/CodeWriter.m delete mode 100644 +scriptgen/Expression.m delete mode 100644 +scriptgen/FileOutput.m delete mode 100644 +scriptgen/OutputStream.m delete mode 100644 +scriptgen/Script.m delete mode 100644 +scriptgen/Sequence.m delete mode 100644 +scriptgen/Statement.m delete mode 100644 +scriptgen/TextOutput.m delete mode 100644 genscript.m delete mode 100644 tests/baseline_API.mat delete mode 100644 tests/folderA/BaseClassWithMethodsToBeOverridden.m delete mode 100644 tests/folderA/BaseTestCase.m delete mode 100644 tests/folderA/ClassTestWithNotATestMethod.m delete mode 100644 tests/folderA/ClassWithNonAlphaNumericTestTags.m delete mode 100644 tests/folderA/Copy_2_of_testModelSim.m delete mode 100644 tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m delete mode 100644 tests/folderA/HasSealedTestTags.m delete mode 100644 tests/folderA/HasUnsealedTestTags.m delete mode 100644 tests/folderA/SimpleTestCase.m delete mode 100644 tests/folderA/SuperclassHasTestMethodTestTags.m delete mode 100644 tests/folderA/SuperclassHasTestMethodWithNoTestTags.m delete mode 100644 tests/folderA/dummyClassName.m delete mode 100644 tests/folderA/sampleFunctionTest.m delete mode 100644 tests/folderA/sampleModel.slx delete mode 100644 tests/folderB/dummyClassName.m delete mode 100644 tests/test.mldatx diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m deleted file mode 100644 index b676ca4..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginExpressionBuilder.m +++ /dev/null @@ -1,27 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2022 The MathWorks, Inc. - - properties - CoberturaFilePath = '''coverage.xml''' - HTMLFolderPath = '''htmlCodeCoverage''' - Source = {'pwd'} - end - - methods - function set.CoberturaFilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaFilePath = value; - end - - function set.HTMLFolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLFolderPath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 7ebedb1..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index c40200a..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m deleted file mode 100644 index b9895ae..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateCoberturaCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''coverage.xml''' - Source = {'pwd'} - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m deleted file mode 100644 index fc21b3f..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m deleted file mode 100644 index babd2ad..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m deleted file mode 100644 index d28898e..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateCoberturaModelPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''coverage.xml''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m deleted file mode 100644 index f5a05f7..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaModelPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 225b946..0000000 --- a/+scriptgen/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateCoberturaModelPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateCoberturaModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m deleted file mode 100644 index cd1cf92..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateFailOnWarningsPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m deleted file mode 100644 index f856a7b..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateFailOnWarningsPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m deleted file mode 100644 index f88742f..0000000 --- a/+scriptgen/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateFailOnWarningsPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateFailOnWarningsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m deleted file mode 100644 index 9d3af0b..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginExpressionBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef CreateHTMLCodePluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FolderPath = '''htmlCodeCoverage''' - Source = {'pwd'} - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - - function set.Source(obj, value) - scriptgen.internal.validateTextArray(value); - obj.Source = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index ef3da65..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLCodePluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index ba627ec..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLCodePluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLCodePluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m deleted file mode 100644 index 5ca0813..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHTMLModelPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2021 The MathWorks, Inc. - - properties - FolderPath = '''htmlModelCoverage''' - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m deleted file mode 100644 index f6035a8..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLModelPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 5eec86e..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLModelPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLModelPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m deleted file mode 100644 index 1ec207d..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHTMLTestReportPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2021 The MathWorks, Inc. - - properties - FolderPath = '''report''' - end - - methods - function set.FolderPath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FolderPath = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m deleted file mode 100644 index 529027f..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLTestReportPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m deleted file mode 100644 index 111bc61..0000000 --- a/+scriptgen/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateHTMLTestReportPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateHTMLTestReportPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m deleted file mode 100644 index b6ea0d9..0000000 --- a/+scriptgen/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - BaseFolder = {'pwd'} - end - - methods - function set.BaseFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.BaseFolder = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m deleted file mode 100644 index 3a7c690..0000000 --- a/+scriptgen/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef CreateHasNameSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - SelectByName = {} - end - - methods - function set.SelectByName(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByName = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m deleted file mode 100644 index 701c8e2..0000000 --- a/+scriptgen/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateHasTagSelectorExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - Tag = '''tag''' - end - - methods - function set.Tag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.Tag = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m deleted file mode 100644 index b43f40d..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateJUnitPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.xml''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m deleted file mode 100644 index 95eeec8..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateJUnitPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m deleted file mode 100644 index 4263785..0000000 --- a/+scriptgen/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateJUnitPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateJUnitPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m deleted file mode 100644 index 8d2a739..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreatePDFPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''report.pdf''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m deleted file mode 100644 index 3dcb143..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreatePDFPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreatePDFPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m deleted file mode 100644 index 9b5aaa8..0000000 --- a/+scriptgen/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreatePDFPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreatePDFPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m deleted file mode 100644 index 8c6cc60..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginExpressionBuilder.m +++ /dev/null @@ -1,4 +0,0 @@ -classdef CreateSimulinkTestPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m deleted file mode 100644 index 62624b7..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m deleted file mode 100644 index 6342a96..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m deleted file mode 100644 index c72b63c..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateSimulinkTestResultsPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.mldatx''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m deleted file mode 100644 index 76eea06..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m deleted file mode 100644 index e0c7d2e..0000000 --- a/+scriptgen/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateSimulinkTestResultsPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m deleted file mode 100644 index bab3767..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginExpressionBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateTAPPluginExpressionBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - FilePath = '''results.tap''' - end - - methods - function set.FilePath(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.FilePath = value; - end - end -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m deleted file mode 100644 index 32b775a..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateTAPPluginParallelExpressionBuilder < ... - scriptgen.expressions.test.CreateTAPPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m b/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m deleted file mode 100644 index 167fe0f..0000000 --- a/+scriptgen/+expressions/+test/CreateTAPPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,5 +0,0 @@ -classdef CreateTAPPluginSerialExpressionBuilder < ... - scriptgen.expressions.test.CreateTAPPluginExpressionBuilder - % Copyright 2022 The MathWorks, Inc. -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 13407f7..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index bd6dacc..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaAndHTMLCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'matlab.unittest.plugins.codecoverage.CoverageReport', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', [CoberturaFormat(%s) CoverageReport(%s)])', source, obj.CoberturaFilePath, obj.HTMLFolderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m deleted file mode 100644 index bf30634..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateCoberturaCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m deleted file mode 100644 index a1c4d26..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef CreateCoberturaCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoberturaFormat(%s))', source, obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m deleted file mode 100644 index 2f65f4d..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateCoberturaModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m deleted file mode 100644 index 8f5ddaa..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateCoberturaModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateCoberturaModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateCoberturaModelPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoberturaFormat', ... - 'sltest.plugins.ModelCoveragePlugin'}; - - text = sprintf('ModelCoveragePlugin(''Producing'', CoberturaFormat(%s))', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m deleted file mode 100644 index 880bab9..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateFailOnWarningsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m deleted file mode 100644 index 7bb13ef..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateFailOnWarningsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateFailOnWarningsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateFailOnWarningsPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') - end - - methods - function expression = build(~) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.FailOnWarningsPlugin'}; - - text = 'FailOnWarningsPlugin()'; - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m deleted file mode 100644 index 8d36823..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateHTMLCodePluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m deleted file mode 100644 index d655874..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLCodePluginSerialExpressionBuilder.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef CreateHTMLCodePluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLCodePluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.codecoverage.CoverageReport', ... - 'matlab.unittest.plugins.CodeCoveragePlugin'}; - - source = strjoin(obj.Source, ', '); - text = sprintf('CodeCoveragePlugin.forFolder({%s}, ''IncludingSubfolders'', true, ''Producing'', CoverageReport(%s))', source, obj.FolderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m deleted file mode 100644 index 1327a8c..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateHTMLModelPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2021b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m deleted file mode 100644 index a18bb0c..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLModelPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,34 +0,0 @@ -classdef CreateHTMLModelPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLModelPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.ModelCoveragePlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'sltest.plugins.coverage.ModelCoverageReport', ... - 'sltest.plugins.ModelCoveragePlugin'}; - - % ModelCoverage report does not handle relative paths - if ~strcmp(obj.FolderPath, unquoteText(obj.FolderPath)) && ~isAbsolutePath(unquoteText(obj.FolderPath)) - folderPath = ['fullfile(pwd, ' obj.FolderPath ')']; - else - folderPath = obj.FolderPath; - end - - text = sprintf('ModelCoveragePlugin(''Producing'', ModelCoverageReport(%s))', folderPath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m deleted file mode 100644 index 4e484e6..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,16 +0,0 @@ -classdef CreateHTMLTestReportPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m deleted file mode 100644 index 56157bf..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHTMLTestReportPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef CreateHTMLTestReportPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateHTMLTestReportPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingHTML(%s)', obj.FolderPath); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m deleted file mode 100644 index 824b670..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasBaseFolderSelectorExpressionBuilder.m +++ /dev/null @@ -1,36 +0,0 @@ -classdef CreateHasBaseFolderSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasBaseFolderSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') - end - - methods - function expression = build(obj) - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.selectors.HasBaseFolder', ... - 'matlab.unittest.constraints.StartsWithSubstring'}; - - constraints = {}; - for i = 1:numel(obj.BaseFolder) - folder = obj.BaseFolder{i}; - if ~strcmp(folder, unquoteText(folder)) && ~isAbsolutePath(unquoteText(folder)) - text = sprintf('StartsWithSubstring(fullfile(pwd, %s))', folder); - else - text = sprintf('StartsWithSubstring(%s)', folder); - end - constraints{end+1} = text; %#ok - end - - text = sprintf('HasBaseFolder(%s)', strjoin(constraints, ' | ')); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m deleted file mode 100644 index f97c34f..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasNameSelectorExpressionBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateHasNameSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasNameSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') - end - - methods - function expression = build(obj) - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - import scriptgen.Expression; - - TestFiles = cellfun(@(x) ['''' x ''''], obj.SelectByName, 'UniformOutput', false); - TestFiles = ['{' strjoin(TestFiles, ', ') '}']; - text = sprintf('names = %s;',TestFiles); - suiteStr = 'suite = suite.selectIf(''Name'', names);'; - fullText = sprintf('%s\n%s', text, suiteStr); - - expression = Expression(fullText); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m deleted file mode 100644 index 77c853e..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateHasTagSelectorExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateHasTagSelectorExpressionBuilder < scriptgen.expressions.test.CreateHasTagSelectorExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.selectors.HasTag'}; - - text = sprintf('HasTag(%s)', obj.Tag); - - expression = Expression(text, imports); - end - end -end - - - diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m deleted file mode 100644 index dafdf71..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreateJUnitPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateJUnitPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m deleted file mode 100644 index 3d2c691..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateJUnitPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateJUnitPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateJUnitPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2015b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.XMLPlugin'}; - - text = sprintf('XMLPlugin.producingJUnitFormat(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m deleted file mode 100644 index e2ab00e..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreatePDFPluginParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PlatformDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - SupportedPlatforms = {'GLN', 'PC'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreatePDFPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m deleted file mode 100644 index 8a51d62..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreatePDFPluginSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PlatformDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2017a') - SupportedPlatforms = {'GLN', 'PC'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m deleted file mode 100644 index e2f02b0..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacParallelExpressionBuilder.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef CreatePDFPluginWithMacParallelExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreatePDFPluginWithMacSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m deleted file mode 100644 index 1fb5f26..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreatePDFPluginWithMacSerialExpressionBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreatePDFPluginWithMacSerialExpressionBuilder < scriptgen.expressions.test.CreatePDFPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2021-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'matlab.unittest.plugins.TestReportPlugin'}; - - text = sprintf('TestReportPlugin.producingPDF(%s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m deleted file mode 100644 index 44ad9c1..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateSimulinkTestPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m deleted file mode 100644 index 9fa3ad7..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateSimulinkTestPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(~) - import scriptgen.Expression; - - imports = {'sltest.plugins.TestManagerResultsPlugin'}; - - text = sprintf('TestManagerResultsPlugin()'); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m deleted file mode 100644 index ef4a6d8..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginParallelExpressionBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateSimulinkTestResultsPluginParallelExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - builder = scriptgen.internal.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder(); - set(builder, get(obj)); - expression = builder.build(); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m deleted file mode 100644 index d114f61..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateSimulinkTestResultsPluginSerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateSimulinkTestResultsPluginSerialExpressionBuilder < scriptgen.expressions.test.CreateSimulinkTestResultsPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent ... - & scriptgen.internal.mixin.PathDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2019a') - RequiredPathNames = {'sltest.plugins.TestManagerResultsPlugin'} - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = {'sltest.plugins.TestManagerResultsPlugin'}; - - text = sprintf('TestManagerResultsPlugin(''ExportToFile'', %s)', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m deleted file mode 100644 index 9296d60..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder.m +++ /dev/null @@ -1,33 +0,0 @@ -classdef CreateTAPPluginUsingOriginalFormatParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'matlab.unittest.plugins.ToUniqueFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - filePath = scriptgen.internal.unquoteText(obj.FilePath); - hadQuotes = ~strcmp(filePath, obj.FilePath); - if hadQuotes - [fp,name,ext] = fileparts(filePath); - filePath = ['''' fullfile(fp, name) '''']; - else - ext = '.tap'; - end - - text = sprintf('TAPPlugin.producingOriginalFormat(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m deleted file mode 100644 index 1d560ec..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder.m +++ /dev/null @@ -1,32 +0,0 @@ -classdef CreateTAPPluginUsingOriginalFormatSerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - import scriptgen.internal.unquoteText; - import scriptgen.internal.isAbsolutePath; - - imports = { ... - 'matlab.unittest.plugins.ToFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - % Fixes an issue where ToFile did not properly resolve - % fullpaths prior to R2015a. - if ~strcmp(obj.FilePath, unquoteText(obj.FilePath)) && ~isAbsolutePath(unquoteText(obj.FilePath)) - filePath = ['fullfile(pwd, ' obj.FilePath ')']; - else - filePath = obj.FilePath; - end - - text = sprintf('TAPPlugin.producingOriginalFormat(ToFile(%s))', filePath); - - expression = Expression(text, imports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m deleted file mode 100644 index 63d8a45..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13ParallelExpressionBuilder.m +++ /dev/null @@ -1,32 +0,0 @@ -classdef CreateTAPPluginUsingVersion13ParallelExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginParallelExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018a') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.ToUniqueFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - filePath = scriptgen.internal.unquoteText(obj.FilePath); - hadQuotes = ~strcmp(filePath, obj.FilePath); - if hadQuotes - [fp,name,ext] = fileparts(filePath); - filePath = ['''' fullfile(fp, name) '''']; - else - ext = '.tap'; - end - - text = sprintf('TAPPlugin.producingVersion13(ToUniqueFile(%s, ''WithExtension'', ''%s''))', filePath, ext); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m b/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m deleted file mode 100644 index 1c722c9..0000000 --- a/+scriptgen/+internal/+expressions/+test/CreateTAPPluginUsingVersion13SerialExpressionBuilder.m +++ /dev/null @@ -1,23 +0,0 @@ -classdef CreateTAPPluginUsingVersion13SerialExpressionBuilder < scriptgen.expressions.test.CreateTAPPluginSerialExpressionBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016b') - end - - methods - function expression = build(obj) - import scriptgen.Expression; - - imports = { ... - 'matlab.unittest.plugins.ToFile', ... - 'matlab.unittest.plugins.TAPPlugin'}; - - text = sprintf('TAPPlugin.producingVersion13(ToFile(%s))', obj.FilePath); - - expression = Expression(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/EnvironmentDependent.m b/+scriptgen/+internal/+mixin/EnvironmentDependent.m deleted file mode 100644 index abfaf51..0000000 --- a/+scriptgen/+internal/+mixin/EnvironmentDependent.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef (Hidden, HandleCompatible) EnvironmentDependent - % EnvironmentDependent - Base class for mixins that indicate a class is - % dependent on the runtime environment in some way - % - % When a mixin class subclasses EnvironmentDependent, it should call - % the addIsSupportedFunction method in its constructor and add a - % function that evaluates to true/false depending on the current - % runtime environment. - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - IsSupportedFunctions - end - - methods - function tf = isSupportedByCurrentEnvironment(obj) - for i = 1:numel(obj.IsSupportedFunctions) - isSupported = obj.IsSupportedFunctions{i}; - if ~isSupported(obj) - tf = false; - return; - end - end - tf = true; - end - end - - methods (Hidden, Access = protected) - function obj = EnvironmentDependent() - if isempty(obj.IsSupportedFunctions) - obj.IsSupportedFunctions = {}; - end - end - - function obj = addIsSupportedFunction(obj, fcn) - obj.IsSupportedFunctions{end+1} = fcn; - end - end -end - diff --git a/+scriptgen/+internal/+mixin/PathDependent.m b/+scriptgen/+internal/+mixin/PathDependent.m deleted file mode 100644 index b7067d3..0000000 --- a/+scriptgen/+internal/+mixin/PathDependent.m +++ /dev/null @@ -1,24 +0,0 @@ -classdef (Hidden, HandleCompatible) PathDependent < scriptgen.internal.mixin.EnvironmentDependent - % PathDependent - Indicates a class requires a set of path names on the - % current MATLAB search path - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - RequiredPathNames - end - - methods (Hidden, Access = protected) - function obj = PathDependent() - obj = obj.addIsSupportedFunction(@requiredNamesExistOnCurrentPath); - end - end - - methods (Access = protected) - function tf = requiredNamesExistOnCurrentPath(obj) - ret = cellfun(@(n)exist(n), obj.RequiredPathNames); %#ok - tf = all(ismember(ret, [2 3 4 5 6 7 8])); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/PlatformDependent.m b/+scriptgen/+internal/+mixin/PlatformDependent.m deleted file mode 100644 index b6617c7..0000000 --- a/+scriptgen/+internal/+mixin/PlatformDependent.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef (Hidden, HandleCompatible) PlatformDependent < scriptgen.internal.mixin.EnvironmentDependent - % PlatformDependent - Indicates a class requires a particular runtime - % platform like PCWIN64 or MACI64 - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - SupportedPlatforms - end - - methods (Hidden, Access = protected) - function obj = PlatformDependent() - obj = obj.addIsSupportedFunction(@isSupportedByCurrentPlatform); - end - end - - methods (Access = protected) - function tf = isSupportedByCurrentPlatform(obj) - exp = ['^(' strjoin(obj.SupportedPlatforms, '|') ')\w*']; - matches = regexp(computer(), exp, 'once'); - tf = any(matches); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/Preferable.m b/+scriptgen/+internal/+mixin/Preferable.m deleted file mode 100644 index b9fd4a5..0000000 --- a/+scriptgen/+internal/+mixin/Preferable.m +++ /dev/null @@ -1,75 +0,0 @@ -classdef (Hidden, HandleCompatible) Preferable - % Preferable - Base class for mixins that indicate an array of class - % objects may be sorted by some type of preferability - % - % When a mixin class subclasses Preferable, it should call the - % addPreferabilityComparator method in its constructor and add a - % function that accepts two objects and returns a negative value, - % zero, or positive value if the first object is less than, equal to, - % or greater than the second object. - % - % Note: one or both objects passed to the comparator may not derive - % from the mixin class. - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - PreferabilityComparators - end - - methods (Sealed) - function sorted = sortByPreferability(array) - map = mergeMaps({array.PreferabilityComparators}); - sorted = insertionSort(array, @(a,b)chainedComparator(a,b,map.values)); - end - end - - methods (Hidden, Access = protected) - function obj = Preferable() - if isempty(obj.PreferabilityComparators) - obj.PreferabilityComparators = containers.Map(); - end - end - - function obj = addPreferabilityComparator(obj, mixinClass, comparator) - obj.PreferabilityComparators(mixinClass) = comparator; - end - end -end - -function sorted = insertionSort(array, comparator) -for i = 2:numel(array) - key = array(i); - j = i - 1; - while j >= 1 && comparator(array(j), key) > 0 - array(j+1) = array(j); - j = j - 1; - end - array(j+1) = key; -end -sorted = array; -end - -function p = chainedComparator(a, b, comparators) -for i = 1:numel(comparators) - compare = comparators{i}; - value = compare(a, b); - assert(compare(b, a) == -value, 'comparator violates contract!'); - if value ~= 0 - p = value; - return; - end -end -p = 0; -end - -function m = mergeMaps(maps) -m = containers.Map(); -for i = 1:numel(maps) - map = maps{i}; - keys = map.keys; - for j = 1:numel(keys) - m(keys{j}) = map(keys{j}); - end -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+mixin/SetGet.m b/+scriptgen/+internal/+mixin/SetGet.m deleted file mode 100644 index cad3030..0000000 --- a/+scriptgen/+internal/+mixin/SetGet.m +++ /dev/null @@ -1,35 +0,0 @@ -classdef (Abstract) SetGet < handle - % SetGet - A primitive alternative to matlab.mixin.SetGet that works - % with releases prior to R2014b - - % Copyright 2020-2022 The MathWorks, Inc. - - methods - function set(obj, varargin) - if nargin == 2 - value = varargin{1}; - names = fieldnames(value); - for i = 1:numel(names) - obj.(names{i}) = value.(names{i}); - end - return; - end - for i = 1:2:numel(varargin) - obj.(varargin{i}) = varargin{i+1}; - end - end - - function value = get(obj, name) - if nargin == 1 - value = struct(); - props = properties(obj); - for i = 1:numel(props) - value.(props{i}) = obj.(props{i}); - end - return; - end - value = obj.(name); - end - end -end - diff --git a/+scriptgen/+internal/+mixin/VersionDependent.m b/+scriptgen/+internal/+mixin/VersionDependent.m deleted file mode 100644 index 8108a08..0000000 --- a/+scriptgen/+internal/+mixin/VersionDependent.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef (Hidden, HandleCompatible) VersionDependent < scriptgen.internal.mixin.EnvironmentDependent ... - & scriptgen.internal.mixin.Preferable - % VersionDependent - Indicates a class requires a particular version of - % MATLAB - - % Copyright 2020 The MathWorks, Inc. - - properties (Abstract, Constant, Access = protected) - MinSupportedVersion - end - - methods (Hidden, Access = protected) - function obj = VersionDependent() - obj = obj.addIsSupportedFunction(@isSupportedByCurrentVersion); - obj = obj.addPreferabilityComparator('scriptgen.internal.mixin.VersionDependent', @comparePreferabilityByMinVersion); - end - end - - methods (Access = protected) - function tf = isSupportedByCurrentVersion(obj) - import scriptgen.internal.Version; - tf = obj.MinSupportedVersion <= Version.forCurrentRelease(); - end - end -end - -function p = comparePreferabilityByMinVersion(a, b) - if ~isa(a, 'scriptgen.internal.mixin.VersionDependent') && ~isa(b, 'scriptgen.internal.mixin.VersionDependent') - p = 0; - elseif ~isa(a, 'scriptgen.internal.mixin.VersionDependent') - p = -1; - elseif ~isa(b, 'scriptgen.internal.mixin.VersionDependent') - p = 1; - elseif a.MinSupportedVersion == b.MinSupportedVersion - p = 0; - elseif a.MinSupportedVersion < b.MinSupportedVersion - p = -1; - else - p = 1; - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+scripts/TestScriptBuilder.m b/+scriptgen/+internal/+scripts/TestScriptBuilder.m deleted file mode 100644 index 3941676..0000000 --- a/+scriptgen/+internal/+scripts/TestScriptBuilder.m +++ /dev/null @@ -1,249 +0,0 @@ -classdef TestScriptBuilder < scriptgen.scripts.TestScriptBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function script = build(obj) - import scriptgen.Script; - import scriptgen.Sequence; - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - suiteName = 'suite'; - runnerName = 'runner'; - resultsName = 'results'; - - sequences = Sequence.empty(); - - if ~isempty(obj.WorkingFolder) - sequences(end+1) = Sequence(sprintf('cd(''%s'');', escape(obj.WorkingFolder))); - end - - sequences = [sequences obj.buildAddpathSequence()]; - - sequences(end+1) = testCodeProvider.createSequence('CreateTestSuite', ... - 'CodeProvider', obj.CodeProvider, ... - 'SuiteName', suiteName,... - 'SelectByFolder', quoteCell(splitPath(obj.SelectByFolder)),... - 'SelectByTag', quote(obj.SelectByTag), ... - 'SelectByName', (obj.SelectByName)); - - sequences = [sequences obj.buildMkdirSequence()]; - - runnerSequence = Sequence.empty(); - - if obj.UseParallel - [canUseParallel, cannotUseParallelMsg] = canRunInParallel(); - if canUseParallel - runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, true); - if isempty(runnerSequence) - msg = ['Unable to generate all artifacts while running tests in parallel. ' ... - 'Running tests in serial instead.']; - sequences(end+1) = Sequence(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - end - else - msg = [cannotUseParallelMsg '. Running tests in serial instead.']; - sequences(end+1) = Sequence(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - end - end - - if isempty(runnerSequence) - sequences = [sequences obj.buildDeleteTAPResultsSequence()]; - runnerSequence = obj.buildCreateTestRunnerSequence(testCodeProvider, runnerName, false); - runStatement = sprintf('%s = %s.run(%s);', resultsName, runnerName, suiteName); - else - runStatement = sprintf('%s = %s.runInParallel(%s);', resultsName, runnerName, suiteName); - end - - sequences(end+1) = runnerSequence; - sequences(end+1) = Sequence({ ... - runStatement, ... - sprintf('display(%s);', resultsName)}); - - sequences(end+1) = testCodeProvider.createSequence('AssertNoFailures', ... - 'CodeProvider', obj.CodeProvider, ... - 'ResultsName', resultsName); - - script = Script(sequences); - end - end - - methods (Access = private) - function s = buildAddpathSequence(obj) - import scriptgen.Sequence; - - dirs = splitPath(obj.SourceFolder); - - if isempty(dirs) - s = Sequence.empty(); - return; - end - - for i = numel(dirs):-1:1 - code{i} = sprintf('addpath(genpath(''%s''));', escape(dirs{i})); - end - s = Sequence(code); - end - - function s = buildMkdirSequence(obj) - import scriptgen.Sequence; - - dirs = cellfun(@(f)fileparts(f), { ... - obj.PDFTestReport, ... - obj.TAPTestResults, ... - obj.JUnitTestResults, ... - obj.SimulinkTestResults, ... - obj.CoberturaCodeCoverage, ... - obj.CoberturaModelCoverage}, ... - 'UniformOutput', false); - - % TAP results require a folder when running in parallel - if ~isempty(obj.TAPTestResults) && obj.UseParallel - [fp,name] = fileparts(obj.TAPTestResults); - dirs = [dirs {fullfile(fp,name)}]; - end - - % HTML artifacts take in folder path - htmlDirs = {obj.HTMLTestReport, ... - obj.HTMLCodeCoverage, ... - obj.HTMLModelCoverage}; - - dirs = [dirs htmlDirs]; - - dirs = dirs(~cellfun(@isempty, dirs)); - dirs = unique(dirs); - - if isempty(dirs) - s = Sequence.empty(); - return; - end - - for i = numel(dirs):-1:1 - code{i} = sprintf('[~,~] = mkdir(''%s'');', escape(dirs{i})); - end - s = Sequence(code); - end - - function s = buildDeleteTAPResultsSequence(obj) - import scriptgen.Sequence; - import scriptgen.internal.isAbsolutePath; - - % Only pre-existing TAP results need to be explicitly deleted - % at the moment. Other artifacts are automatically overwritten - % by their respective plugin. - files = {obj.TAPTestResults}; - files = files(~cellfun(@isempty, files)); - files = unique(files); - - if isempty(files) - s = Sequence.empty(); - return; - end - - code = {}; - for i = 1:numel(files) - filePath = escape(files{i}); - if ~isAbsolutePath(filePath) - fullFilePath = sprintf('fullfile(pwd, ''%s'')', filePath); - else - fullFilePath = sprintf('''%s''', filePath); - end - c{1} = sprintf('if exist(%s, ''file'') == 2', fullFilePath); - c{2} = sprintf(' delete(''%s'');', filePath); - c{3} = sprintf('end'); - code = [code c]; %#ok - end - s = Sequence(code); - end - - function s = buildCreateTestRunnerSequence(obj, provider, runnerName, useParallel) - source = obj.SourceFolder; - if isempty(source) - source = '.'; - end - - s = provider.createSequence('CreateTestRunner', ... - 'CodeProvider', obj.CodeProvider, ... - 'RunnerName', runnerName, ... - 'PDFTestReport', quote(obj.PDFTestReport), ... - 'HTMLTestReport', quote(obj.HTMLTestReport), ... - 'TAPTestResults', quote(obj.TAPTestResults), ... - 'JUnitTestResults', quote(obj.JUnitTestResults), ... - 'SimulinkTestResults', quote(obj.SimulinkTestResults), ... - 'CoberturaCodeCoverage', quote(obj.CoberturaCodeCoverage), ... - 'HTMLCodeCoverage', quote(obj.HTMLCodeCoverage), ... - 'CoberturaModelCoverage', quote(obj.CoberturaModelCoverage), ... - 'HTMLModelCoverage', quote(obj.HTMLModelCoverage), ... - 'SourceFolder', quoteCell(splitPath(source)), ... - 'LoggingLevel', obj.LoggingLevel, ... - 'OutputDetail', obj.OutputDetail, ... - 'Strict', obj.Strict, ... - 'UseParallel', useParallel); - end - end -end - -function [tf,msg] = canRunInParallel() -tf = false; -msg = ''; - -mc = meta.class.fromName('matlab.unittest.TestRunner'); -runInParallelMethod = mc.MethodList.findobj('Name', 'runInParallel'); -if isempty(runInParallelMethod) - msg = 'Unable to find a runInParallel method on matlab.unittest.TestRunner'; - return; -end - -licenseName = 'Distrib_Computing_Toolbox'; -if ~license('test', licenseName) - msg = 'Unable to find a license for Parallel Computing Toolbox'; - return; -end - -[canCheckout,~] = license('checkout', licenseName); -if ~canCheckout - msg = 'Unable to check out a license for Parallel Computing Toolbox'; - return; -end - -if isempty(gcp()) - msg = 'Unable to get or start a parallel pool'; - return; -end - -tf = true; -end - -function text = splitPath(text) -if iscellstr(text) %#ok - return; -elseif isempty(text) - text = {}; -else - text = strtrim(strsplit(text, {';', ':'})); -end -end - -function text = quote(text) -if isempty(text) - return; -end -text = ['''' escape(text) '''']; -end - -function text = quoteCell(text) -text = cellfun(@(t)['''' t ''''], escape(text), 'UniformOutput', false); -end - -function text = escape(text) -if isempty(text) - return; -end -text = strrep(text, '''', ''''''); -end diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m deleted file mode 100644 index a20e496..0000000 --- a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSequenceBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef AssertNoFailuresWithAssertSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - sequence = Sequence( ... - sprintf('assert(~any([%s.Failed]), ''At least one test failed in the test session.'');', obj.ResultsName)); - end - end -end - diff --git a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m deleted file mode 100644 index 1b9820f..0000000 --- a/+scriptgen/+internal/+sequences/+test/AssertNoFailuresWithAssertSuccessSequenceBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef AssertNoFailuresWithAssertSuccessSequenceBuilder < scriptgen.sequences.test.AssertNoFailuresSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2020a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - sequence = Sequence( ... - sprintf('assertSuccess(%s);', obj.ResultsName)); - end - end -end - diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m deleted file mode 100644 index bd660dd..0000000 --- a/+scriptgen/+internal/+sequences/+test/CreateTestRunnerSequenceBuilder.m +++ /dev/null @@ -1,214 +0,0 @@ -classdef CreateTestRunnerSequenceBuilder < scriptgen.sequences.test.CreateTestRunnerSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2024 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - - if ~isempty(obj.CoberturaCodeCoverage) && isempty(obj.SourceFolder) - error('scriptgen:CreateTestRunner:sourceRequiredForCoberturaCodeCoverage', ... - '''SourceFolder'' is required when specifying ''CoberturaCodeCoverage''.'); - end - - if ~isempty(obj.HTMLCodeCoverage) && isempty(obj.SourceFolder) - error('scriptgen:CreateTestRunner:sourceRequiredForHTMLCodeCoverage', ... - '''SourceFolder'' is required when specifying ''HTMLCodeCoverage''.'); - end - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - sequence = Sequence.empty(); - - statements = testCodeProvider.createStatement('CreateTestRunner', ... - 'RunnerName', obj.RunnerName, ... - 'LoggingLevel', obj.LoggingLevel, ... - 'OutputDetail', obj.OutputDetail); - - if obj.Strict - fowStatement = obj.buildPluginStatement(testCodeProvider, 'fails tests when they issue warnings', ... - 'CreateFailOnWarningsPlugin'); - if isempty(fowStatement) - return; - end - statements(end+1) = fowStatement; - end - - hasPDF = false; - if ~isempty(obj.PDFTestReport) - [pdfStatement, hasPDF] = obj.buildPluginStatement(testCodeProvider, 'generates a PDF test results report', ... - 'CreatePDFPlugin', 'FilePath', obj.PDFTestReport); - if isempty(pdfStatement) - return; - end - statements(end+1) = pdfStatement; - end - - hasHTML = false; - if ~isempty(obj.HTMLTestReport) - [htmlReportStatement, hasHTML] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML test results report', ... - 'CreateHTMLTestReportPlugin', 'FolderPath', obj.HTMLTestReport); - if isempty(htmlReportStatement) - return; - end - statements(end+1) = htmlReportStatement; - end - - if ~isempty(obj.TAPTestResults) - tapStatement = obj.buildPluginStatement(testCodeProvider, 'generates a TAP test results report', ... - 'CreateTAPPlugin', 'FilePath', obj.TAPTestResults); - if isempty(tapStatement) - return; - end - statements(end+1) = tapStatement; - end - - if ~isempty(obj.JUnitTestResults) - junitStatement = obj.buildPluginStatement(testCodeProvider, 'generates a JUnit test results report', ... - 'CreateJUnitPlugin', 'FilePath', obj.JUnitTestResults); - if isempty(junitStatement) - return; - end - statements(end+1) = junitStatement; - end - - hasSimTest = false; - if ~isempty(obj.SimulinkTestResults) - [simResultsStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... - 'CreateSimulinkTestResultsPlugin', 'FilePath', obj.SimulinkTestResults); - if isempty(simResultsStatement) - return; - end - statements(end+1) = simResultsStatement; - end - - if (hasPDF || hasHTML) && ~hasSimTest - % Do not warn if we cannot add Simulink Test plugin because the user did - % not explicitly request it. - warningState = warning('off', 'scriptgen:featureNotAvailable'); - restoreState = onCleanup(@()warning(warningState)); - [simTestStatement, hasSimTest] = obj.buildPluginStatement(testCodeProvider, 'exports Simulink Test Manager results', ... - 'CreateSimulinkTestPlugin'); - delete(restoreState); - if isempty(simTestStatement) - return; - end - if hasSimTest - statements(end+1) = simTestStatement; - end - end - - if (hasPDF || hasHTML) && hasSimTest && obj.UseParallel && verLessThan('matlab', '9.13') - % g2730113. Fall back to running serially. - return; - end - - % More than one CodeCoveragePlugin cannot exist on the same runner if they - % have overlapping source files. - hasCodeCov = false; - if ~isempty(obj.CoberturaCodeCoverage) && ~isempty(obj.HTMLCodeCoverage) - [dualCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates Cobertura and HTML code coverage reports', ... - 'CreateCoberturaAndHTMLCodePlugin', ... - 'CoberturaFilePath', obj.CoberturaCodeCoverage, ... - 'HTMLFolderPath', obj.HTMLCodeCoverage, ... - 'Source', obj.SourceFolder); - if isempty(dualCodeStatement) - return; - end - statements(end+1) = dualCodeStatement; - end - - if ~isempty(obj.CoberturaCodeCoverage) && ~hasCodeCov - [coberturaCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura code coverage report', ... - 'CreateCoberturaCodePlugin', 'FilePath', obj.CoberturaCodeCoverage, 'Source', obj.SourceFolder); - if isempty(coberturaCodeStatement) - return; - end - statements(end+1) = coberturaCodeStatement; - end - - if ~isempty(obj.HTMLCodeCoverage) && ~hasCodeCov - [htmlCodeStatement, hasCodeCov] = obj.buildPluginStatement(testCodeProvider, 'generates an HTML code coverage report', ... - 'CreateHTMLCodePlugin', 'FolderPath', obj.HTMLCodeCoverage, 'Source', obj.SourceFolder); %#ok - if isempty(htmlCodeStatement) - return; - end - statements(end+1) = htmlCodeStatement; - end - - if ~isempty(obj.CoberturaModelCoverage) - coberturaModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates a Cobertura model coverage report', ... - 'CreateCoberturaModelPlugin', 'FilePath', obj.CoberturaModelCoverage); - if isempty(coberturaModelStatement) - return; - end - statements(end+1) = coberturaModelStatement; - end - - if ~isempty(obj.HTMLModelCoverage) - htmlModelStatement = obj.buildPluginStatement(testCodeProvider, 'generates an HTML model coverage report', ... - 'CreateHTMLModelPlugin', 'FolderPath', obj.HTMLModelCoverage); - if isempty(htmlModelStatement) - return; - end - statements(end+1) = htmlModelStatement; - end - - sequence = Sequence(statements); - end - end - - methods (Access = private) - function [statement, success] = buildPluginStatement(obj, provider, purpose, type, varargin) - import scriptgen.Statement; - - statement = Statement.empty(); - success = false; - - if obj.UseParallel - statement = obj.buildAddPluginStatement(provider.createExpression([type 'Parallel'], varargin{:})); - end - - if isempty(statement) - statement = obj.buildAddPluginStatement(provider.createExpression([type 'Serial'], varargin{:})); - if ~isempty(statement) && obj.UseParallel - % We could not create the parallel statement but we could create the - % non-parallel statement. Return empty so we can fall back to running - % serially, as we prefer to produce requested artifacts over running in - % parallel. - warning('scriptgen:featureNotAvailable', ... - ['Unable to add a plugin that ' purpose ' while running tests in parallel.']); - statement = Statement.empty(); - return; - end - end - - if isempty(statement) - % We could not create the parallel or non-parallel statement. No point in - % falling back at this point. Put a comment in place of the statement. - msg = ['Unable to add a plugin that ' purpose '. This problem might be due to a MATLAB release ' ... - 'or operating system that does not support the plugin, ' ... - 'a missing toolbox, or a missing license.']; - statement = Statement(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - return; - end - - success = true; - end - - function statement = buildAddPluginStatement(obj, expression) - import scriptgen.Statement; - - if isempty(expression) - statement = Statement.empty(); - return; - end - statement = Statement(sprintf('%s.addPlugin(%s);', obj.RunnerName, expression.Text), expression.RequiredImports); - end - end -end \ No newline at end of file diff --git a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m deleted file mode 100644 index 6839529..0000000 --- a/+scriptgen/+internal/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ /dev/null @@ -1,67 +0,0 @@ -classdef CreateTestSuiteSequenceBuilder < scriptgen.sequences.test.CreateTestSuiteSequenceBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function sequence = build(obj) - import scriptgen.Sequence; - import scriptgen.Statement; - - testCodeProvider = obj.CodeProvider.withSubpackage('test'); - - statements = testCodeProvider.createStatement('CreateTestSuite', ... - 'SuiteName', obj.SuiteName); - - if ~isempty(obj.SelectByFolder) - statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'base folder selector', ... - 'CreateHasBaseFolderSelector', 'BaseFolder', obj.SelectByFolder); - end - - if ~isempty(obj.SelectByTag) - statements(end+1) = obj.buildSelectorStatement(testCodeProvider, 'tag selector', ... - 'CreateHasTagSelector', 'Tag', obj.SelectByTag); - end - - if ~isempty(obj.SelectByName) - expression= testCodeProvider.createExpression('CreateHasNameSelector','SelectByName', obj.SelectByName); - statements(end+1) = Statement(expression.Text, expression.RequiredImports); - end - - sequence = Sequence(statements); - end - end - - methods (Access = private) - function [statement, success] = buildSelectorStatement(obj, provider, name, type, varargin) - import scriptgen.Statement; - - statement = obj.buildSelectIfStatement(provider.createExpression(type, varargin{:})); - if isempty(statement) - success = false; - msg = ['Unable to create ' name '. This problem might be due to a MATLAB release ' ... - 'or operating system that does not support generating the specified artifact, ' ... - 'a missing toolbox, or a missing license.']; - statement = Statement(['% ' msg]); - warning('scriptgen:featureNotAvailable', msg); - return; - end - - success = true; - end - - function statement = buildSelectIfStatement(obj, expression) - import scriptgen.Statement; - - if isempty(expression) - statement = Statement.empty(); - return; - end - statement = Statement(sprintf('%s = %s.selectIf(%s);', obj.SuiteName, obj.SuiteName, expression.Text), expression.RequiredImports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m deleted file mode 100644 index 0f9ce75..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputDetailStatementBuilder.m +++ /dev/null @@ -1,30 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputDetailStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2018b') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - import scriptgen.internal.numericVerbosity; - - imports = {'matlab.unittest.TestRunner'}; - - nvpairs = {}; - if ~isempty(obj.LoggingLevel) - nvpairs{end+1} = sprintf('''LoggingLevel'', %s', num2str(numericVerbosity(obj.LoggingLevel))); - end - if ~isempty(obj.OutputDetail) - nvpairs{end+1} = sprintf('''OutputDetail'', %s', num2str(numericVerbosity(obj.OutputDetail))); - end - - text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m deleted file mode 100644 index 8f00299..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputStatementBuilder.m +++ /dev/null @@ -1,25 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - imports = {'matlab.unittest.TestRunner'}; - - text = sprintf('%s = TestRunner.withTextOutput();', obj.RunnerName); - - if ~isempty(obj.LoggingLevel) || ~isempty(obj.OutputDetail) - text = [text ' % Unable to specify the logging level or output detail in this release of MATLAB.']; - end - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m deleted file mode 100644 index 326fe39..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder.m +++ /dev/null @@ -1,41 +0,0 @@ -classdef CreateTestRunnerUsingWithTextOutputVerbosityStatementBuilder < scriptgen.statements.test.CreateTestRunnerStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020-2022 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2014b') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - import scriptgen.internal.numericVerbosity; - - imports = {'matlab.unittest.TestRunner'}; - - if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) - verbosity = max(numericVerbosity(obj.LoggingLevel), numericVerbosity(obj.OutputDetail)); - elseif ~isempty(obj.LoggingLevel) - verbosity = numericVerbosity(obj.LoggingLevel); - elseif ~isempty(obj.OutputDetail) - verbosity = numericVerbosity(obj.OutputDetail); - else - verbosity = []; - end - - nvpairs = {}; - if ~isempty(verbosity) - nvpairs{end+1} = sprintf('''Verbosity'', %s', num2str(verbosity)); - end - - text = sprintf('%s = TestRunner.withTextOutput(%s);', obj.RunnerName, strjoin(nvpairs,', ')); - - if ~isempty(obj.LoggingLevel) && ~isempty(obj.OutputDetail) - text = [text ' % Unable to specify the logging level and output detail independently in this release of MATLAB.']; - end - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m deleted file mode 100644 index a35272f..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingFromFolderStatementBuilder.m +++ /dev/null @@ -1,21 +0,0 @@ -classdef CreateTestSuiteUsingFromFolderStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2013a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - imports = {'matlab.unittest.TestSuite'}; - - text = sprintf('%s = TestSuite.fromFolder(pwd, ''IncludingSubfolders'', true);', obj.SuiteName); - - statement = Statement(text, imports); - end - end -end - diff --git a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m b/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m deleted file mode 100644 index f9ffc69..0000000 --- a/+scriptgen/+internal/+statements/+test/CreateTestSuiteUsingTestsuiteStatementBuilder.m +++ /dev/null @@ -1,19 +0,0 @@ -classdef CreateTestSuiteUsingTestsuiteStatementBuilder < scriptgen.statements.test.CreateTestSuiteStatementBuilder ... - & scriptgen.internal.mixin.VersionDependent - % Copyright 2020 The MathWorks, Inc. - - properties (Constant, Access = protected) - MinSupportedVersion = scriptgen.internal.Version.forRelease('R2016a') - end - - methods - function statement = build(obj) - import scriptgen.Statement; - - text = sprintf('%s = testsuite(pwd, ''IncludeSubfolders'', true);', obj.SuiteName); - - statement = Statement(text); - end - end -end - diff --git a/+scriptgen/+internal/CodeBuilderFactory.m b/+scriptgen/+internal/CodeBuilderFactory.m deleted file mode 100644 index de0be85..0000000 --- a/+scriptgen/+internal/CodeBuilderFactory.m +++ /dev/null @@ -1,40 +0,0 @@ -classdef CodeBuilderFactory < handle - % CodeBuilderFactory - Factory that creates CodeBuilders - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - Locator - end - - methods - function obj = CodeBuilderFactory(locator) - obj.Locator = locator; - end - - function builder = create(obj, type) - % create - Creates a single CodeBuilder - % - % Creates the most preferable CodeBuilder supported by the - % current runtime environment or empty. - - import scriptgen.internal.MissingCodeBuilder; - - metaclasses = obj.Locator.locate(type); - builder = MissingCodeBuilder.empty(); - for i = numel(metaclasses):-1:1 - constructor = str2func(metaclasses(i).Name); - builder(i) = constructor(); - end - - isSupported = arrayfun(@(b)b.isSupportedByCurrentEnvironment(), builder); - builder = builder(isSupported); - - if numel(builder) > 1 - builder = builder.sortByPreferability(); - builder = builder(end); - end - end - end -end - diff --git a/+scriptgen/+internal/CodeBuilderLocator.m b/+scriptgen/+internal/CodeBuilderLocator.m deleted file mode 100644 index b6addb6..0000000 --- a/+scriptgen/+internal/CodeBuilderLocator.m +++ /dev/null @@ -1,55 +0,0 @@ -classdef CodeBuilderLocator - % CodeBuilderLocator - Locator of CodeBuilder metaclasses - - % Copyright 2020 The MathWorks, Inc. - - properties (Dependent, Access = private) - ImplementationPackage - InterfacePackage - end - - properties (Access = private) - ImplementationPackageName - InterfacePackageName - end - - methods - function obj = CodeBuilderLocator(implPackage, intfPackage) - if ~ischar(implPackage) || ~ischar(intfPackage) - error('Packages must be provided as character arrays'); - end - obj.ImplementationPackageName = implPackage; - obj.InterfacePackageName = intfPackage; - end - - function p = get.ImplementationPackage(obj) - p = meta.package.fromName(obj.ImplementationPackageName); - end - - function p = get.InterfacePackage(obj) - p = meta.package.fromName(obj.InterfacePackageName); - end - - function metaclasses = locate(obj, type) - if ischar(type) - type = prependPrefix([obj.InterfacePackage.Name '.'], type); - type = meta.class.fromName(type); - end - if isempty(type) - metaclasses = type; - return; - end - classes = obj.ImplementationPackage.ClassList; - classes = classes(classes <= type); - classes = classes(~[classes.Abstract]); - metaclasses = classes; - end - end -end - -function name = prependPrefix(prefix, name) - if isempty(regexp(name, ['^' prefix '\w*'], 'once')) - name = [prefix name]; - end -end - diff --git a/+scriptgen/+internal/MissingCode.m b/+scriptgen/+internal/MissingCode.m deleted file mode 100644 index 06f9524..0000000 --- a/+scriptgen/+internal/MissingCode.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef MissingCode < scriptgen.Code - % Copyright 2020 The MathWorks, Inc. - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(~, ~) - error('Called write on MissingCode'); - end - end -end - diff --git a/+scriptgen/+internal/MissingCodeBuilder.m b/+scriptgen/+internal/MissingCodeBuilder.m deleted file mode 100644 index 70c8d0e..0000000 --- a/+scriptgen/+internal/MissingCodeBuilder.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef MissingCodeBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - methods - function code = build(~) %#ok - error('Called build on MissingCodeBuilder'); - end - end -end - diff --git a/+scriptgen/+internal/PrunedStackException.m b/+scriptgen/+internal/PrunedStackException.m deleted file mode 100644 index 71e7853..0000000 --- a/+scriptgen/+internal/PrunedStackException.m +++ /dev/null @@ -1,49 +0,0 @@ -classdef PrunedStackException < MException - % Copyright 2020 MathWorks, Inc. - - properties(SetAccess=immutable, GetAccess=protected) - PrunedStack - end - - methods - function pruned = PrunedStackException(other, frameToPrune) - if nargin < 2 - % If no frame is specified, prune the frame of the caller - s = dbstack('-completenames'); - if numel(s) > 1 - frameToPrune = rmfield(s(2), 'line'); - else - frameToPrune = struct('file', {}); - end - end - - pruned = pruned@MException(other.identifier, '%s', other.message); - if isprop(pruned, 'type') && isprop(other, 'type') - pruned.type = other.type; - end - for idx = 1:numel(other.cause) - pruned = pruned.addCause(scriptgen.internal.PrunedStackException(other.cause{idx}, frameToPrune)); - end - - stack = other.getStack(); - remove = ismember({stack.file}, {frameToPrune.file}); - if isfield(frameToPrune, 'name') - remove = ismember({stack.name}, {frameToPrune.name}) & remove; - end - if isfield(frameToPrune, 'line') - remove = ismember([stack.line], [frameToPrune.line]) & remove; - end - stack(remove) = []; - - pruned.PrunedStack = stack; - end - end - - methods(Access=protected) - function stack = getStack(pruned) - stack = pruned.PrunedStack; - end - end -end - - diff --git a/+scriptgen/+internal/Version.m b/+scriptgen/+internal/Version.m deleted file mode 100644 index 8572e51..0000000 --- a/+scriptgen/+internal/Version.m +++ /dev/null @@ -1,118 +0,0 @@ -classdef Version - % Version - A MATLAB-style version - % - % Valid versions take the form XXX.XXX.XXX.XXXXXXXXX, where X may be - % a digit only. - % - % Examples of valid versions: - % - % 9 - % 9.7 - % 9.7.0.1261785 - % - % Examples of invalid versions: - % - % 9.1-beta - % R2019a - - % Copyright 2020-2022 The MathWorks, Inc. - - properties (SetAccess = immutable) - Parts - end - - methods - function obj = Version(verstr) - p = sscanf(verstr, '%3d.%3d.%3d.%9d'); - s = strjoin(strtrim(cellstr(num2str(p)))', '.'); - if ~strcmp(s, verstr) - error('scriptgen:Version:invalidFormat', 'invalid verstr format'); - end - p(end+1:4) = 0; - obj.Parts = p(:)'; - end - - function t = eq(a, b) - t = diff(a, b) == 0; - end - - function t = ne(a, b) - t = diff(a, b) ~= 0; - end - - function t = lt(a, b) - t = diff(a, b) < 0; - end - - function t = le(a, b) - t = diff(a, b) <= 0; - end - - function t = gt(a, b) - t = diff(a, b) > 0; - end - - function t = ge(a, b) - t = diff(a, b) >= 0; - end - end - - methods (Access = private) - function d = diff(a, b) - if ~isa(a, 'scriptgen.internal.Version') || ~isa(b, 'scriptgen.internal.Version') - error('incompatible types'); - end - d = a.num - b.num; - end - - function n = num(obj) - n = arrayfun(@(v)str2double(sprintf('%03d%03d%03d%09d', v.Parts)), obj); - end - end - - properties (Access = private, Constant) - ReleaseVersions = map( ... - 'R2022b', '9.13', ... - 'R2022a', '9.12', ... - 'R2021b', '9.11', ... - 'R2021a', '9.10', ... - 'R2020b', '9.9', ... - 'R2020a', '9.8', ... - 'R2019b', '9.7', ... - 'R2019a', '9.6', ... - 'R2018b', '9.5', ... - 'R2018a', '9.4', ... - 'R2017b', '9.3', ... - 'R2017a', '9.2', ... - 'R2016b', '9.1', ... - 'R2016a', '9.0', ... - 'R2015b', '8.6', ... - 'R2015a', '8.5', ... - 'R2014b', '8.4', ... - 'R2014a', '8.3', ... - 'R2013b', '8.2', ... - 'R2013a', '8.1'); - end - - methods (Static) - function v = forRelease(release) - r = scriptgen.internal.Version.ReleaseVersions; - if ~r.isKey(release) - error('scriptgen:Version:unknownRelease', 'unknown release'); - end - v = scriptgen.internal.Version(r(release)); - end - - function v = forCurrentRelease() - s = strsplit(version()); - v = scriptgen.internal.Version(s{1}); - end - end -end - -function m = map(varargin) -m = containers.Map(); -for i = 1:2:numel(varargin) - m(varargin{i}) = varargin{i+1}; -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/isAbsolutePath.m b/+scriptgen/+internal/isAbsolutePath.m deleted file mode 100644 index d25ab5f..0000000 --- a/+scriptgen/+internal/isAbsolutePath.m +++ /dev/null @@ -1,8 +0,0 @@ -function tf = isAbsolutePath(p) -if ispc() - tf = ~isempty(regexp(p, '^.:', 'once')) || strncmp(p, '\\', 2); -else - tf = any(strncmp(p, {'/', '~'}, 1)); -end -end - diff --git a/+scriptgen/+internal/numericVerbosity.m b/+scriptgen/+internal/numericVerbosity.m deleted file mode 100644 index ee7759d..0000000 --- a/+scriptgen/+internal/numericVerbosity.m +++ /dev/null @@ -1,20 +0,0 @@ -function n = numericVerbosity(verbosity) -% Copyright 2022 The MathWorks, Inc. -if isnumeric(verbosity) - n = verbosity; -elseif strcmpi(verbosity, 'none') - n = 0; -elseif strcmpi(verbosity, 'terse') - n = 1; -elseif strcmpi(verbosity, 'concise') - n = 2; -elseif strcmpi(verbosity, 'detailed') - n = 3; -elseif strcmpi(verbosity, 'verbose') - n = 4; -else - warning('scriptgen:numericVerbosity:unknownVerbosity', ... - 'Unknown verbosity level. Defaulting to maximum verbosity.'); - n = 4; -end -end \ No newline at end of file diff --git a/+scriptgen/+internal/unquoteText.m b/+scriptgen/+internal/unquoteText.m deleted file mode 100644 index 18caebe..0000000 --- a/+scriptgen/+internal/unquoteText.m +++ /dev/null @@ -1,11 +0,0 @@ -function u = unquoteText(text) -% Copyright 2020 The MathWorks, Inc. -s = regexp(text, '^''', 'once'); -e = regexp(text, '''$', 'once'); -if isempty(s) || isempty(e) - u = text; -else - u = text(s+1:e-1); -end -end - diff --git a/+scriptgen/+internal/validateText.m b/+scriptgen/+internal/validateText.m deleted file mode 100644 index c7d578e..0000000 --- a/+scriptgen/+internal/validateText.m +++ /dev/null @@ -1,9 +0,0 @@ -function validateText(value) -% Copyright 2020 The MathWorks, Inc. -if ischar(value) - scriptgen.internal.validateTextScalar(value); -else - scriptgen.internal.validateTextArray(value); -end -end - diff --git a/+scriptgen/+internal/validateTextArray.m b/+scriptgen/+internal/validateTextArray.m deleted file mode 100644 index aff6396..0000000 --- a/+scriptgen/+internal/validateTextArray.m +++ /dev/null @@ -1,7 +0,0 @@ -function validateTextArray(value) -% Copyright 2020 The MathWorks, Inc. -if ~iscellstr(value) || ~(isempty(value) || isvector(value)) %#ok - error('MATLAB:invalidType', 'Expected input to be cellstr vector'); -end -end - diff --git a/+scriptgen/+internal/validateTextScalar.m b/+scriptgen/+internal/validateTextScalar.m deleted file mode 100644 index 7aca2ad..0000000 --- a/+scriptgen/+internal/validateTextScalar.m +++ /dev/null @@ -1,7 +0,0 @@ -function validateTextScalar(value) -% Copyright 2020 The MathWorks, Inc. -if isempty(value) && ischar(value) - return; -end -validateattributes(value, {'char'}, {'vector'}); -end diff --git a/+scriptgen/+internal/validateVerbosityScalar.m b/+scriptgen/+internal/validateVerbosityScalar.m deleted file mode 100644 index 6f555b3..0000000 --- a/+scriptgen/+internal/validateVerbosityScalar.m +++ /dev/null @@ -1,9 +0,0 @@ -function validateVerbosityScalar(value) -% Copyright 2022 The MathWorks, Inc. -if ischar(value) - scriptgen.internal.validateTextScalar(value); -else - validateattributes(value, {'numeric'}, {'scalar'}); -end -end - diff --git a/+scriptgen/+scripts/TestScriptBuilder.m b/+scriptgen/+scripts/TestScriptBuilder.m deleted file mode 100644 index 10992f3..0000000 --- a/+scriptgen/+scripts/TestScriptBuilder.m +++ /dev/null @@ -1,122 +0,0 @@ -classdef TestScriptBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - WorkingFolder = '' - PDFTestReport = '' - HTMLTestReport = '' - TAPTestResults = '' - JUnitTestResults = '' - SimulinkTestResults = '' - CoberturaCodeCoverage = '' - HTMLCodeCoverage = '' - CoberturaModelCoverage = '' - HTMLModelCoverage = '' - SourceFolder = '' - SelectByFolder = '' - SelectByTag = '' - LoggingLevel = '' - OutputDetail = '' - Strict = false - UseParallel = false - SelectByName = {} - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.WorkingFolder(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.WorkingFolder = value; - end - - function set.PDFTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.PDFTestReport = value; - end - - function set.HTMLTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLTestReport = value; - end - - function set.TAPTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.TAPTestResults = value; - end - - function set.JUnitTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.JUnitTestResults = value; - end - - function set.SimulinkTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SimulinkTestResults = value; - end - - function set.CoberturaCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaCodeCoverage = value; - end - - function set.HTMLCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLCodeCoverage = value; - end - - function set.CoberturaModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaModelCoverage = value; - end - - function set.HTMLModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLModelCoverage = value; - end - - function set.SourceFolder(obj, value) - scriptgen.internal.validateText(value); - obj.SourceFolder = value; - end - - function set.SelectByFolder(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByFolder = value; - end - - function set.SelectByTag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SelectByTag = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - - function set.Strict(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.Strict = value; - end - - function set.UseParallel(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.UseParallel = value; - end - function set.SelectByName(obj, value) - scriptgen.internal.validateText(value); - obj.SelectByName = value; - end - end -end - diff --git a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m b/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m deleted file mode 100644 index 760eadb..0000000 --- a/+scriptgen/+sequences/+test/AssertNoFailuresSequenceBuilder.m +++ /dev/null @@ -1,20 +0,0 @@ -classdef AssertNoFailuresSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - ResultsName = 'results' - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.ResultsName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.ResultsName = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m deleted file mode 100644 index b714b97..0000000 --- a/+scriptgen/+sequences/+test/CreateTestRunnerSequenceBuilder.m +++ /dev/null @@ -1,104 +0,0 @@ -classdef CreateTestRunnerSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - RunnerName = 'runner' - PDFTestReport = '' - HTMLTestReport = '' - TAPTestResults = '' - JUnitTestResults = '' - SimulinkTestResults = '' - CoberturaCodeCoverage = '' - HTMLCodeCoverage = '' - CoberturaModelCoverage = '' - HTMLModelCoverage = '' - SourceFolder = {} - LoggingLevel = '' - OutputDetail = '' - Strict = false - UseParallel = false - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.RunnerName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.RunnerName = value; - end - - function set.PDFTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.PDFTestReport = value; - end - - function set.HTMLTestReport(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLTestReport = value; - end - - function set.TAPTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.TAPTestResults = value; - end - - function set.JUnitTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.JUnitTestResults = value; - end - - function set.SimulinkTestResults(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SimulinkTestResults = value; - end - - function set.CoberturaCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaCodeCoverage = value; - end - - function set.HTMLCodeCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLCodeCoverage = value; - end - - function set.CoberturaModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.CoberturaModelCoverage = value; - end - - function set.HTMLModelCoverage(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.HTMLModelCoverage = value; - end - - function set.SourceFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.SourceFolder = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - - function set.Strict(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.Strict = value; - end - - function set.UseParallel(obj, value) - validateattributes(value, {'logical','numeric'}, {'scalar'}); - obj.UseParallel = value; - end - end -end \ No newline at end of file diff --git a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m b/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m deleted file mode 100644 index 5cecd32..0000000 --- a/+scriptgen/+sequences/+test/CreateTestSuiteSequenceBuilder.m +++ /dev/null @@ -1,39 +0,0 @@ -classdef CreateTestSuiteSequenceBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - CodeProvider = scriptgen.CodeProvider.default() - SuiteName = 'suite' - SelectByFolder = {} - SelectByTag = '' - SelectByName = {} - end - - methods - function set.CodeProvider(obj, value) - validateattributes(value, {'scriptgen.CodeProvider'}, {'scalar'}); - obj.CodeProvider = value; - end - - function set.SuiteName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SuiteName = value; - end - - function set.SelectByFolder(obj, value) - scriptgen.internal.validateTextArray(value); - obj.SelectByFolder = value; - end - - function set.SelectByTag(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SelectByTag = value; - end - - function set.SelectByName(obj, value) - scriptgen.internal.validateTextArray(value); - obj.SelectByName = value; - end - end -end - diff --git a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m deleted file mode 100644 index d641f2c..0000000 --- a/+scriptgen/+statements/+test/CreateTestRunnerStatementBuilder.m +++ /dev/null @@ -1,27 +0,0 @@ -classdef CreateTestRunnerStatementBuilder < scriptgen.CodeBuilder - % Copyright 2020-2022 The MathWorks, Inc. - - properties - RunnerName = 'runner' - LoggingLevel = 'terse' - OutputDetail = 'concise' - end - - methods - function set.RunnerName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.RunnerName = value; - end - - function set.LoggingLevel(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.LoggingLevel = value; - end - - function set.OutputDetail(obj, value) - scriptgen.internal.validateVerbosityScalar(value); - obj.OutputDetail = value; - end - end -end - diff --git a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m b/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m deleted file mode 100644 index 041aff8..0000000 --- a/+scriptgen/+statements/+test/CreateTestSuiteStatementBuilder.m +++ /dev/null @@ -1,15 +0,0 @@ -classdef CreateTestSuiteStatementBuilder < scriptgen.CodeBuilder - % Copyright 2020 The MathWorks, Inc. - - properties - SuiteName = 'suite' - end - - methods - function set.SuiteName(obj, value) - scriptgen.internal.validateTextScalar(value); - obj.SuiteName = value; - end - end -end - diff --git a/+scriptgen/Code.m b/+scriptgen/Code.m deleted file mode 100644 index e142341..0000000 --- a/+scriptgen/Code.m +++ /dev/null @@ -1,38 +0,0 @@ -classdef Code < matlab.mixin.Heterogeneous - % Code - Base class for all classes writable by CodeWriter - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Contents - end - - methods - function contents = get.Contents(obj) - import scriptgen.TextOutput; - stream = TextOutput(); - obj.writeToStream(stream); - contents = stream.Text; - end - end - - methods (Abstract, Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - write(obj, writer) - end - - methods (Access = protected) - function writeToStream(obj, stream) - import scriptgen.CodeWriter; - writer = CodeWriter(stream); - close = onCleanup(@()writer.close()); - obj.write(writer); - end - end - - methods (Static, Sealed, Access = protected) - function builder = getDefaultScalarElement() - builder = scriptgen.internal.MissingCode(); - end - end -end - diff --git a/+scriptgen/CodeBuilder.m b/+scriptgen/CodeBuilder.m deleted file mode 100644 index 893213c..0000000 --- a/+scriptgen/CodeBuilder.m +++ /dev/null @@ -1,18 +0,0 @@ -classdef CodeBuilder < matlab.mixin.Heterogeneous & scriptgen.internal.mixin.SetGet ... - & scriptgen.internal.mixin.EnvironmentDependent ... - & scriptgen.internal.mixin.Preferable - % CodeBuilder - Base class for builders of immutable code objects - - % Copyright 2020 The MathWorks, Inc. - - methods (Abstract) - code = build(obj) - end - - methods (Static, Sealed, Access = protected) - function builder = getDefaultScalarElement() - builder = scriptgen.internal.MissingCodeBuilder(); - end - end -end - diff --git a/+scriptgen/CodeProvider.m b/+scriptgen/CodeProvider.m deleted file mode 100644 index fd64af5..0000000 --- a/+scriptgen/CodeProvider.m +++ /dev/null @@ -1,128 +0,0 @@ -classdef CodeProvider < handle - % CodeProvider - Provider of immutable code objects - % - % The scriptgen.CodeProvider class serves as the primary interface - % for creating pre-made code objects. To create code objects the - % CodeProvider utilizes builders under the following packages: - % - % scriptgen.expressions - Expression builders - % scriptgen.scripts - Script builders - % scriptgen.sequences - Sequence builders - % scriptgen.statements - Statement builders - % - % To locate a builder, the CodeProvider relies on the builder's class - % name. For example, when called to create a Script of type 'Test', - % the CodeProvider will look for a Script builder under - % scriptgen.scripts with the class name 'TestScriptBuilder'. It will - % then utilize an internal implementation of that builder to create - % the requested Script object. - % - % Builders may also exist under subpackages. To access builders under - % subpackages, a new CodeProvider must be instantiated with the - % subpackage name. The withSubpackage method is a convenience for - % instantiating new providers off an existing provider. - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = private) - Subpackage - end - - properties (Access = private) - ExpressionBuilderFactory - StatementBuilderFactory - SequenceBuilderFactory - ScriptBuilderFactory - end - - methods - function obj = CodeProvider(subpackage) - import scriptgen.internal.validateTextScalar; - - if nargin < 1 - subpackage = ''; - end - validateTextScalar(subpackage); - - obj.ExpressionBuilderFactory = obj.createFactory('expressions', subpackage); - obj.StatementBuilderFactory = obj.createFactory('statements', subpackage); - obj.SequenceBuilderFactory = obj.createFactory('sequences', subpackage); - obj.ScriptBuilderFactory = obj.createFactory('scripts', subpackage); - - obj.Subpackage = subpackage; - end - - function expression = createExpression(obj, type, varargin) - type = appendSuffix(type, 'ExpressionBuilder'); - expression = obj.createCode(obj.ExpressionBuilderFactory, type, varargin{:}); - end - - function statement = createStatement(obj, type, varargin) - type = appendSuffix(type, 'StatementBuilder'); - statement = obj.createCode(obj.StatementBuilderFactory, type, varargin{:}); - end - - function sequence = createSequence(obj, type, varargin) - type = appendSuffix(type, 'SequenceBuilder'); - sequence = obj.createCode(obj.SequenceBuilderFactory, type, varargin{:}); - end - - function script = createScript(obj, type, varargin) - type = appendSuffix(type, 'ScriptBuilder'); - script = obj.createCode(obj.ScriptBuilderFactory, type, varargin{:}); - end - - function provider = withSubpackage(obj, subpackage) - import scriptgen.CodeProvider; - - sub = pkgjoin({obj.Subpackage, subpackage}); - provider = CodeProvider(sub); - end - end - - methods (Access = private) - function factory = createFactory(~, type, subpackage) - import scriptgen.internal.CodeBuilderLocator; - import scriptgen.internal.CodeBuilderFactory; - - implPackage = pkgjoin({'scriptgen.internal', type, subpackage}); - intfPackage = pkgjoin({'scriptgen', type, subpackage}); - - locator = CodeBuilderLocator(implPackage, intfPackage); - factory = CodeBuilderFactory(locator); - end - - function code = createCode(~, factory, type, varargin) - builder = factory.create(type); - if isempty(builder) - code = scriptgen.internal.MissingCode.empty(); - return; - end - if ~isempty(varargin) - set(builder, varargin{:}); - end - code = builder.build(); - end - end - - methods (Static) - function provider = default() - persistent singleton; - if isempty(singleton) - singleton = scriptgen.CodeProvider(); - end - provider = singleton; - end - end -end - -function name = appendSuffix(name, suffix) -if isempty(regexp(name, ['\w*' suffix '$'], 'once')) - name = [name suffix]; -end -end - -function p = pkgjoin(names) -tf = cellfun(@(n)~isempty(n), names); -p = strjoin(names(tf), '.'); -end \ No newline at end of file diff --git a/+scriptgen/CodeWriter.m b/+scriptgen/CodeWriter.m deleted file mode 100644 index 76862c8..0000000 --- a/+scriptgen/CodeWriter.m +++ /dev/null @@ -1,64 +0,0 @@ -classdef CodeWriter < handle - % CodeWriter - Writes code objects in to code - - % Copyright 2020 The MathWorks, Inc. - - properties (Access = private) - OutputStream - WhitespaceBuffer - end - - methods - function obj = CodeWriter(stream) - validateattributes(stream, {'scriptgen.OutputStream'}, {'scalar'}); - obj.OutputStream = stream; - end - - function writeExpression(obj, expression) - obj.flushWhitespaceBuffer(); - expression.write(obj); - end - - function writeStatement(obj, statement) - obj.flushWhitespaceBuffer(); - statement.write(obj); - obj.bufferNewLine(); - end - - function writeSequence(obj, sequence) - obj.flushWhitespaceBuffer(); - sequence.write(obj); - obj.bufferNewLine(); - end - - function writeScript(obj, script) - obj.flushWhitespaceBuffer(); - script.write(obj); - end - - function close(obj) - obj.OutputStream.close(); - end - end - - methods (Access = {?scriptgen.Code}) - function write(obj, format, varargin) - text = sprintf(format, varargin{:}); - obj.OutputStream.write(text); - end - end - - methods (Access = private) - function bufferNewLine(obj) - obj.WhitespaceBuffer = strcat(obj.WhitespaceBuffer, '\n'); - end - - function flushWhitespaceBuffer(obj) - if ~isempty(obj.WhitespaceBuffer) - obj.write(obj.WhitespaceBuffer); - obj.WhitespaceBuffer = []; - end - end - end -end - diff --git a/+scriptgen/Expression.m b/+scriptgen/Expression.m deleted file mode 100644 index b8719db..0000000 --- a/+scriptgen/Expression.m +++ /dev/null @@ -1,42 +0,0 @@ -classdef Expression < scriptgen.Code - % Expression - A unit of code that returns a value - % - % Expressions are typically located in statements on the right- or - % left-hand side of an equals sign. - % - % Example expressions: - % - % 1 + 2 - % zeros(5,1) - % A(1:3,2) - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Text - RequiredImports - end - - methods - function obj = Expression(text, imports) - if nargin < 2 - imports = {}; - end - if ischar(imports) - imports = {imports}; - end - scriptgen.internal.validateTextScalar(text); - scriptgen.internal.validateTextArray(imports); - - obj.Text = text; - obj.RequiredImports = imports; - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - writer.write('%s', obj.Text); - end - end -end - diff --git a/+scriptgen/FileOutput.m b/+scriptgen/FileOutput.m deleted file mode 100644 index 84110e5..0000000 --- a/+scriptgen/FileOutput.m +++ /dev/null @@ -1,22 +0,0 @@ -classdef FileOutput < scriptgen.OutputStream - % Copyright 2020 The MathWorks, Inc. - - properties (GetAccess = private, SetAccess = immutable) - Fid - end - - methods - function obj = FileOutput(filename) - obj.Fid = fopen(filename, 'w'); - end - - function write(obj, text) - fprintf(obj.Fid, '%s', text); - end - - function close(obj) - fclose(obj.Fid); - end - end -end - diff --git a/+scriptgen/OutputStream.m b/+scriptgen/OutputStream.m deleted file mode 100644 index 1e2ced0..0000000 --- a/+scriptgen/OutputStream.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef OutputStream < handle - % Copyright 2020 The MathWorks, Inc. - - methods - function close(~) - % Available for subclasses to override - end - end - - methods (Abstract) - write(obj, text); - end -end - diff --git a/+scriptgen/Script.m b/+scriptgen/Script.m deleted file mode 100644 index 9311181..0000000 --- a/+scriptgen/Script.m +++ /dev/null @@ -1,83 +0,0 @@ -classdef Script < scriptgen.Code - % Script - A collection of statements organized in to sequences - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Sequences - end - - methods - function obj = Script(sequences) - import scriptgen.Sequence; - - if iscellstr(sequences) || (ischar(sequences) && isvector(sequences)) %#ok - sequences = Sequence(sequences); - end - - validateattributes(sequences, {'scriptgen.Sequence'}, {'vector'}); - - obj.Sequences = sequences; - end - - function file = writeToFile(obj, file) - import scriptgen.FileOutput; - [~,~] = mkdir(fileparts(file)); - stream = FileOutput(file); - obj.writeToStream(stream); - end - - function text = writeToText(obj) - % DEPRECATED - Use the Contents property - text = obj.Contents; - end - - function run(obj) - % RUN - Run script - % - % RUN(SCRIPT) runs the code contents of the SCRIPT in the callers - % workspace as if it were executed from a script file on disk. - % - % This method is roughly equivalent to writing the contents of the - % SCRIPT to a file in the current working directory and executing - % the file by typing its name. - - tempFolder = tempname(); - [~, name] = fileparts(tempFolder); - scriptName = ['tempscript_' name(end-3:end)]; - scriptPath = fullfile(tempFolder, [scriptName '.m']); - - obj.writeToFile(scriptPath); - oldPath = addpath(tempFolder); - - restoreState = onCleanup(@()cleanup(oldPath, tempFolder)); - function cleanup(p, f) - path(p); - rmdir(f, 's'); - end - - try - evalin('caller', strcat(scriptName, ';')); - catch e - throw(scriptgen.internal.PrunedStackException(e)); - end - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - import scriptgen.Sequence; - import scriptgen.Statement; - - imports = sort(unique([obj.Sequences.RequiredImports])); - if ~isempty(imports) - importText = cellfun(@(i)sprintf('import %s;', i), imports, 'UniformOutput', false); - writer.writeSequence(Sequence(importText)); - end - - for sequence = obj.Sequences - writer.writeSequence(sequence); - end - end - end -end \ No newline at end of file diff --git a/+scriptgen/Sequence.m b/+scriptgen/Sequence.m deleted file mode 100644 index 8be416e..0000000 --- a/+scriptgen/Sequence.m +++ /dev/null @@ -1,43 +0,0 @@ -classdef Sequence < scriptgen.Code - % Sequence - A collection of statements that achieve a task - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Statements - RequiredImports - end - - methods - function obj = Sequence(statements) - import scriptgen.Statement; - - if iscellstr(statements) || (ischar(statements) && isvector(statements)) %#ok - statements = Statement(statements); - end - validateattributes(statements, {'scriptgen.Statement'}, {'vector'}); - - obj.Statements = statements; - - % unique may return 0x1 cell array, valueOrElse ensures it is - % converted to a 0x0 cell array. - obj.RequiredImports = valueOrElse(unique([statements.RequiredImports]), {}); - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - for s = obj.Statements - writer.writeStatement(s); - end - end - end -end - -function v = valueOrElse(value, default) -if ~isempty(value) - v = value; -else - v = default; -end -end \ No newline at end of file diff --git a/+scriptgen/Statement.m b/+scriptgen/Statement.m deleted file mode 100644 index 99d3a42..0000000 --- a/+scriptgen/Statement.m +++ /dev/null @@ -1,55 +0,0 @@ -classdef Statement < scriptgen.Code - % Statement - A unit of code that executes an action - % - % Statements are typically terminated with a semicolon. - % - % Example statements: - % - % a = 1 + 2; - % disp('hello world'); - % z = zeros(5,1); - - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = immutable) - Text - RequiredImports - end - - methods - function obj = Statement(text, imports) - import scriptgen.internal.validateTextArray; - import scriptgen.internal.validateTextArray; - - if nargin < 2 - imports = {}; - end - if ischar(text) - text = {text}; - end - if ischar(imports) - imports = {imports}; - end - validateTextArray(text); - validateTextArray(imports); - - % Support array construction. - m = size(text, 1); - n = size(text, 2); - obj(1:m,1:n) = obj; - for i = 1:m - for j = 1:n - obj(i,j).Text = text{i,j}; - obj(i,j).RequiredImports = imports; - end - end - end - end - - methods (Access={?scriptgen.CodeWriter, ?scriptgen.Code}) - function write(obj, writer) - writer.write('%s', obj.Text); - end - end -end - diff --git a/+scriptgen/TextOutput.m b/+scriptgen/TextOutput.m deleted file mode 100644 index 50e3dee..0000000 --- a/+scriptgen/TextOutput.m +++ /dev/null @@ -1,14 +0,0 @@ -classdef TextOutput < scriptgen.OutputStream - % Copyright 2020 The MathWorks, Inc. - - properties (SetAccess = private) - Text - end - - methods - function write(obj, text) - obj.Text = [obj.Text sprintf('%s', text)]; - end - end -end - diff --git a/genscript.m b/genscript.m deleted file mode 100644 index e672aa9..0000000 --- a/genscript.m +++ /dev/null @@ -1,26 +0,0 @@ -function script = genscript(type, varargin) -% genscript - Generates a script -% -% The genscript function provides a convenient way to generate a pre-made -% script object. -% -% SCRIPT = genscript(TYPE) generates and returns a script of TYPE. TYPE -% must be a character vector and match the name of a script builder -% located in the scriptgen.scripts package. -% -% SCRIPT = genscript(TYPE, NAME, VALUE, ...) generates and returns a -% script of TYPE setting those name-value pairs on the script builder. -% -% Examples: -% -% testScript = genscript('Test', 'JUnitTestResults', 'results.xml'); -% writeToFile(testScript, 'myscript.m'); - -% Copyright 2020 The MathWorks, Inc. - -import scriptgen.CodeProvider; - -provider = CodeProvider.default(); -script = provider.createScript(type, varargin{:}); -end - diff --git a/tests/baseline_API.mat b/tests/baseline_API.mat deleted file mode 100644 index df831f7fcd53f9e22e5ea8b4de8343be037579d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220520 zcmeI5e~?_)Rp)POtauX3q3wi3Nl55K`7tDp-L_?0c7C|W(%7TevO5~tRsxB-HPfRR zJerwI_he;uVLMB)D<}#Ec57GsC`y0o4+@3?3bRXrsQ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AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq z5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH* zAOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}f!##l)X9;NoXfe} z!RDIXuX5#7u06x#g4A{y#z=q!NPq-LfCP2{fm=`Sf{WlKkN^pg011!)36KB@kN^pg z011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!) z36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@ zkN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg z011!)36KB@kN^pg011#l&je1L92v>EoVy)tuGziF!k^~aGfXZ>ZI@w;1W14cNPq-L zU>6X$_4F>d2wnmSkN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg z011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!) z36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@ zkN^pg011!)36KB@kN^pg011!)36KB@kN^pg011!)36KB@kN^pg015O=Am{FOIluRi z{PA1P4QaSf6D--iB}$ci-4Gve`6w;#lkbYM3en&FZZJyUm(zjn&*(Ck>uU(%!;6^Qeug@8DCx%bGF#OD!@tJD9E*bCe|G(A$7kSynrq3_V zOwYddVDzKfn4X(GR&7)tlt1-a!yRy?NG|8T+5c{pH+S|sYvYYG6SeWViJA!H{b?kx z2jve$d&}|UpVO=H;eDQiY|St0m0Yf9cB1T ziys`(c*WwEUe@?Ui!<2S1fajmb{R_+p8l-XbI$E=vy*wVlPjOs{Jbf2n%spis@zI| zDd%ms>>BSM^(!uy(*jj1okN)Hr_|P#q7pm%DJ@6jyKSBQ(~(Fl=k87RC$;nQjn^eZ zO3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nB!{xYf5Bd%Ij~?0{+TcIpzP(`AUV2&e0w}`vk9lUa zXZR!A1~Y=?W*!@w%i5V5%'}) - function test6(~) - end - end - - methods (Test, TestTags = {'>'}) - function test7(~) - end - end - - methods (Test, TestTags = {''}) - function test8(~) - end - end - - methods (Test, TestTags = {'.*'}) - function test9(~) - end - end - - methods (Test, TestTags = {'*'}) - function test10(~) - end - end - - methods (Test, TestTags = {''}) - function test12(~) - end - end -end \ No newline at end of file diff --git a/tests/folderA/Copy_2_of_testModelSim.m b/tests/folderA/Copy_2_of_testModelSim.m deleted file mode 100644 index b47ceda..0000000 --- a/tests/folderA/Copy_2_of_testModelSim.m +++ /dev/null @@ -1,59 +0,0 @@ -classdef Copy_2_of_testModelSim < matlab.unittest.TestCase - %TESTMODELSIM Summary of this class goes here - % Detailed explanation goes here - properties - temp; - ogDir; - end - methods(TestClassSetup) - function testClassSetup(testCase) - sltest.testmanager.clear; - sltest.testmanager.clearResults; - testCase.ogDir = pwd; - testCase.temp = fullfile(pwd, 'temp'); - mkdir(testCase.temp); - matlab.unittest.fixtures.PathFixture(testCase.temp); - cd(testCase.temp); - end - end - - methods(TestClassTeardown) - function teardown(testCase) - sltest.testmanager.clear; - sltest.testmanager.clearResults; - sltest.testmanager.close; - A = dir(testCase.temp); - for k = 3:length(A) - delete([testCase.temp filesep A(k).name]) - end - cd(testCase.ogDir); - rmdir(testCase.temp); - end - end - - methods(Test) - function testSquare(testCase) - %TESTCALC Construct an instance of this class - % Detailed explanation goes here - - % Introduce a random delay between 1 and 5 seconds - pause(3); - - % Change directory to the root where the model is located - rootDir = fileparts(testCase.ogDir); % Assuming the root is one level up from the test directory - cd(rootDir); - - tf = sltest.testmanager.TestFile('test.mldatx'); - ts = tf.getTestSuites; - tc = ts.getTestCases; - tc.setProperty('model', 'sampleModel.slx'); - captureBaselineCriteria(tc,'baseline_API.mat',true); - res = tc.run(); - - % Change back to the original directory - cd(testCase.ogDir); - - testCase.verifyEqual(res.Outcome, sltest.testmanager.TestResultOutcomes.Passed); - end - end -end \ No newline at end of file diff --git a/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m b/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m deleted file mode 100644 index f1b2259..0000000 --- a/tests/folderA/HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags.m +++ /dev/null @@ -1,17 +0,0 @@ -classdef HasNoAncestorClassTagsButHasTestMethodsWithAndWithoutTags < matlab.unittest.TestCase - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'a', 'b'}) - function test1(~) - end - end - - methods (Test) - function testNoTags1(~) - end - function testNoTags2(~) - end - end - -end \ No newline at end of file diff --git a/tests/folderA/HasSealedTestTags.m b/tests/folderA/HasSealedTestTags.m deleted file mode 100644 index 390087a..0000000 --- a/tests/folderA/HasSealedTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef HasSealedTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Sealed, Test, TestTags = {'Sealed'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/folderA/HasUnsealedTestTags.m b/tests/folderA/HasUnsealedTestTags.m deleted file mode 100644 index c89b46a..0000000 --- a/tests/folderA/HasUnsealedTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef HasUnsealedTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'Unsealed'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/folderA/SimpleTestCase.m b/tests/folderA/SimpleTestCase.m deleted file mode 100644 index 7aa5e4c..0000000 --- a/tests/folderA/SimpleTestCase.m +++ /dev/null @@ -1,54 +0,0 @@ -classdef SimpleTestCase < matlab.unittest.TestCase - % Basic simple testcase class meant to ensure that TestRunner correctly - % runs TestCase tests - - % Copyright 2012 The MathWorks, Inc. - methods(TestClassSetup) - function beforeClass(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestClassTeardown) - function afterClass(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestMethodSetup) - function before(testCase) - testCase.callAllPassingQualifications(); - end - end - methods(TestMethodTeardown) - function after(testCase) - testCase.callAllPassingQualifications(); - end - end - - % lets have two tests to ensure correct invocation counts of class level & - % method level setup - methods(Test) - - function test1(testCase) - testCase.callAllPassingQualifications(); - end - - function test2(testCase) - testCase.callAllPassingQualifications(); - end - end - - methods - function helperMethod(~) - end - function callAllPassingQualifications(testCase) - testCase.verifyTrue(true); - testCase.assertTrue(true); - testCase.fatalAssertTrue(true); - testCase.assumeTrue(true); - end - - end - - -end - diff --git a/tests/folderA/SuperclassHasTestMethodTestTags.m b/tests/folderA/SuperclassHasTestMethodTestTags.m deleted file mode 100644 index d6a4891..0000000 --- a/tests/folderA/SuperclassHasTestMethodTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef SuperclassHasTestMethodTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test, TestTags = {'Original'}) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m b/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m deleted file mode 100644 index c43bb34..0000000 --- a/tests/folderA/SuperclassHasTestMethodWithNoTestTags.m +++ /dev/null @@ -1,10 +0,0 @@ -classdef SuperclassHasTestMethodWithNoTestTags < matlab.unittest.TestCase - % Test double - - % Copyright 2014 The MathWorks, Inc. - - methods (Test) - function test1(~) - end - end -end \ No newline at end of file diff --git a/tests/folderA/dummyClassName.m b/tests/folderA/dummyClassName.m deleted file mode 100644 index 79c6eee..0000000 --- a/tests/folderA/dummyClassName.m +++ /dev/null @@ -1,13 +0,0 @@ -classdef dummyClassName < matlab.unittest.TestCase - - % Copyright 2019 The MathWorks, Inc. - - methods (Test) - - function test2(~) - disp('calling from folder A'); - end - - end - -end diff --git a/tests/folderA/sampleFunctionTest.m b/tests/folderA/sampleFunctionTest.m deleted file mode 100644 index d0c1b84..0000000 --- a/tests/folderA/sampleFunctionTest.m +++ /dev/null @@ -1,12 +0,0 @@ -function tests = sampleFunctionTest - -% Copyright 2021 The MathWorks, Inc. - -tests = functiontests(localfunctions); -end - -function testFunction1(~) -end - -function testFunction2(~) -end diff --git a/tests/folderA/sampleModel.slx b/tests/folderA/sampleModel.slx deleted file mode 100644 index d4b10b0e64ffc761bd7b29d3718fc7944ae057b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21064 zcmaHzV{~Qj^5C$+HddQ~qdZ309{-KxON9(#F%h3#i^`o4h~}2*&Pk^0N!0gmA6v!WN?sZ^9ptpruJHX+}a77^s;K8=EUD}y&u;$=_+#M@QLw3 z;Ex8H5&~49U2I&~8_5@+!(a&NiE6{4RGxEOC&XYEly#2Qv}26$DxEjGl-9#JF-R0e zn5`2>rnj}XiVoS1dmGKRw?Rz%C3Lrx#5mwG*+m25v1&!cwZYNL-}qj$IWa#KQ|;F= zLw*v5+La)?;l_^8ZhiM+2m&eomsg~AOpIFo^$K%vARySkUSZ$_uyJN&_}6bq@`U^V z6Ox!8`F*z|3KGa-Q&!+2I7;9>@PcWkW&~k_-uf3mLO2Iv>$ypW?o5}2J4#%cjy~j0 zIeZccxg%BrkQjwCMP#xMy}m>o85712gl4q#M0^|+S;_;%Uws|eDl7mHa}rr;Y3n7{ z5(?UcAm|d2z2uZdykFjn;A-(|ibQgSrvc|JkY`>H4}9cNPE%U}5f>X$wb)G*Ep{Op23|YN3JZIjz9_>OKAWzme*V{Fv5S1i)V9vV37UdpUEmgHUnh`ixEN^g*0kv z?+7b?`lrQB;9X!(WTxf2=Pr9uGF)F(XV{P9Iy@Kt^zh0Z$vu8OzP#>G3|rqft(#~$ zV9q>*%S@{lo7*H^F@zUnu6<(e?qq%4#0%_;`U=F@TafBc^&F7oeK|OU{BI(@I7Lxv ze~EN~00H6tC1MM3F)}rBF=8~acLFFn**gH7Tr2_3|BBZ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!_rmpyQzs|3;vfVC;2;LnA;XvsaV{8Gl?;MF^(zdzDX{|d4J|B41QnPt(H~j@ z%SZhp@ry3@lO7X9g6c*X=^?cOxmxQ8LO_8J49SBU>*csWxetf|UsZ)MicqP)j9I?1 zPcN>55U{I@42PRD$t{^Q{ zo?N;ikO(#}Ffqo63-N2M42T7L4j8Ly%mw?E4g{ovg+EN?aH9fk07wH1cbInmUtD5b xUB-hju=0js()+o*@&Ij%D3)M9WAq(x!lI9EF{sxO5_p1N^ diff --git a/tests/folderB/dummyClassName.m b/tests/folderB/dummyClassName.m deleted file mode 100644 index 465c262..0000000 --- a/tests/folderB/dummyClassName.m +++ /dev/null @@ -1,13 +0,0 @@ -classdef dummyClassName < matlab.unittest.TestCase - - % Copyright 2019 The MathWorks, Inc. - - methods (Test) - - function test2(~) - disp('calling from folder B'); - end - - end - -end diff --git a/tests/test.mldatx b/tests/test.mldatx deleted file mode 100644 index 00e03a41b6bee3153619efaeceb9765c6778fc01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6655 zcmcJU2UJsCw#P&7Rf=?w7LY*by&I$nq4$=MP(uw;qzP1FN>_Yr^%et5fKjhU$ve$aS@SYS0=k;G@`?_x6>f3wXOzrKTAQO0f7G^e zK}&MfrhKdCdGcFxyjhenbZvZ+)V(t1D{CylFZjP1$rPqZ{&0;Plu0Njv$;u|B%l6% zjpn-wjUsJ=XfII6$>yuk>F9!9&JaQW`Io%%&qczc;H0y_hfc=C>>OzLgO{>Q--*-X zdZYyk{h_}RwcM*^RKgPN#S$gM61DR|xciC-|9sDxRP~Gi(-G~q<`u59X?Lxg-_W;O zMrCcaDGcE;7x1ETzHgi9-+P4b@BZj$RAlE6Wcsp!YsvY=8^I!l1fVJ}n#&|(eDn+y zP|_<0C6KUm(9m}lumJJLQ@MAZT(cS)q0K9F*KqsX!r1@fSv3L624zN=K)p-XNzrq2 zA{Y^Ujm$mdYip;m)w{{ILKcinlA94msgcje5E4tleOfIGKEe^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`Yz3TL1!5irE zNXZyMuzUSfM4?c9;8`MS(nHTsXwsE3H?*+yQmJUK&7XUYrLl-T`TmRwBmgVZ`MP*| z{ES7LM0wh7PCCHpbr>UjY8cy!6t{BY#Ks4x%a?ZC_`Ro2vcewq@y?6D- zuQ8_QPcD*I7##%5RYj*h>||;RjJc;IYFOhY?!vf@#~zsnF2>;wjIlPZ(|4KmVfRa7 zfO&8o##6yx*Ea^^Dyqe_(Lsj8&d<3EPOZnJxNnT?+t1!_>TD4T$FU|Tt0bt>$aF)R zLgQL!pe7n$MY6SiguOwE{2l_fI$M|?>_bXpLjd?^4{L~UM>zQYU99m-9Hxu_Q{UZD z=o@UWqchOdj$`z+ja?h(H0C-hfvl{|kzN&9M0RB5*f4a=66UIvmhN1e^NXb@96BxB z_>z*tegv$7dsNe_d1V_y{Tgi>W}NFxy$1Tf&JS6ts*xO4B*$tvY6H}Q_BU-mU1zKv z1p%b+^b}*{dJ96YerM_4?Y^ahL75Ic)v=()%Z!-MMJU{lP$)?u+U09Y#j^ZF;M>}3O& zWyhZ*|7O4td-(?u^76pTLfWr^%~%ir9kSZx886FDzh*qgHc9{A8UGz3)Md{uYc;<- zgJBh%f466ULAkl?=;bZNFGn4*n)AQi(aU}4Wp^$&xWC*%Q2YgV{;z2+SLa{TP|^Hp zt-kE<<=XShP!R1u82V?G=(4HH3Hz6+WbFSbfA1eIoBAz%U$%KUFaEL_g3TEJ(&nWs W3DqGW{5g^gd%*DlfN1)kpZ*J;1;SAP From 4066c58feca3662f8eaf052145b3b01b342f3599 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 2 Sep 2024 00:47:00 +0530 Subject: [PATCH 44/55] Cleaning repo --- src/scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index bf917f3..384a96d 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -66,7 +66,7 @@ selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{ printf "\047%s\047%s", $i, (i==NF ? "" : ", "); } }') -selectByName="{$selectByName}" +selectByName="{$selectByName}" "${tmpdir}/bin/run-matlab-command$binext" "\ addpath('${gendir}/scriptgen');\ From 13aad347bd6f1e1a8f6c21748fb4c008762c58b2 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 2 Sep 2024 01:36:28 +0530 Subject: [PATCH 45/55] fixing lint --- src/commands/run-tests.yml | 1 + src/scripts/run-tests.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index e8aac84..c8b4a26 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -116,6 +116,7 @@ parameters: https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html. type: string default: "" + steps: - run: name: Run MATLAB tests diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 384a96d..046077b 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -57,7 +57,7 @@ gendir="$tmpdir" binext="" if [[ "$os" = CYGWIN* || "$os" = MINGW* || "$os" = MSYS* ]]; then gendir=$(cygpath -w "$gendir") - binext=".exe" + binext=".exe" fi selectByName=$(eval echo "$PARAM_SELECT_BY_NAME" | awk '{ @@ -90,4 +90,4 @@ selectByName="{$selectByName}" disp('Running MATLAB script with contents:');\ disp(testScript.Contents);\ fprintf('__________\n\n');\ - run(testScript);" $PARAM_STARTUP_OPTIONS \ No newline at end of file + run(testScript);" $PARAM_STARTUP_OPTIONS From dc2faa0ff3821b56b47d4cf9995b3d90fc2abfe1 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Mon, 2 Sep 2024 01:37:49 +0530 Subject: [PATCH 46/55] fixing lint --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 28d089b..9a1118a 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -493,4 +493,4 @@ workflows: tags: only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ branches: - ignore: /.*/ \ No newline at end of file + ignore: /.*/ From 59de304db6a448d112c4c265763d6cd107200779 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 5 Sep 2024 00:04:19 +0530 Subject: [PATCH 47/55] updated description --- src/commands/run-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index c8b4a26..2673a93 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -16,8 +16,7 @@ parameters: default: '' select-by-name: description: > - Name or pattern used to select test suite elements. To create a test suite, MATLAB uses only the test elements - that match the specified name or pattern. + Name of the test used to select test suite elements, specified as a path relative to the project root folder. To create a test suite, the command uses only the test elements that match the specified name. Use the wildcard character (*) to match any number of characters. Use the question mark character (?) to match a single character. type: string default: '' select-by-folder: From 3615911a4db2fd2c4b5554ca11fac37dd6c4a53d Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 5 Sep 2024 18:25:54 +0530 Subject: [PATCH 48/55] addressing comment --- src/commands/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 2673a93..92b6265 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -16,7 +16,7 @@ parameters: default: '' select-by-name: description: > - Name of the test used to select test suite elements, specified as a path relative to the project root folder. To create a test suite, the command uses only the test elements that match the specified name. Use the wildcard character (*) to match any number of characters. Use the question mark character (?) to match a single character. + Name of test used to select test suite elements, specified as a list of names separated by spaces. The command uses only the test elements that match the specified name. Use the wildcard character (*) to match any number of characters. Use the question mark character (?) to match a single character. type: string default: '' select-by-folder: From 3818b0f2af6b0a9d15255196fee2d0bd105988d1 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Thu, 5 Sep 2024 18:33:24 +0530 Subject: [PATCH 49/55] Resolving comments --- src/commands/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index 92b6265..8518c6c 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -16,7 +16,7 @@ parameters: default: '' select-by-name: description: > - Name of test used to select test suite elements, specified as a list of names separated by spaces. The command uses only the test elements that match the specified name. Use the wildcard character (*) to match any number of characters. Use the question mark character (?) to match a single character. + Name of the test used to select test suite elements, specified as a list of names separated by spaces. The command filters an existing test suite to include only the test elements that match the specified names. Use the wildcard character (*) to match any number of characters. Use the question mark character (?) to match a single character. type: string default: '' select-by-folder: From e7956aff6f068b26d0d8abac168b5a88882f47bd Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 10 Sep 2024 00:19:01 +0530 Subject: [PATCH 50/55] Added test --- .circleci/test-deploy.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 9a1118a..4af246e 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -165,7 +165,20 @@ jobs: - matlab/run-tests: test-results-junit: test-results/matlab/filterdtagresult.xml select-by-tag: FILTERED - + - matlab/run-tests: + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') + source-folder: src + - matlab/run-tests: + select-by-name: "mytest/* filtertest/*" + source-folder: src + - matlab/run-tests: + select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[\\\\/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') + test-results-junit: test-results/matlab/results.xml + source-folder: src + - matlab/run-tests: + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') + test-results-junit: test-results/matlab/results.xml + source-folder: src - run: name: Verify tests ran with startup options command: | From 2ecf54c6a404f7adaa1597de5a9002e05e384b65 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 10 Sep 2024 12:13:42 +0530 Subject: [PATCH 51/55] Added verification step --- .circleci/test-deploy.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 4af246e..f016821 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -170,15 +170,8 @@ jobs: source-folder: src - matlab/run-tests: select-by-name: "mytest/* filtertest/*" - source-folder: src - - matlab/run-tests: - select-by-name: $(circleci tests glob 'tests/**/*.m' | awk -F'[\\\\/.]' '{print $(NF-1)}' | circleci tests split --split-by=timings | awk '{print $0 "/*"}') - test-results-junit: test-results/matlab/results.xml - source-folder: src - - matlab/run-tests: - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split --split-by=filesize | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') - test-results-junit: test-results/matlab/results.xml - source-folder: src + test-results-junit: test-results/matlab/filterednameresult.xml + source-folder: src - run: name: Verify tests ran with startup options command: | @@ -227,6 +220,13 @@ jobs: grep -v FirstTest test-results/matlab/filterdtagresult.xml grep -v simpleTest test-results/matlab/filterdtagresult.xml shell: bash + - run: + name: Verify filter by name test results file was created + command: | + set -e + grep -q mytest test-results/matlab/filterednameresult.xml + grep -q filtertest test-results/matlab/filterednameresult.xml + shell: bash - run: name: Set up diary for logging From 5fa8365b3c5e39f51fe28eaadbf195baa267830a Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 10 Sep 2024 14:52:43 +0530 Subject: [PATCH 52/55] Updated verification step --- .circleci/test-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index f016821..6bf37e5 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -169,7 +169,7 @@ jobs: select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') source-folder: src - matlab/run-tests: - select-by-name: "mytest/* filtertest/*" + select-by-name: "filtertest/*" test-results-junit: test-results/matlab/filterednameresult.xml source-folder: src - run: @@ -224,8 +224,8 @@ jobs: name: Verify filter by name test results file was created command: | set -e - grep -q mytest test-results/matlab/filterednameresult.xml grep -q filtertest test-results/matlab/filterednameresult.xml + ! grep -q mytest test-results/matlab/filterednameresult.xml shell: bash - run: From 1b1ac533d9c96a5e1a4d3e6641cfe352059ee29d Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 17 Sep 2024 16:06:44 +0530 Subject: [PATCH 53/55] updated test verification --- .circleci/test-deploy.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 6bf37e5..47f5ff8 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -165,13 +165,6 @@ jobs: - matlab/run-tests: test-results-junit: test-results/matlab/filterdtagresult.xml select-by-tag: FILTERED - - matlab/run-tests: - select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') - source-folder: src - - matlab/run-tests: - select-by-name: "filtertest/*" - test-results-junit: test-results/matlab/filterednameresult.xml - source-folder: src - run: name: Verify tests ran with startup options command: | @@ -220,14 +213,6 @@ jobs: grep -v FirstTest test-results/matlab/filterdtagresult.xml grep -v simpleTest test-results/matlab/filterdtagresult.xml shell: bash - - run: - name: Verify filter by name test results file was created - command: | - set -e - grep -q filtertest test-results/matlab/filterednameresult.xml - ! grep -q mytest test-results/matlab/filterednameresult.xml - shell: bash - - run: name: Set up diary for logging command: | @@ -273,6 +258,30 @@ jobs: grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log rm console.log shell: bash + - matlab/run-tests: + select-by-name: $(circleci tests glob 'tests/**/*.m' | circleci tests split | awk -F'[\\\\/.]' '{print $(NF-1) "/*"}') + source-folder: src + startup-options: -logfile console.log + - run: + name: Verify Tests Ran as Filtered by Name + command: | + set -e + grep mytest console.log + grep TaggedTest console.log + grep filtertest console.log + rm console.log + shell: bash + - matlab/run-tests: + select-by-name: "filtertest/*" + test-results-junit: test-results/matlab/filterednameresult.xml + source-folder: src + - run: + name: Verify filter by name test results file was created + command: | + set -e + grep -q filtertest test-results/matlab/filterednameresult.xml + ! grep -q mytest test-results/matlab/filterednameresult.xml + shell: bash # Set up for model coverage artifact tests - when: From 0955fe240360e2fc331aee53b8ed0da6862afc7f Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 17 Sep 2024 16:12:41 +0530 Subject: [PATCH 54/55] updated test-deploy --- .circleci/test-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 47f5ff8..901cfe4 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -165,6 +165,7 @@ jobs: - matlab/run-tests: test-results-junit: test-results/matlab/filterdtagresult.xml select-by-tag: FILTERED + - run: name: Verify tests ran with startup options command: | @@ -213,6 +214,7 @@ jobs: grep -v FirstTest test-results/matlab/filterdtagresult.xml grep -v simpleTest test-results/matlab/filterdtagresult.xml shell: bash + - run: name: Set up diary for logging command: | From 30d58797de77ac0587b46472d77e08c4bb2fcdc8 Mon Sep 17 00:00:00 2001 From: vanditaMW Date: Tue, 17 Sep 2024 16:14:21 +0530 Subject: [PATCH 55/55] updated test_deploy.yml --- .circleci/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 901cfe4..eb1cc91 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -265,7 +265,7 @@ jobs: source-folder: src startup-options: -logfile console.log - run: - name: Verify Tests Ran as Filtered by Name + name: Verify tests ran as filtered by name command: | set -e grep mytest console.log