273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
(if (directory-exists? rundir)
(let ((shell (if (get-environment-variable "SHELL")
(conc "-e " (get-environment-variable "SHELL"))
"")))
(system (conc "cd " rundir
";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
(message-window (conc "Directory " rundir " not found")))))
(command-text-box (iup:textbox #:expand "HORIZONTAL" #:font "Courier New, -10"))
(command-launch-button (iup:button "Execute!" #:action (lambda (x)
(let ((cmd (iup:attribute command-text-box "VALUE")))
(system (conc cmd " &"))))))
(run-test (lambda (x)
(iup:attribute-set!
command-text-box "VALUE"
(conc "xterm -geometry 180x20 -e \"megatest -target " keystring " :runname " runname
" -runtests " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
|
|
|
>
>
>
|
|
|
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
(if (directory-exists? rundir)
(let ((shell (if (get-environment-variable "SHELL")
(conc "-e " (get-environment-variable "SHELL"))
"")))
(system (conc "cd " rundir
";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
(message-window (conc "Directory " rundir " not found")))))
(command-text-box (iup:textbox #:expand "HORIZONTAL" #:font "Courier New, -12"))
(command-launch-button (iup:button "Execute!"
;; #:expand "HORIZONTAL"
#:size "50x"
#:action (lambda (x)
(let ((cmd (iup:attribute command-text-box "VALUE")))
(system (conc cmd " &"))))))
(run-test (lambda (x)
(iup:attribute-set!
command-text-box "VALUE"
(conc "xterm -geometry 180x20 -e \"megatest -target " keystring " :runname " runname
" -runtests " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
|
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
;; (iup:attribute-set! mat "WIDTH1" "120")
;; (iup:attribute-set! mat "WIDTH0" "100"))
(list run-info-matrix test-info-matrix test-run-matrix meta-dat-matrix))
;; Steps matrix
(iup:attribute-set! steps-matrix "0:1" "Step Name")
(iup:attribute-set! steps-matrix "0:2" "Start")
(iup:attribute-set! steps-matrix "0:3" "End")
(iup:attribute-set! steps-matrix "WIDTH3" "50")
(iup:attribute-set! steps-matrix "0:4" "Status")
(iup:attribute-set! steps-matrix "WIDTH4" "50")
(iup:attribute-set! steps-matrix "0:5" "Duration")
(iup:attribute-set! steps-matrix "0:6" "Log File")
(iup:attribute-set! steps-matrix "ALIGNMENT1" "ALEFT")
;; (iup:attribute-set! steps-matrix "FIXTOTEXT" "C1")
(iup:attribute-set! steps-matrix "RESIZEMATRIX" "YES")
;; (iup:attribute-set! steps-matrix "WIDTH1" "120")
;; (iup:attribute-set! steps-matrix "WIDTH0" "100")
|
>
|
|
>
|
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
|
;; (iup:attribute-set! mat "WIDTH1" "120")
;; (iup:attribute-set! mat "WIDTH0" "100"))
(list run-info-matrix test-info-matrix test-run-matrix meta-dat-matrix))
;; Steps matrix
(iup:attribute-set! steps-matrix "0:1" "Step Name")
(iup:attribute-set! steps-matrix "0:2" "Start")
(iup:attribute-set! steps-matrix "WIDTH2" "40")
(iup:attribute-set! steps-matrix "0:3" "End")
(iup:attribute-set! steps-matrix "WIDTH3" "40")
(iup:attribute-set! steps-matrix "0:4" "Status")
(iup:attribute-set! steps-matrix "WIDTH4" "40")
(iup:attribute-set! steps-matrix "0:5" "Duration")
(iup:attribute-set! steps-matrix "WIDTH5" "40")
(iup:attribute-set! steps-matrix "0:6" "Log File")
(iup:attribute-set! steps-matrix "ALIGNMENT1" "ALEFT")
;; (iup:attribute-set! steps-matrix "FIXTOTEXT" "C1")
(iup:attribute-set! steps-matrix "RESIZEMATRIX" "YES")
;; (iup:attribute-set! steps-matrix "WIDTH1" "120")
;; (iup:attribute-set! steps-matrix "WIDTH0" "100")
|
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
|
(iup:attribute-set! mat "REDRAW" "ALL")))
(list
(list run-info-matrix '("Run Id" "Target" "Runname" "Run Start Time" ))
(list test-info-matrix '("Test Id" "Testname" "Itempath" "State" "Status" "Test Start Time" "Comment"))
(list test-run-matrix '("Hostname" "Host info" "Disk Free" "CPU Load" "Run Duration"))
(list meta-dat-matrix '("Author" "Owner" "Last Reviewed" "Tags" "Description"))))
(iup:vbox
(iup:hbox
run-info-matrix
test-info-matrix)
(iup:hbox
test-run-matrix
meta-dat-matrix)
(iup:vbox
(iup:vbox
(iup:hbox
(iup:button "View Log" #:action viewlog #:size "80x")
(iup:button "Start Xterm" #:action xterm #:size "80x")
(iup:button "Run Test" #:action run-test #:size "80x")
(iup:button "Clean Test" #:action remove-test #:size "80x"))
(apply
iup:hbox
(list command-text-box command-launch-button))))
(iup:vbox
(let ((tabs (iup:tabs
steps-matrix
data-matrix)))
(iup:attribute-set! tabs "TABTITLE0" "Test Steps")
(iup:attribute-set! tabs "TABTITLE1" "Test Data")
tabs)))))
;; Test browser
(define (tests window-id)
(iup:hbox
(let* ((tb (iup:treebox
#:selection-cb
(lambda (obj id state)
;; (print "obj: " obj ", id: " id ", state: " state)
(let* ((run-path (tree:node->path obj id))
(test-id (tree-path->test-id (cdr run-path))))
(if test-id
|
>
>
|
|
>
|
|
>
|
|
|
|
|
|
|
|
>
|
|
<
|
>
>
>
>
|
|
|
|
|
|
|
|
|
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
(iup:attribute-set! mat "REDRAW" "ALL")))
(list
(list run-info-matrix '("Run Id" "Target" "Runname" "Run Start Time" ))
(list test-info-matrix '("Test Id" "Testname" "Itempath" "State" "Status" "Test Start Time" "Comment"))
(list test-run-matrix '("Hostname" "Host info" "Disk Free" "CPU Load" "Run Duration"))
(list meta-dat-matrix '("Author" "Owner" "Last Reviewed" "Tags" "Description"))))
(iup:split
#:orientation "HORIZONTAL"
(iup:vbox
(iup:hbox
(iup:vbox
run-info-matrix
test-info-matrix)
;; test-info-matrix)
(iup:vbox
test-run-matrix
meta-dat-matrix))
(iup:vbox
(iup:vbox
(iup:hbox
(iup:button "View Log" #:action viewlog #:size "60x" ) ;; #:size "30x"
(iup:button "Start Xterm" #:action xterm #:size "60x" )) ;; #:size "30x"
(iup:hbox
(iup:button "Run Test" #:action run-test #:size "60x" ) ;; #:size "30x"
(iup:button "Clean Test" #:action remove-test #:size "60x" ))) ;; #:size "30x"
(iup:hbox
;; hiup:split ;; hbox
;; #:orientation "HORIZONTAL"
;; #:value 300
command-text-box
command-launch-button)))
(iup:vbox
(let ((tabs (iup:tabs
steps-matrix
data-matrix)))
(iup:attribute-set! tabs "TABTITLE0" "Test Steps")
(iup:attribute-set! tabs "TABTITLE1" "Test Data")
tabs)))))
;; Test browser
(define (tests window-id)
(iup:split
(let* ((tb (iup:treebox
#:selection-cb
(lambda (obj id state)
;; (print "obj: " obj ", id: " id ", state: " state)
(let* ((run-path (tree:node->path obj id))
(test-id (tree-path->test-id (cdr run-path))))
(if test-id
|
564
565
566
567
568
569
570
571
572
573
574
575
576
577
|
;;======================================================================
;; Main Panel
(define (main-panel window-id)
(iup:dialog
#:title "Megatest Control Panel"
#:menu (dcommon:main-menu)
(let ((tabtop (iup:tabs
(runs window-id)
(tests window-id)
(runcontrol window-id)
(mtest window-id)
(rconfig window-id)
)))
|
>
|
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
;;======================================================================
;; Main Panel
(define (main-panel window-id)
(iup:dialog
#:title "Megatest Control Panel"
#:menu (dcommon:main-menu)
#:shrink "YES"
(let ((tabtop (iup:tabs
(runs window-id)
(tests window-id)
(runcontrol window-id)
(mtest window-id)
(rconfig window-id)
)))
|