From 035d2f06ce94ce206c77250400ed4746672a19b7 Mon Sep 17 00:00:00 2001 From: David Buzinski Date: Thu, 14 Apr 2022 10:35:12 -0400 Subject: [PATCH 1/2] added model-coverage-html parameter and tests --- .circleci/test-deploy.yml | 7 +++++++ src/commands/run-tests.yml | 6 ++++++ src/scripts/run-tests.sh | 1 + 3 files changed, 14 insertions(+) diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 9b2094a..191b1fa 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -226,6 +226,7 @@ jobs: - matlab/run-tests: select-by-folder: simtests model-coverage-cobertura: model-coverage/coverage.xml + model-coverage-cobertura: model-coverage/html test-results-pdf: test-results/matlab/pdfresults.pdf test-results-simulink-test: test-results/matlab/simulinkTest.mldatx - run: @@ -246,6 +247,12 @@ jobs: 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 workflows: test-deploy: diff --git a/src/commands/run-tests.yml b/src/commands/run-tests.yml index f3f3a68..0527c03 100644 --- a/src/commands/run-tests.yml +++ b/src/commands/run-tests.yml @@ -46,6 +46,11 @@ parameters: Path to write model coverage report in Cobertura XML format. type: string default: '' + model-coverage-html: + description: > + Path to write model coverage report in HTML format. + type: string + default: '' test-results-simulink-test: description: > Path to export Simulink Test Manager results in MLDATX format. @@ -73,6 +78,7 @@ steps: PARAM_SELECT_BY_FOLDER: <> PARAM_SELECT_BY_TAG: <> PARAM_MODEL_COVERAGE_COBERTURA: <> + PARAM_MODEL_COVERAGE_HTML: <> PARAM_TEST_RESULTS_SIMULINK_TEST: <> PARAM_TEST_RESULTS_HTML: <> PARAM_TEST_RESULTS_PDF: <> diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 41a60b2..97b59d4 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -26,6 +26,7 @@ fi '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}');\ From cd447e4d2f91af81ef8d62ca408ef64dbd1fb8ed Mon Sep 17 00:00:00 2001 From: David Buzinski Date: Thu, 14 Apr 2022 10:37:47 -0400 Subject: [PATCH 2/2] fixing typo in test --- .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 191b1fa..c48320e 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -226,7 +226,7 @@ jobs: - matlab/run-tests: select-by-folder: simtests model-coverage-cobertura: model-coverage/coverage.xml - model-coverage-cobertura: model-coverage/html + model-coverage-html: model-coverage/html test-results-pdf: test-results/matlab/pdfresults.pdf test-results-simulink-test: test-results/matlab/simulinkTest.mldatx - run: