Skip to content

Commit

Permalink
UnitTestFrameworkPkg: CI tweaks for Google Test changes
Browse files Browse the repository at this point in the history
These are Mu only CI changes so the GoogleTest series passes CI.

1. Fix the following markdownlint 5x errors in
   `UnitTestFrameworkPkg/ReadMe.md`:

   `MD040/fenced-code-language: Fenced code blocks should have a
   language specified`
2. Exclude the submodule `Library/GoogleTestLib/googletest` from
   markdownlint.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
  • Loading branch information
makubacki authored and kenlautner committed Dec 18, 2023
1 parent 6e1c781 commit 579d295
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions UnitTestFrameworkPkg/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ you should be good to go.

See this example in 'SampleGoogleTestHost.inf'...

```
```inf
[Packages]
MdePkg/MdePkg.dec
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
Expand All @@ -1411,7 +1411,7 @@ See this example in 'SampleGoogleTestHost.inf'...
Also, if you want you test to automatically be picked up by the Test Runner plugin, you will need
to make sure that the module `BASE_NAME` contains the word `Test`...

```
```inf
[Defines]
BASE_NAME = SampleGoogleTestHost
```
Expand All @@ -1420,7 +1420,7 @@ to make sure that the module `BASE_NAME` contains the word `Test`...

Not to state the obvious, but let's make sure we have the following include before getting too far along...

```
```c
#include <gtest/gtest.h>
extern "C" {
#include <Uefi.h>
Expand Down Expand Up @@ -1662,15 +1662,15 @@ Unit test applications using Framework are built using Cmocka that requires the
following environment variables to be set to generate structured XML output
rather than text:

```
```inf
CMOCKA_MESSAGE_OUTPUT=xml
CMOCKA_XML_FILE=<absolute or relative path to output file>
```

Unit test applications using GoogleTest require the following environment
variable to be set to generate structured XML output rather than text:

```
```inf
GTEST_OUTPUT=xml:<absolute or relative path to output file>
```

Expand Down
10 changes: 7 additions & 3 deletions UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,19 @@
"mdkinney", # Contact GitHub account in Readme
"spbrogan", # Contact GitHub account in Readme
"cobertura", # tool for code coverage
"pycobertura" # tool for code coverage
"pycobertura", # tool for code coverage
"loongarch",
"loongson"
],
"IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignore
"AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)
},

## options defined .pytool/Plugin/MarkdownLintCheck
"MarkdownLintCheck": {
"IgnoreFiles": [ "Library/CmockaLib/cmocka" # cmocka is submodule outside of control
] # package root relative file, folder, or glob pattern to ignore
"IgnoreFiles": [
"Library/CmockaLib/cmocka", # cmocka is submodule outside of control
"Library/GoogleTestLib/googletest" # googletest is submodule outside of control
] # package root relative file, folder, or glob pattern to ignore
}
}
4 changes: 0 additions & 4 deletions UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
#
UnitTestBootLib|PrivateInclude/Library/UnitTestBootLib.h

## @libraryclass GoogleTest infrastructure
#
GoogleTestLib|Include/Library/GoogleTestLib.h

[Guids]
gUnitTestFrameworkPkgTokenSpaceGuid = { 0x833d3aba, 0x39b4, 0x43a2, { 0xb9, 0x30, 0x7a, 0x34, 0x53, 0x39, 0x31, 0xb3 } }

Expand Down

0 comments on commit 579d295

Please sign in to comment.