Testroutinen auf kseinaus umbenannt und aktualisiert
test_ks.lsp in test_kseinaus.lsp umbenannt und alle Testroutinen (foerderer, kreisel, omniflo) sowie run_tests.bat und README entsprechend angepasst.
This commit is contained in:
+31
-32
@@ -39,6 +39,34 @@
|
||||
)
|
||||
|
||||
|
||||
;; --- JSON-Export der Foerderer-Testergebnisse ---
|
||||
(defun foerderer:export-results (tests-out-dir / out-json f first)
|
||||
(if (null *foerderer-test-results*)
|
||||
(princ "\n Keine Foerderer-Ergebnisse vorhanden.")
|
||||
(progn
|
||||
(vl-mkdir tests-out-dir)
|
||||
(setq out-json (strcat tests-out-dir "/foerderer_results.json"))
|
||||
(setq f (open out-json "w"))
|
||||
(if f
|
||||
(progn
|
||||
(write-line "[" f)
|
||||
(setq first T)
|
||||
(foreach r *foerderer-test-results*
|
||||
(if (not first) (write-line "," f))
|
||||
(write-line r f)
|
||||
(setq first nil)
|
||||
)
|
||||
(write-line "]" f)
|
||||
(close f)
|
||||
(princ (strcat "\n Ergebnisse: " out-json))
|
||||
)
|
||||
(princ (strcat "\n FEHLER: Kann " out-json " nicht schreiben!"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ============================================================
|
||||
;; C:TEST_FOERDERER - Hauptbefehl
|
||||
;; ============================================================
|
||||
@@ -46,8 +74,7 @@
|
||||
best-winkel L_GF L_VF
|
||||
y-offset hoehen-liste idx
|
||||
anz-gebaut anz-nicht-gebaut
|
||||
results-list result-json first
|
||||
tests-out-dir out-json out-dxf f
|
||||
results-list
|
||||
test-id)
|
||||
|
||||
;; Bibliothek initialisieren (laedt Block-Library und extrahiert Masse)
|
||||
@@ -182,36 +209,8 @@
|
||||
(itoa anz-nicht-gebaut) " NICHT_GEBAUT"))
|
||||
(princ "\n================================================================")
|
||||
|
||||
;; ==========================================================
|
||||
;; Ergebnisse speichern
|
||||
;; ==========================================================
|
||||
(setq tests-out-dir (strcat (getenv "DXFMAKRO") "/tests/output"))
|
||||
(vl-mkdir tests-out-dir)
|
||||
|
||||
;; JSON schreiben
|
||||
(setq out-json (strcat tests-out-dir "/foerderer_results.json"))
|
||||
(setq f (open out-json "w"))
|
||||
(if f
|
||||
(progn
|
||||
(write-line "[" f)
|
||||
(setq results-list (reverse results-list))
|
||||
(setq first T)
|
||||
(foreach r results-list
|
||||
(if (not first) (write-line "," f))
|
||||
(write-line r f)
|
||||
(setq first nil)
|
||||
)
|
||||
(write-line "]" f)
|
||||
(close f)
|
||||
(princ (strcat "\n Ergebnisse: " out-json))
|
||||
)
|
||||
(princ (strcat "\n FEHLER: Kann " out-json " nicht schreiben!"))
|
||||
)
|
||||
|
||||
;; DXF speichern
|
||||
(setq out-dxf (strcat tests-out-dir "/foerderer_tests.dxf"))
|
||||
(command "_.SAVEAS" "" out-dxf)
|
||||
(princ (strcat "\n DXF gespeichert: " out-dxf))
|
||||
;; Ergebnisse in globaler Variable speichern
|
||||
(setq *foerderer-test-results* (reverse results-list))
|
||||
|
||||
(ssg-end)
|
||||
(princ "\n================================================================")
|
||||
|
||||
Reference in New Issue
Block a user