parameters: (self, pool_result)
docstring: Test completion callback for lit.worker.run_one_test
  
          Updates the test result status in the parent process. Each task in the
          pool returns the test index and the result, and we use the index to look
          up the original test object. Also updates the progress bar as tasks
          complete.
docstring_summary: Test completion callback for lit.worker.run_one_test
docstring_tokens: Test completion callback for lit . worker . run_one_test
function: def consume_test_result(self, pool_result):
          """Test completion callback for lit.worker.run_one_test
  
          Updates the test result status in the parent process. Each task in the
          pool returns the test index and the result, and we use the index to look
          up the original test object. Also updates the progress bar as tasks
          complete.
          """
          # Don't add any more test results after we've hit the maximum failure
          # count.  Otherwise we're racing with the main thread, which is going
          # to terminate the process pool soon.
          if self.hit_max_failures:
              return
  
          (test_index, test_with_result) = pool_result
          # Update the parent process copy of the test. This includes the result,
          # XFAILS, REQUIRES, and UNSUPPORTED statuses.
          assert self.tests[test_index].file_path == test_with_result.file_path, \
                  "parent and child disagree on test path"
          self.tests[test_index] = test_with_result
          self.display.update(test_with_result)
  
          # If we've finished all the tests or too many tests have failed, notify
          # the main thread that we've stopped testing.
          self.failure_count += (test_with_result.result.code == lit.Test.FAIL)
          if self.lit_config.maxFailures and \
                  self.failure_count == self.lit_config.maxFailures:
              self.hit_max_failures = True
function_tokens: def consume_test_result ( self , pool_result ) : # Don't add any more test results after we've hit the maximum failure # count.  Otherwise we're racing with the main thread, which is going # to terminate the process pool soon. if self . hit_max_failures : return ( test_index , test_with_result ) = pool_result # Update the parent process copy of the test. This includes the result, # XFAILS, REQUIRES, and UNSUPPORTED statuses. assert self . tests [ test_index ] . file_path == test_with_result . file_path , "parent and child disagree on test path" self . tests [ test_index ] = test_with_result self . display . update ( test_with_result ) # If we've finished all the tests or too many tests have failed, notify # the main thread that we've stopped testing. self . failure_count += ( test_with_result . result . code == lit . Test . FAIL ) if self . lit_config . maxFailures and self . failure_count == self . lit_config . maxFailures : self . hit_max_failures = True