Check-in [0add4d5d70]
Not logged in
Overview
SHA1 Hash:0add4d5d70c81b86815f4a2304069d4ff1b3231d
Date: 2011-05-06 12:22:56
User: mrwellan
Comment:Partial checkin for fixes to -runstep
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified megatest.scm from [2fe365679203b75f] to [7b8d24e9fd416d29].

48 -xterm : start an xterm instead of launching the test 48 -xterm : start an xterm instead of launching the test 49 49 50 Helpers 50 Helpers 51 -runstep stepname ... : take leftover params as comand and execute as stepna 51 -runstep stepname ... : take leftover params as comand and execute as stepna 52 log will be in stepname.log 52 log will be in stepname.log 53 -logpro file : with -exec apply logpro file to stepname.log, create 53 -logpro file : with -exec apply logpro file to stepname.log, create 54 stepname.html and sets log to same 54 stepname.html and sets log to same > 55 If using make use stepname_logpro.log as your target 55 56 56 Called as " (string-intersperse (argv) " "))) 57 Called as " (string-intersperse (argv) " "))) 57 58 58 ;; -gui : start a gui interface 59 ;; -gui : start a gui interface 59 ;; -config fname : override the runconfig file with fname 60 ;; -config fname : override the runconfig file with fname 60 61 61 ;; process args 62 ;; process args ................................................................................................................................................................................ 462 (test-set-status! db run-id test-name state status itemdat (args:g 463 (test-set-status! db run-id test-name state status itemdat (args:g 463 (if (and state status) 464 (if (and state status) 464 (if (not (args:get-arg "-setlog")) 465 (if (not (args:get-arg "-setlog")) 465 (begin 466 (begin 466 (print "ERROR: You must specify :state and :status with 467 (print "ERROR: You must specify :state and :status with 467 (sqlite3:finalize! db) 468 (sqlite3:finalize! db) 468 (exit 6))))) 469 (exit 6))))) 469 (if (args:get-arg "-run-step") | 470 (if (args:get-arg "-runstep") 470 (if (null? remargs) 471 (if (null? remargs) 471 (begin 472 (begin 472 (print "ERROR: nothing specified to run!") 473 (print "ERROR: nothing specified to run!") 473 (sqlite3:finalize! db) 474 (sqlite3:finalize! db) 474 (exit 6)) 475 (exit 6)) 475 (let* ((logprofile (args:get-arg "-logpro")) 476 (let* ((logprofile (args:get-arg "-logpro")) > 477 (logfile (conc test-name ".log")) 476 (cmd (if (null? remargs) #f (car remargs))) 478 (cmd (if (null? remargs) #f (car remargs))) 477 (params (if cmd (cdr remargs) #f)) | 479 (params (if cmd (cdr remargs) '())) 478 (exitstat #f)) | 480 (exitstat #f) > 481 (shell (last (string-split (get-environment-variab > 482 (redir (case (string->symbol shell) > 483 ((tcsh csh ksh) ">&") > 484 ((zsh bash sh ash) "2>&1"))) > 485 (fullcmd (string-intersperse > 486 (cons cmd (list params redir logfile)) > 487 " "))) 479 ;; mark the start of the test 488 ;; mark the start of the test 480 (test-set-status! db run-id test-name "start" "n/a" itemdat 489 (test-set-status! db run-id test-name "start" "n/a" itemdat 481 ;; close the db 490 ;; close the db 482 (sqlite3:finalize! db) 491 (sqlite3:finalize! db) 483 ;; run the test step 492 ;; run the test step > 493 (print "INFO: Running " fullcmd) 484 (set! exitstat (process-run cmd params)) | 494 (set! exitstat (process-run fullcmd)) ;; cmd params)) 485 ;; re-open the db 495 ;; re-open the db 486 (set! db (open-db)) 496 (set! db (open-db)) 487 ;; run logpro if applicable | 497 ;; run logpro if applicable ;; (process-run "ls" (list "/foo 488 (if logpro 498 (if logpro 489 (let ((logfile (conc test-name ".html"))) | 499 (let ((htmllogfile (conc test-name ".html")) > 500 (cmd (string-intersperse (list "logpro" lo > 501 (print "INFO: running " cmd) 490 (set! exitstat (process-run "logpro" logpro logfile)) | 502 (set! exitstat (process-run cmd)) 491 (test-set-log! db run-id test-name itemdat logfile))) 503 (test-set-log! db run-id test-name itemdat logfile))) 492 (test-set-status! db run-id test-name "end" exitstat itemdat 504 (test-set-status! db run-id test-name "end" exitstat itemdat 493 (sqlite3:finalize! db) 505 (sqlite3:finalize! db) 494 (exit exitstat) 506 (exit exitstat) 495 ;; open the db 507 ;; open the db 496 ;; mark the end of the test 508 ;; mark the end of the test 497 ))) 509 )))

Modified tests/megatest.config from [c2d2bae88c161754] to [36955f5b251e2eb8].

1 [fields] 1 [fields] 2 sysname TEXT 2 sysname TEXT 3 fsname TEXT 3 fsname TEXT 4 datapath TEXT 4 datapath TEXT 5 5 6 [setup] 6 [setup] 7 # executable /home/matt/data/megatest/megatest | 7 executable /nfs/ch/disks/ch_unienv_disk005/qa_mrwellan/interim/src/megatest/mega 8 max_concurrent_jobs 5 8 max_concurrent_jobs 5 9 9 10 [jobtools] 10 [jobtools] 11 # ## launcher launches jobs, the job is managed on the target host 11 # ## launcher launches jobs, the job is managed on the target host 12 ## by megatest, comment out launcher to run local 12 ## by megatest, comment out launcher to run local 13 # workhosts localhost hermes 13 # workhosts localhost hermes 14 launcher nbfake 14 launcher nbfake

Modified tests/tests/runfirst/main.sh from [b6ac44a0c40cf823] to [90abad008687bac3].

1 #!/bin/bash 1 #!/bin/bash 2 2 3 megatest -step wasting_time :state start :status n/a -m "This is a test step com | 3 # megatest -step wasting_time :state start :status n/a -m "This is a test step c 4 sleep 20 | 4 # sleep 20 5 megatest -step wasting_time :state end :status $? | 5 # megatest -step wasting_time :state end :status $? > 6 > 7 megatest -runstep wasting_time -logpro wasting_time.logpro "sleep 20;echo all do 6 8 7 megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log -m "T 9 megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log -m "T