Overview
Context
Changes
Modified launch.scm
from [ae5b023e35]
to [63a202fc1d].
︙ | | |
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
+
|
;; (test-name sqlitespeed) (runscript runscript.rb) (db-host localhost) (run-id 1))
(let* ((testpath (assoc/default 'testpath cmdinfo)) ;; How is testpath different from work-area ??
(top-path (assoc/default 'toppath cmdinfo))
(work-area (assoc/default 'work-area cmdinfo))
(test-name (assoc/default 'test-name cmdinfo))
(runscript (assoc/default 'runscript cmdinfo))
(ezsteps (assoc/default 'ezsteps cmdinfo))
(runremote (assoc/default 'runremote cmdinfo))
;; (runremote (assoc/default 'runremote cmdinfo))
(transport (assoc/default 'transport cmdinfo))
(run-id (assoc/default 'run-id cmdinfo))
(test-id (assoc/default 'test-id cmdinfo))
(target (assoc/default 'target cmdinfo))
(itemdat (assoc/default 'itemdat cmdinfo))
(env-ovrd (assoc/default 'env-ovrd cmdinfo))
(set-vars (assoc/default 'set-vars cmdinfo)) ;; pre-overrides from -setvar
|
︙ | | |
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
-
-
+
+
|
(file-execute-access? fulln))
fulln
runscript))))) ;; assume it is on the path
(rollup-status 0))
(debug:print 2 "Exectuing " test-name " (id: " test-id ") on " (get-host-name))
;; Setup the *runremote* global var
(if *runremote* (debug:print 2 "ERROR: I'm not expecting *runremote* to be set at this time"))
(set! *runremote* runremote)
(set! *transport-type* transport)
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
(set! keys (cdb:remote-run db:get-keys #f))
(set! keyvals (if run-id (cdb:remote-run db:get-key-vals #f run-id) #f))
;; apply pre-overrides before other variables. The pre-override vars must not
;; clobbers things from the official sources such as megatest.config and runconfigs.config
(if (string? set-vars)
(let ((varpairs (string-split set-vars ",")))
(debug:print 4 "varpairs: " varpairs)
|
︙ | | |
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
-
+
|
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
;; (sqlite3:finalize! db)
;; (sqlite3:finalize! tdb)
(exit 1)))
;; Can setup as client for server mode now
(server:client-setup)
;; (server:client-setup)
(change-directory *toppath*)
(set-megatest-env-vars run-id) ;; these may be needed by the launching process
(change-directory work-area)
(open-run-close set-run-config-vars #f run-id keys keyvals)
;; environment overrides are done *before* the remaining critical envars.
|
︙ | | |
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
|
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
|
-
-
+
+
|
(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")))
(set! cmdparms (base64:base64-encode
(with-output-to-string
(lambda () ;; (list 'hosts hosts)
(write (list (list 'testpath test-path)
(list 'runremote *runremote*)
(list 'transport *transport-type*)
;; (list 'runremote *runremote*)
(list 'transport (conc *transport-type*))
(list 'toppath *toppath*)
(list 'work-area work-area)
(list 'test-name test-name)
(list 'runscript runscript)
(list 'run-id run-id )
(list 'test-id test-id )
(list 'itemdat itemdat )
|
︙ | | |
Modified megatest.scm
from [ff38c8608a]
to [81d2e4a3f5].
︙ | | |
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
|
-
+
+
-
+
+
|
;;======================================================================
;; Get test paths matching target, runname, and testpatt
(if (or (args:get-arg "-test-files")(args:get-arg "-test-paths"))
;; if we are in a test use the MT_CMDINFO data
(if (getenv "MT_CMDINFO")
(let* ((startingdir (current-directory))
(cmdinfo (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO")))))
(runremote (assoc/default 'runremote cmdinfo))
;; (runremote (assoc/default 'runremote cmdinfo))
(transport (assoc/default 'transport cmdinfo))
(testpath (assoc/default 'testpath cmdinfo))
(test-name (assoc/default 'test-name cmdinfo))
(runscript (assoc/default 'runscript cmdinfo))
(db-host (assoc/default 'db-host cmdinfo))
(run-id (assoc/default 'run-id cmdinfo))
(itemdat (assoc/default 'itemdat cmdinfo))
(db #f)
(state (args:get-arg ":state"))
(status (args:get-arg ":status"))
(target (args:get-arg "-target"))
(toppath (assoc/default 'toppath cmdinfo)))
(change-directory toppath)
(set! *runremote* runremote)
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
(if (not target)
(begin
(debug:print 0 "ERROR: -target is required.")
(exit 1)))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, giving up on -test-paths or -test-files, exiting")
|
︙ | | |
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
|
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
|
-
+
+
-
+
+
-
+
|
(args:get-arg "-summarize-items"))
(if (not (getenv "MT_CMDINFO"))
(begin
(debug:print 0 "ERROR: MT_CMDINFO env var not set, commands -test-status, -runstep and -setlog must be called *inside* a megatest environment!")
(exit 5))
(let* ((startingdir (current-directory))
(cmdinfo (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO")))))
(runremote (assoc/default 'runremote cmdinfo))
;; (runremote (assoc/default 'runremote cmdinfo))
(transport (assoc/default 'transport cmdinfo))
(testpath (assoc/default 'testpath cmdinfo))
(test-name (assoc/default 'test-name cmdinfo))
(runscript (assoc/default 'runscript cmdinfo))
(db-host (assoc/default 'db-host cmdinfo))
(run-id (assoc/default 'run-id cmdinfo))
(test-id (assoc/default 'test-id cmdinfo))
(itemdat (assoc/default 'itemdat cmdinfo))
(db #f)
(state (args:get-arg ":state"))
(status (args:get-arg ":status")))
(change-directory testpath)
(set! *runremote* runremote)
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
(exit 1)))
;; can setup as client for server mode now
(server:client-setup)
;; (server:client-setup)
(if (args:get-arg "-load-test-data")
;; has sub commands that are rdb:
(open-run-close db:load-test-data db test-id))
(if (args:get-arg "-setlog")
(let ((logfname (args:get-arg "-setlog")))
(cdb:test-set-log! *runremote* test-id logfname)))
|
︙ | | |
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
|
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
|
-
+
+
|
(args:get-arg "-load"))
(let* ((toppath (setup-for-run))
(db (if toppath (open-db) #f)))
(if db
(begin
(set! *db* db)
(set! *client-non-blocking-mode* #t)
(server:client-setup)
;; (server:client-setup)
;; (server:client-launch)
(import readline)
(import apropos)
(gnu-history-install-file-manager
(string-append
(or (get-environment-variable "HOME") ".") "/.megatest_history"))
(current-input-port (make-gnu-readline-port "megatest> "))
(if (args:get-arg "-repl")
|
︙ | | |
Modified runs.scm
from [7ba96bae1f]
to [014ca786d2].
︙ | | |
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
|
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
|
-
-
-
-
-
+
+
+
+
+
|
(let ((db #f)
(keys #f))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
(exit 1)))
(if (args:get-arg "-server")
(open-run-close server:start db (args:get-arg "-server"))
(if (not (or (args:get-arg "-runall") ;; runall and runtests are allowed to be servers
(args:get-arg "-runtests")))
(server:client-setup) ;; This is a duplicate startup!!!??? BUG?
))
(open-run-close server:start db (args:get-arg "-server")))
;; (if (not (or (args:get-arg "-runall") ;; runall and runtests are allowed to be servers
;; (args:get-arg "-runtests")))
;; (server:client-setup) ;; This is a duplicate startup!!!??? BUG?
;; ))
(set! keys (open-run-close db:get-keys db))
;; have enough to process -target or -reqtarg here
(if (args:get-arg "-reqtarg")
(let* ((runconfigf (conc *toppath* "/runconfigs.config")) ;; DO NOT EVALUATE ALL
(runconfig (read-config runconfigf #f #f environ-patt: #f)))
(if (hash-table-ref/default runconfig (args:get-arg "-reqtarg") #f)
(keys:target-set-args keys (args:get-arg "-reqtarg") args:arg-hash)
|
︙ | | |