          (map #(.toURI %))
          (map #(.toURL %))
          (map x/xml-resource)
+         (mapcat #(x/select % [[(x/tag= :testsuite)]]))
          (map make-failure-report)
          (filter identity)
+         (map merge-default)
          (reduce combine-failure-reports {:errors 0
                                           :failures 0
                                           :tests 0

                  (x/attr= :tests)]])
      first
      :attrs
      (rename-keys {:skip :skipped}) ;; for nosetest
      (update :errors   #(Integer/parseInt %))
      (update :failures #(Integer/parseInt %))
      (update :tests    #(Integer/parseInt %))
      (update :skipped  #(Integer/parseInt %))))

(defn content-text [xml]
  (apply str (map x/text xml)))

      (clojure.pprint/pprint testsuite)
      (throw t))))

(def default-failure-report
  {:errors 0
   :failures 0
   :tests 0
   :skipped 0})

(defn merge-default [m]
  (merge default-failure-report m))

(defn find-failures [dir]
  (when dir
    (->> dir
