Changes In Branch experimental Through [ca022fd7b5] Excluding Merge-Ins
This is equivalent to a diff from 4d44659fb3 to ca022fd7b5
2011-06-26
| ||
23:38 | Merged refactor of dashboard to trunk check-in: d73b2c1642 user: mrwellan tags: trunk | |
2011-06-18
| ||
22:20 | Adding a singletest (i.e. no items) check-in: 5d48bcf740 user: mrwellan tags: experimental | |
15:41 | Fixed the issue where runs were blocked by itemized tests where the parent state and status confused megatest check-in: ca022fd7b5 user: mrwellan tags: experimental | |
13:20 | Added PATH and DISPLAY to nbfake check-in: 6f0c4b417a user: mrwellan tags: experimental | |
2011-06-16
| ||
14:01 | Added switch to set number of rows in a dashboard screen check-in: 4d44659fb3 user: mrwellan tags: trunk | |
10:15 | Fixed annoying 'remove steps on re-run' bug check-in: 51810ab5ab user: mrwellan tags: trunk | |
Modified common.scm from [64281b3aad] to [8055bf6de1].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + + + | (include "margs.scm") (define getenv get-environment-variable) (define home (getenv "HOME")) (define user (getenv "USER")) ;; global gletches (define *configinfo* #f) (define *configdat* #f) (define *toppath* #f) (define *already-seen-runconfig-info* #f) (define *waiting-queue* (make-hash-table)) (define *globalexitstatus* 0) ;; attempt to work around possible thread issues (define *passnum* 0) ;; when running track calls to run-tests or similar (define-inline (get-with-default val default) (let ((val (args:get-arg val))) (if val val default))) (define-inline (assoc/default key lst . default) (let ((res (assoc key lst))) |
︙ |
Modified db.scm from [b22d01852d] to [1e0798cda7].
︙ | |||
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + + + + + + + + + + + + + + | (define (db:delete-test-step-records db run-id test-name itemdat) (sqlite3:execute db "DELETE FROM test_steps WHERE test_id in (SELECT id FROM tests WHERE run_id=? AND testname=? AND item_path=?);" run-id test-name (item-list->path itemdat))) ;; (define (db:delete-test-records db test-id) (sqlite3:execute db "DELETE FROM test_steps WHERE test_id=?;" test-id) (sqlite3:execute db "DELETE FROM tests WHERE id=?;" test-id)) ;; set tests with state currstate and status currstatus to newstate and newstatus ;; use currstate = #f and or currstatus = #f to apply to any state or status respectively ;; WARNING: SQL injection risk (define (db:set-tests-state-status db run-id testnames currstate currstatus newstate newstatus) (for-each (lambda (testname) (let ((qry (conc "UPDATE tests SET state=?,status=? WHERE " (if currstate (conc "state='" currstate "' AND ") "") (if currstatus (conc "status='" currstatus "' AND ") "") " testname=? AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));"))) ;;(print "QRY: " qry) (sqlite3:execute db qry newstate newstatus testname testname))) testnames)) ;; "('" (string-intersperse tests "','") "')") (define (db:get-count-tests-running db) (let ((res 0)) (sqlite3:for-each-row (lambda (count) (set! res count)) db |
︙ |
Modified megatest.scm from [38b46f671d] to [eedc08b57c].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - + + - + + | -testpatt patt : in list-runs show only these tests, % is the wildcard -itempatt patt : in list-runs show only tests with items that match patt -showkeys : show the keys used in this megatest setup Misc -force : override some checks -xterm : start an xterm instead of launching the test |
︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + | "-testpatt" "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" ) (list "-h" "-force" "-xterm" "-showkeys" "-test-status" "-gui" |
︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | + + | (define *didsomething* #f) ;;====================================================================== ;; Remove old run(s) ;;====================================================================== ;; since several actions can be specified on the command line the removal ;; is done first (define (remove-runs) (cond ((not (args:get-arg ":runname")) (print "ERROR: Missing required parameter for -remove-runs, you must specify the run name pattern with :runname patt") (exit 2)) ((not (args:get-arg "-testpatt")) (print "ERROR: Missing required parameter for -remove-runs, you must specify the test pattern with -testpatt") |
︙ | |||
480 481 482 483 484 485 486 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | + - + | (let* ((testinfo (db:get-test-info db run-id test-name (item-list->path itemdat)))) (if (not (equal? (db:test-get-state testinfo) "COMPLETED")) (begin (print "Test NOT logged as COMPLETED, (state=" (db:test-get-state testinfo) "), updating result") (test-set-status! db run-id test-name (if kill-job? "KILLED" "COMPLETED") (if (vector-ref exit-info 1) ;; look at the exit-status (if (and (not kill-job?) |
︙ |
Modified runs.scm from [60a12faf67] to [8546ef4018].
︙ | |||
248 249 250 251 252 253 254 255 256 257 258 259 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | + + + + + + - + + + | tests) res)) (define (run-tests db test-names) (let* ((keys (db-get-keys db)) (keyvallst (keys->vallist keys #t)) (run-id (register-run db keys))) ;; test-name))) ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if ;; -keepgoing is specified (if (and (eq? *passnum* 0) (args:get-arg "-keepgoing")) (db:set-tests-state-status db run-id test-names #f "FAIL" "NOT_STARTED" "FAIL")) (set! *passnum* (+ *passnum* 1)) (let loop ((numtimes 0)) (for-each (lambda (test-name) (let ((num-running (db:get-count-tests-running db)) (max-concurrent-jobs (config-lookup *configdat* "setup" "max_concurrent_jobs"))) |
︙ | |||
303 304 305 306 307 308 309 310 311 312 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 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 | + - + - - + + + - - - - - - - + - + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + | (runconfigf (conc *toppath* "/runconfigs.config"))) (print "items: ")(pp allitems) (if (args:get-arg "-m") (db:set-comment-for-run db run-id (args:get-arg "-m"))) (let loop ((itemdat (car allitems)) (tal (cdr allitems))) ;; (lambda (itemdat) ;;; ((ripeness "overripe") (temperature "cool") (season "summer")) ;; Handle lists of items (let* ((item-path (item-list->path itemdat)) ;; (string-intersperse (map cadr itemdat) "/")) (new-test-path (string-intersperse (cons test-path (map cadr itemdat)) "/")) (new-test-name (if (equal? item-path "") test-name (conc test-name "/" item-path))) ;; just need it to be unique |
︙ | |||
409 410 411 412 413 414 415 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | - + | (begin (print "Prerequisites met, launching " testname) ((cadr testdat)) (hash-table-delete! *waiting-queue* testname))) (if (not db) (sqlite3:finalize! ldb)))) waiting-test-names) |
︙ |
Modified utils/nbfake from [033159a590] to [b1e649d799].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | #!/bin/bash # ssh localhost "nohup $* > nbfake.log 2> nbfake.err < /dev/null" if [[ $TARGETHOST == "" ]]; then TARGETHOST=localhost fi # Can't always trust $PWD CURRWD=`pwd` |