Skip to content

Commit

Permalink
test: Hide passing tests in GitHub actions runs (#3883)
Browse files Browse the repository at this point in the history
  • Loading branch information
theodab committed Jan 20, 2022
1 parent df55944 commit 3a22cb3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Expand Up @@ -67,4 +67,4 @@ jobs:

- name: Test Player
run: |
python build/test.py --browsers ${{ matrix.browser }} --reporter spec --drm ${{ matrix.extra_flags }}
python build/test.py --browsers ${{ matrix.browser }} --reporters spec --spec-hide-passed --drm ${{ matrix.extra_flags }}
6 changes: 6 additions & 0 deletions build/test.py
Expand Up @@ -229,6 +229,11 @@ def __init__(self, description):
default=None,
const=2,
nargs='?')
running_commands.add_argument(
'--spec-hide-passed',
help='If provided, configure the spec reporter to hide passing tests.',
action='store_true',
default=False)
running_commands.add_argument(
'--test-custom-asset',
help='Run asset playback tests on a custom manifest URI.',
Expand Down Expand Up @@ -358,6 +363,7 @@ def ParseArguments(self, args):
'single_run',
'uncompiled',
'delay_tests',
'spec_hide_passed',
'test_custom_asset',
'test_custom_license_server',
'test_timeout',
Expand Down
4 changes: 4 additions & 0 deletions karma.conf.js
Expand Up @@ -336,6 +336,10 @@ module.exports = (config) => {

config.set({reporters: reporters});

if (reporters.includes('spec') && settings.spec_hide_passed) {
config.set({specReporter: {suppressPassed: true}});
}

if (settings.random) {
// If --seed was specified use that value, else generate a seed so that the
// exact order can be reproduced if it catches an issue.
Expand Down

0 comments on commit 3a22cb3

Please sign in to comment.