Skip to content

only look for unit tests in the primary apps dir#35682

Merged
micbar merged 1 commit into
masterfrom
filter-apps-for-core-unit-test-runs
Jul 1, 2019
Merged

only look for unit tests in the primary apps dir#35682
micbar merged 1 commit into
masterfrom
filter-apps-for-core-unit-test-runs

Conversation

@phil-davis

Copy link
Copy Markdown
Contributor

Description

The "real core" apps are known to be in the apps folder. When scanning enabled apps for unit tests, only consider apps found in the apps folder.

Note: by convention, developers and other CI scripts... should be installing extra apps in some other folder like apps-external

Motivation and Context

The testing app in drone was move from apps to apps-external by PR #35648 - that was intended to avoid the unit tests o the testing app being accidentally run by core unit test jobs.

It turns out that the testing app unit tests are still being run in core drone. That is because the testing app is enabled, and the unit test script runs test cases for all enabled apps.

When core unit tests are being run, we really just want to run test cases for the "real core" apps. For other apps from separate repos, that happen to be installed and enabled, we do not want to run their unit test cases. Because those might fail - e.g. we are preparing a PHP unit major version upgrade, or...)

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@phil-davis phil-davis self-assigned this Jun 27, 2019
@phil-davis
phil-davis force-pushed the filter-apps-for-core-unit-test-runs branch 2 times, most recently from 1d2343d to f90003f Compare June 28, 2019 00:50
@codecov

codecov Bot commented Jun 28, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35682 into master will increase coverage by 0.46%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35682      +/-   ##
============================================
+ Coverage      65.3%   65.77%   +0.46%     
  Complexity    18781    18781              
============================================
  Files          1222     1222              
  Lines         70836    70870      +34     
  Branches       1289     1289              
============================================
+ Hits          46260    46614     +354     
+ Misses        24198    23878     -320     
  Partials        378      378
Flag Coverage Δ Complexity Δ
#javascript 53.7% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 67.15% <ø> (+0.52%) 18781 <ø> (ø) ⬇️
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Cache/HomePropagator.php 77.77% <0%> (-9.73%) 3% <0%> (ø)
apps/files/lib/Command/Scan.php 71.91% <0%> (-9.17%) 74% <0%> (ø)
apps/dav/lib/Connector/Sabre/File.php 84.19% <0%> (+0.64%) 115% <0%> (ø) ⬇️
lib/private/Files/Mount/MountPoint.php 93.5% <0%> (+1.29%) 34% <0%> (ø) ⬇️
lib/private/DB/Connection.php 66.91% <0%> (+1.47%) 49% <0%> (ø) ⬇️
lib/private/legacy/util.php 68.19% <0%> (+2.55%) 240% <0%> (ø) ⬇️
apps/files_versions/lib/Storage.php 72.67% <0%> (+2.81%) 95% <0%> (ø) ⬇️
lib/private/Files/Storage/Common.php 85.15% <0%> (+3.33%) 141% <0%> (ø) ⬇️
apps/files_trashbin/lib/Quota.php 92% <0%> (+4%) 9% <0%> (ø) ⬇️
lib/private/Files/Type/Detection.php 74.56% <0%> (+4.38%) 52% <0%> (ø) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04ba79f...f90003f. Read the comment docs.

@codecov

codecov Bot commented Jun 28, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35682 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35682   +/-   ##
=========================================
  Coverage     65.77%   65.77%           
  Complexity    18781    18781           
=========================================
  Files          1222     1222           
  Lines         70870    70870           
  Branches       1289     1289           
=========================================
  Hits          46618    46618           
  Misses        23874    23874           
  Partials        378      378
Flag Coverage Δ Complexity Δ
#javascript 53.7% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 67.16% <ø> (ø) 18781 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52e257d...72c262a. Read the comment docs.

@phil-davis

Copy link
Copy Markdown
Contributor Author

Backport stable10 #35700

@phil-davis

Copy link
Copy Markdown
Contributor Author

https://drone.owncloud.com/owncloud/core/19002/125 this PR ran 9675 unit tests.
https://drone.owncloud.com/owncloud/core/19004/125 ran 9679 unit tests (another example PR)
The difference of 4 confirms that the 4 testing app unit tests are not being run - good.

@micbar
micbar merged commit 466a407 into master Jul 1, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the filter-apps-for-core-unit-test-runs branch July 1, 2019 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants