Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for Test Coverage #685

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b4ac43a
Add gcov example in testfiles folder; Testing on CI
radurentea Mar 28, 2022
6ebcdbb
Add unit test for getGcovFilterPaths function
radurentea Mar 29, 2022
bb06457
Fix getGcovFilterPaths unit test
radurentea Mar 29, 2022
5f1ab9a
Fix getGcovFilterPaths unit test v2
radurentea Mar 29, 2022
5be7c0b
Update testCoverage.test.ts
radurentea Mar 29, 2022
d881f87
Testing buildJson response on CI
radurentea Mar 30, 2022
36a99d2
Add .gcda and .gcno mockup files for buildJson unit test
radurentea Mar 30, 2022
4dc82ef
Fix testFiles path; Add mockfiles inside gcov folder
radurentea Mar 31, 2022
ee59868
testing result on ci
radurentea Mar 31, 2022
166ae6d
Update compilerPath to default
radurentea Mar 31, 2022
f0b6b56
Update workspace path
radurentea Apr 4, 2022
ec55d63
Move C files into components/sample
radurentea Mar 31, 2022
4231a77
Moving files outside sample folder
radurentea Apr 4, 2022
8fcd3ce
Update idf variables
radurentea Apr 4, 2022
9dc4229
Add dependencies
radurentea Apr 6, 2022
d2da994
Revert "Add dependencies"
radurentea Apr 6, 2022
bcdf476
Removing workspaceFolder
radurentea Apr 6, 2022
fb3a3e9
Revert "Removing workspaceFolder"
radurentea Apr 6, 2022
21352e4
Update testCoverage.test.ts
radurentea Apr 6, 2022
9af4652
Update c_cpp_properties.json
radurentea Apr 6, 2022
2e867f6
Revert "Update c_cpp_properties.json"
radurentea Apr 6, 2022
93158a3
Removing .dovcontainer
radurentea Apr 6, 2022
7ae6380
Revert "Removing .dovcontainer"
radurentea Apr 7, 2022
94dda21
Replace config variables with env variables
radurentea May 3, 2022
190b511
Revert "Replace config variables with env variables"
radurentea May 3, 2022
7a8e562
Testing if the test results are changing on CI
radurentea May 3, 2022
e0ff6bf
Revert "Testing if the test results are changing on CI"
radurentea May 3, 2022
d3648d9
Testing on CI - removing paths from settings.json
radurentea May 3, 2022
614d62e
Replacing example folders
radurentea May 3, 2022
a03023a
Testing on CI - removing mockup_files folder
radurentea May 3, 2022
68d13d8
Fix unit test for buildJson function
radurentea May 4, 2022
ad60a4f
Add unit test for buildHtml function
radurentea May 4, 2022
a62a3fb
Fix test unit for buildHtml function; Add comments for some test cove…
radurentea May 5, 2022
6323c4c
Add test unit for generateCoverageForEditors()
radurentea May 9, 2022
51b36a3
Remove unnecessary files; Add description;
radurentea Jun 6, 2022
f9a5343
Add gcda and gcno mockup files
radurentea Jun 9, 2022
fa60585
Revert "Add gcda and gcno mockup files"
radurentea Jun 9, 2022
45ae0e4
Re-run checks
radurentea Nov 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add unit test for getGcovFilterPaths function
  • Loading branch information
radurentea committed Aug 3, 2022
commit 6ebcdbbe181cdf6f082c5a7e68b9d2a6534a52af
7 changes: 4 additions & 3 deletions src/test/suite/testCoverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
buildJson,
getGcovFilterPaths
} from "../../coverage/coverageService";
import { CoverageRenderer } from "../../coverage/renderer";

suite("Test Coverage Unit Tests", () => {
test("gcov executables based on idfTarget", () => {
Expand All @@ -23,8 +22,10 @@ suite("Test Coverage Unit Tests", () => {

test("getGcovFilterPaths", async () => {
const workspace = vscode.Uri.file(join(__dirname, "../../testFiles/gcov"));
const idfPath = join(process.env.HOME, "esp", "esp-idf");
process.env.IDF_PATH = idfPath;
const pathsToFilter = await getGcovFilterPaths(workspace);
console.log({ workspace, pathsToFilter })
const example = ["--filter", `${idfPath}/components`];
assert.equal(JSON.stringify(test), JSON.stringify(pathsToFilter))
})

});