       (write-region "" nil (concat "/:" shard-status-file) :append))
     (mapc #'load (reverse elisp/ert/test--sources))
     (let ((tests (ert-select-tests selector t))
+          (total 0)
           (unexpected 0)
           (errors 0)
           (failures 0)

               (report nil))
          (message "Test %s %s and took %d ms" name status
                   (* (float-time duration) 1000))
          (unless expected
            (cl-incf unexpected)
            ;; Print a nice error message that should point back to the source

                           ,@report)
                test-reports)))
      (message "Running %d tests finished, %d results unexpected"
               total unexpected)
      (unless (member report-file '(nil ""))
        (with-temp-buffer
          ;; The expected format of the XML output file isn’t well-documented.
