Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

detect folders with no tests when subfolders depth is more then 1#5661

Merged
winsvega merged 1 commit into
masterfrom
testsfix
Jul 10, 2019
Merged

detect folders with no tests when subfolders depth is more then 1#5661
winsvega merged 1 commit into
masterfrom
testsfix

Conversation

@winsvega
Copy link
Copy Markdown

@winsvega winsvega commented Jul 9, 2019

required for #5648

@winsvega winsvega requested a review from gumb0 July 9, 2019 10:22
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 9, 2019

Codecov Report

Merging #5661 into master will decrease coverage by 0.19%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5661     +/-   ##
=========================================
- Coverage      63%   62.81%   -0.2%     
=========================================
  Files         350      349      -1     
  Lines       29905    29726    -179     
  Branches     3350     3348      -2     
=========================================
- Hits        18843    18672    -171     
+ Misses       9846     9843      -3     
+ Partials     1216     1211      -5

<< " appears to have no tests!"
<< "\n";
if (!boost::filesystem::exists(it->first / filter))
notAFilter = true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the case when -t points to a unit test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, for unit tests it should return from line 141.
When this is the case then?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is the case when you select -t TestSuite / SubTestSuite

Copy link
Copy Markdown
Member

@gumb0 gumb0 Jul 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you could move this check to the outer if (line 137)
Kind of like

if (!filter.empty() && boost::filesystem::exists(m_finishedTestFoldersMap.begin()->first / filter))
{
...
}
else
{
...
}

(but check that m_finishedTestFoldersMap is not empty first)

Would it be simpler?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe it would easier/more efficient to look at c_allTestNames to check whether it's single folder or subsuite, but I'm not sure

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to call c_allTestNames more then from one place, will have to intoduce c_allTestNames.cpp

@winsvega winsvega merged commit 9cf12dd into master Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants