@@ -2748,14 +2748,12 @@ error-cnt)) (new-fail-cnt (if (member test-status (list "FAIL" "CHECK")) (+ fail-cnt 1) fail-cnt))) (if (null? tail) - (begin - (debug:print 0 *default-log-port* "modify attrib error=" error-cnt " fail= " fail-cnt) - ((sxml-modify! `("testsuite" insert-into (@ (name ,xml-ts-name) (tests ,tests-count) (errors ,error-cnt) (failures ,fail-cnt)))) new-doc) - + (let* ((final-doc ((sxml-modify `("testsuite" insert-into (@ (name ,xml-ts-name) (tests ,tests-count) (errors ,error-cnt) (failures ,fail-cnt)))) new-doc))) + (debug:print 0 *default-log-port* "modify attrib error=" error-cnt " fail= " fail-cnt) (handle-exceptions exn (let* ((msg ((condition-property-accessor 'exn 'message) exn))) (debug:print 0 *default-log-port* (conc "WARNING: Failed to update file" xml-path". Message:" msg))) @@ -2765,11 +2763,11 @@ (begin (rmt:no-sync-set keyname "on") (debug:print 0 *default-log-port* "creating xml at " xml-path) (with-output-to-file xml-path (lambda () - (print (sxml-serializer#serialize-sxml doc ns-prefixes: (list (cons 'gnm "http://foo")))))) + (print (sxml-serializer#serialize-sxml final-doc ns-prefixes: (list (cons 'gnm "http://foo")))))) (rmt:no-sync-del! keyname)) (debug:print 0 *default-log-port* "Could not get the lock. Skip writing the xml file.")))) (loop (car tail) (cdr tail) new-doc new-fail-cnt new-error-cnt)))))))) ;; clean cache files