Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48212

Unittests with --filter or --fileNameFilter are excessively noisy

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Fully Compatible
    • Sharding 2020-06-01

      When using the ninja generator's "+" to run unittests from a single file (which uses --fileNameFilter under the hood), there are the "Running" and "Done running tests" messages from all suites in the actual unittest binary (which tends to be a lot, to minimise static linking overheads), even though the vast majority of them don't run any tests. There are also all the summary results from these suites which had no tests run, which I'm not interested in. These lines cause a lot of scrolling in the terminal, and obscure the real tests that I'm interested in.

      The behaviour with --filter is similar, however using --suite only runs and shows output related to that suite (which is how I would like --filter and --fileNameFilter to behave).

      For example, this is the current behaviour (attached because it's too large to fit in a Jira description), but instead of all that output it should just be:

      $ ninja +replica_set_aware_service_test
      [ 0 / 1 / 1 ] [  0%] [0.000s]  Building +replica_set_aware_service_test
      {"t":{"$date":"2020-05-13T05:48:29.899Z"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
      {"t":{"$date":"2020-05-13T05:48:29.912Z"},"s":"I",  "c":"TEST",     "id":23063,   "ctx":"main","msg":"Running","attr":{"suite":"ReplicaSetAwareServiceTest"}}
      {"t":{"$date":"2020-05-13T05:48:29.912Z"},"s":"I",  "c":"TEST",     "id":23059,   "ctx":"main","msg":"Running","attr":{"test":"ReplicaSetAwareService","rep":1,"reps":1}}
      {"t":{"$date":"2020-05-13T05:48:29.925Z"},"s":"I",  "c":"TEST",     "id":23060,   "ctx":"main","msg":"Done running tests"}
      {"t":{"$date":"2020-05-13T05:48:29.936Z"},"s":"I",  "c":"TEST",     "id":4680101, "ctx":"main","msg":"Result","attr":{"suite":{"name":"ReplicaSetAwareServiceTest","tests":1,"fails":0,"asserts":0,"time":{"durationMillis":13},"failures":[]}}}
      {"t":{"$date":"2020-05-13T05:48:29.938Z"},"s":"I",  "c":"TEST",     "id":23065,   "ctx":"main","msg":"Totals","attr":{"totals":{"name":"TOTALS","tests":1,"fails":0,"asserts":0,"time":{"durationMillis":13},"failures":[]}}}
      {"t":{"$date":"2020-05-13T05:48:29.938Z"},"s":"I",  "c":"TEST",     "id":23069,   "ctx":"main","msg":"SUCCESS - All tests in all suites passed"}
      

            Assignee:
            kevin.pulo@mongodb.com Kevin Pulo
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: