diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index ec4f2b8ebe..8acae463fa 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -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 }} diff --git a/build/test.py b/build/test.py index 405c068016..9fde62b911 100755 --- a/build/test.py +++ b/build/test.py @@ -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.', @@ -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', diff --git a/karma.conf.js b/karma.conf.js index 3b4765c446..a4d8360878 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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.