404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
|
-
+
-
-
+
|
;;
;; <linkdir> - <target> - <testname> [ - <itempath> ]
;;
;; All log file links should be stored relative to the top of link path
;;
;; <target> - <testname> [ - <itempath> ]
;;
(define (create-work-area db run-id test-id test-src-path disk-path testname itemdat)
(define (create-work-area run-id run-info key-vals test-id test-src-path disk-path testname itemdat)
(let* ((run-info (cdb:remote-run db:get-run-info #f run-id))
(item-path (item-list->path itemdat))
(let* ((item-path (item-list->path itemdat))
(runname (db:get-value-by-header (db:get-row run-info)
(db:get-header run-info)
"runname"))
;; convert back to db: from rdb: - this is always run at server end
(key-vals (cdb:remote-run db:get-key-vals #f run-id))
(target (string-intersperse key-vals "/"))
|
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
|
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
-
+
|
;; 1. look though disks list for disk with most space
;; 2. create run dir on disk, path name is meaningful
;; 3. create link from run dir to megatest runs area
;; 4. remotely run the test on allocated host
;; - could be ssh to host from hosts table (update regularly with load)
;; - could be netbatch
;; (launch-test db (cadr status) test-conf))
(define (launch-test db run-id runname test-conf keyvallst test-name test-path itemdat params)
(define (launch-test run-id run-info key-vals runname test-conf keyvallst test-name test-path itemdat params)
(change-directory *toppath*)
(alist->env-vars ;; consolidate this code with the code in megatest.scm for "-execute"
(list ;; (list "MT_TEST_RUN_DIR" work-area)
(list "MT_RUN_AREA_HOME" *toppath*)
(list "MT_TEST_NAME" test-name)
;; (list "MT_ITEM_INFO" (conc itemdat))
(list "MT_RUNNAME" runname)
|
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
-
+
|
;; set the megatest to be called on the remote host
(if (not remote-megatest)(set! remote-megatest local-megatest)) ;; "megatest"))
(set! mt-bindir-path (pathname-directory remote-megatest))
(if launcher (set! launcher (string-split launcher)))
;; set up the run work area for this test
(set! diskpath (get-best-disk *configdat*))
(if diskpath
(let ((dat (open-run-close create-work-area db run-id test-id test-path diskpath test-name itemdat)))
(let ((dat (create-work-area run-id run-info key-vals test-id test-path diskpath test-name itemdat)))
(set! work-area (car dat))
(set! toptest-work-area (cadr dat))
(debug:print-info 2 "Using work area " work-area))
(begin
(set! work-area (conc test-path "/tmp_run"))
(create-directory work-area #t)
(debug:print 0 "WARNING: No disk work area specified - running in the test directory under tmp_run")))
|