Megatest

Changes On Branch 3a077a5493ccbe9a
Login

Changes In Branch v1.65-real Through [3a077a5493] Excluding Merge-Ins

This is equivalent to a diff from a26bbf5c36 to 3a077a5493

2021-02-03
15:31
merged archive structure changes check-in: fa6e194fcc user: pjhatwal tags: v1.65-real
12:58
fixes to sretrive to pick hidden files check-in: 3a077a5493 user: pjhatwal tags: v1.65-real
2021-02-01
13:29
fixed match let in db.scm check-in: d486cc49ee user: pjhatwal tags: v1.6582, v1.65-real
2021-01-29
11:48
changed megatest version to v1.6582 check-in: d69b03fe95 user: mmgraham tags: v1.65-real
11:47
Made CHECK an error status for PREQ_FAIL Leaf check-in: a26bbf5c36 user: mmgraham tags: v1.6569-refactor-server-key-chk
10:28
changed info debug msgs with keyword failed check-in: 577abe1ca7 user: pjhatwal tags: v1.6569-refactor-server-key-chk

Modified db.scm from [f2d817bbad] to [ac557f6ec3].

1079
1080
1081
1082
1083
1084
1085





1086

1087
1088

1089
1090
1091
1092
1093
1094
1095
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090

1091
1092

1093
1094
1095
1096
1097
1098
1099
1100







+
+
+
+
+
-
+

-
+







     (lambda (option)
       
       (case option
	 ;; kill servers
	 ((killservers)
	  (for-each
	   (lambda (server)
             (handle-exceptions
             exn
             (begin 
               (debug:print-info 0 *default-log-port*  "Unable to get host and/or port from " servr ", exn=" exn)     
               #f)
	     (match-let (((mod-time host port start-time pid) server))
	     (match-let (((mod-time host port start-time server-id pid) server))
	       (if (and host pid)
		   (tasks:kill-server host pid))))
		   (tasks:kill-server host pid)))))
	   servers)

          ;; /tmp/bjbarcla/megatest_localdb/fullrun/.nfs.pdx.disks.icf_env_disk001.bjbarcla.gwa.issues.mtdev.matt-bisect.megatest.ext-tests.runs.all.v1.65.1.6524.dev.bb-24-justrollup-f8.rollup.fullrun/megatest.db.lock
          (delete-file* (common:get-sync-lock-filepath))
          )
	 
	 ;; clear out junk records

Modified megatest-version.scm from [69c8b1f2d8] to [af5ac77c8c].

16
17
18
19
20
21
22
23

16
17
18
19
20
21
22

23







-
+
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;; Always use two or four digit decimal
;; 1.01, 1.02...1.10,1.11,1.1101 ... 1.99,2.00..

;; (declare (unit megatest-version))

(define megatest-version 1.6581)
(define megatest-version 1.6582)

Modified server.scm from [136e39e7ec] to [e1c4f3709b].

462
463
464
465
466
467
468
469

470
471
472
473
474
475
476
462
463
464
465
466
467
468

469
470
471
472
473
474
475
476







-
+








(define (server:kill servr)
  (handle-exceptions
    exn
    (begin 
      (debug:print-info 0 *default-log-port*  "Unable to get host and/or port from " servr ", exn=" exn)     
    #f)
  (match-let (((mod-time hostname port start-time pid)
  (match-let (((mod-time hostname port start-time server-id pid)
	       servr))
    (tasks:kill-server hostname pid))))

;; called in megatest.scm, host-port is string hostname:port
;;
;; NOTE: This is NOT called directly from clients as not all transports support a client running
;;       in the same process as the server.

Modified sretrieve.scm from [c73e7e987b] to [bc076b5abf].

695
696
697
698
699
700
701
702


703
704
705
706
707
708
709
695
696
697
698
699
700
701

702
703
704
705
706
707
708
709
710







-
+
+







                      (print (string-substitute (conc base_path "/") "" p "-"))))
                 ((directory? p)              
                 ;;do nothing for dirs)
                 ) 
                (else 
                                        
                     (if (not (string-match (regexp exclude)  p ))
                        (print (string-substitute (conc base_path "/") "" p "-"))))))))
                        (print (string-substitute (conc base_path "/") "" p "-"))))))
         dotfiles: #t))

(define (sretrieve:shell-help)
(conc "Usage: " *exe-name* " [action [params ...]]

  ls    [target path]               	  : list contents of target area. The output of the cmd can be piped into other system cmd. eg ls <path> | grep txt
  cd    <target directory>	     	  : To change the current directory within the sretrive shell. 
  pwd				     	  : Prints the full pathname of the current directory within the sretrive shell.
1079
1080
1081
1082
1083
1084
1085
1086
1087


1088
1089
1090
1091
1092
1093
1094
1080
1081
1082
1083
1084
1085
1086


1087
1088
1089
1090
1091
1092
1093
1094
1095







-
-
+
+







      (else (print 0 "Unrecognised command " action))))

(define (main)
  (let* ((args      (argv))
	 (prog      (car args))
	 (rema      (cdr args))
	 (exe-name  (pathname-file (car (argv))))
	 (exe-dir   (or (pathname-directory prog)
			(sretrieve:find exe-name (string-split (get-environment-variable "PATH") ":"))))
	 ;(exe-dir   (or (pathname-directory prog)
	;		(sretrieve:find exe-name (string-split (get-environment-variable "PATH") ":"))))
	 ;(configdat (sretrieve:load-config exe-dir exe-name))
)
    ;; preserve the exe data in the config file
    ;(hash-table-set! configdat "exe-info" (list (list "exe-name" exe-name)
					;	(list "exe-dir"  exe-dir)))
    (cond
     ;; one-word commands