Overview
Comment: | Merged with earlier edits |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | test-specific-db |
Files: | files | file ages | folders |
SHA1: |
902282795a52db316664b57af9e8fcf9 |
User & Date: | matt on 2012-10-04 16:17:51 |
Other Links: | branch diff | manifest | tags |
Context
2012-10-05
| ||
11:37 | Got test1 running completely clean check-in: 7dfcb764c6 user: mrwellan tags: test-specific-db | |
2012-10-04
| ||
16:17 | Merged with earlier edits check-in: 902282795a user: matt tags: test-specific-db | |
16:08 | Fixed couple tests check-in: fbca8a30c8 user: matt tags: test-specific-db | |
15:42 | cleaned up simplerun test case check-in: 51699c5ffe user: mrwellan tags: test-specific-db | |
Changes
Modified db.scm from [b26dbf5b3e] to [85e60dcc09].
︙ | |||
880 881 882 883 884 885 886 887 888 889 890 891 892 893 | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | + + + + + + | ;; (define (db:test-set-rundir! db run-id test-name item-path rundir) (sqlite3:execute db "UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;" rundir run-id test-name item-path)) (define (db:test-set-rundir-by-test-id! db test-id rundir) (sqlite3:execute db "UPDATE tests SET rundir=? WHERE id=?" rundir test-id)) ;; (define (db:test-get-rundir-from-test-id db test-id) (let ((res (hash-table-ref/default *test-paths* test-id #f))) (if res res (begin (sqlite3:for-each-row |
︙ | |||
1433 1434 1435 1436 1437 1438 1439 | 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | - + | ;; if the test is not found then clearly the waiton is not met... ;; (if (not ever-seen)(set! result (cons waitontest-name result))))) (if (not ever-seen) (set! result (append (if (null? tests)(list waitontest-name) tests) result))))) waitons) (delete-duplicates result)))) |
︙ |
Modified launch.scm from [312826fb4b] to [0714961a30].
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + - + | ;; (set! script (conc script "source " prev-env)))) ;; call the command using mt_ezstep (set! script (conc "mt_ezstep " stepname " " (if prevstep prevstep "-") " " stepcmd)) (debug:print 4 "script: " script) |
︙ | |||
411 412 413 414 415 416 417 | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - + | (if rd rd (conc *toppath* "/runs")))) (lnkbase (conc linktree "/" target "/" runname)) (lnkpath (conc lnkbase "/" testname)) (lnkpathf (conc lnkpath (if not-iterated "" "/") item-path))) ;; Update the rundir path in the test record for all |
︙ | |||
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | + + - - + + + + | ;; if the test is iterated it is necessary to create the parent path ;; to the iteration. use pathname-directory to trim the path by one ;; level (if (not not-iterated) ;; i.e. iterated (let ((iterated-parent (pathname-directory (conc lnkpath "/" item-path)))) (debug:print 2 "INFO: Creating iterated parent " iterated-parent) (create-directory iterated-parent #t))) (if (symbolic-link? lnkpath) (delete-file lnkpath)) (if (not (or (file-exists? lnkpath) (symbolic-link? lnkpath))) (create-symbolic-link toptest-path lnkpath)) ;; The toptest path has been created, the link to the test in the linktree has ;; been created. Now, if this is an iterated test the real test dir must be created (if (not not-iterated) ;; this is an iterated test (let ((lnktarget (conc lnkpath "/" item-path))) (debug:print 2 "Setting up sub test run area") (debug:print 2 " - creating run area in " test-path) (create-directory test-path #t) ;; (system (conc "mkdir -p " test-path)) (debug:print 2 " - creating link from: " test-path "\n" " to: " lnktarget) ;; (create-directory lnkpath #t) ;; (system (conc "mkdir -p " lnkpath)) |
︙ |
Modified megatest.scm from [1c46bfdb07] to [eb94f77d10].
︙ | |||
377 378 379 380 381 382 383 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - - - - | ;; run all tests are are Not COMPLETED and PASS or CHECK (if (args:get-arg "-runall") (general-run-call "-runall" "run all tests" (lambda (target runname keys keynames keyvallst) |
︙ | |||
601 602 603 604 605 606 607 | 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | - + | (logfile (args:get-arg "-setlog"))) (change-directory testpath) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) (if (and state status) |
︙ | |||
671 672 673 674 675 676 677 | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 | - + - + | ((tcsh csh ksh) ">&") ((zsh bash sh ash) "2>&1 >") (else ">&"))) (fullcmd (conc "(" (string-intersperse (cons cmd params) " ") ") " redir " " logfile))) ;; mark the start of the test |
︙ |
Modified runs.scm from [13028d0fd1] to [a54f46b638].
︙ | |||
297 298 299 300 301 302 303 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 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 421 422 423 424 425 426 427 428 429 430 | - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + - + - - + + + - - + + + + + - + - + - - + + + + | (loop (car remtests)(cdr remtests))))))) (if (not (null? required-tests)) (debug:print 1 "INFO: Adding " required-tests " to the run queue")) ;; NOTE: these are all parent tests, items are not expanded yet. (debug:print 4 "INFO: test-records=" (hash-table->alist test-records)) (runs:run-tests-queue run-id runname test-records keyvallst flags) |
︙ | |||
425 426 427 428 429 430 431 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + - - - - + - - + + - - - + + + + - + | (begin (debug:print 1 "WARN: Dropping test " (db:test-get-testname hed) "/" (db:test-get-item-path hed) " from the launch list as it has prerequistes that are FAIL") (thread-sleep! *global-delta*) (loop (car tal)(cdr tal) (cons hed reruns))) (begin (debug:print 1 "WARN: Test not processed correctly. Could be a race condition in your test implementation? " hed) ;; " as it has prerequistes that are FAIL. (NOTE: hed is not a vector)") (thread-sleep! *global-delta*) |
︙ | |||
507 508 509 510 511 512 513 | 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - - - - - - + + - + - + - - - + - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + | ", removing it from to-do list") (if (not (null? tal)) (begin (thread-sleep! *global-delta*) (loop (car tal)(cdr tal)(cons hed reruns))))) (else (debug:print 8 "ERROR: No handler for this condition.") |
︙ |
Modified tests/Makefile from [53526c0eed] to [46cfd15912].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + + + + - + | # run some tests BINPATH=$(shell realpath ../bin) MEGATEST=$(BINPATH)/megatest PATH := $(BINPATH):$(PATH) RUNNAME := $(shell date +w%V.%u.%H.%M) IPADDR := "-" # Set SERVER to "-server -" SERVER := DEBUG := 1 |
︙ |
Modified tests/simplerun/megatest.config from [c650ee9676] to [3fbc57ac34].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + - + | [fields] SYSTEM TEXT RELEASE TEXT [setup] # Adjust max_concurrent_jobs to limit how much you load your machines max_concurrent_jobs 50 # This is your link path, you can move it but it is generally better to keep it stable |
Modified tests/simplerun/tests/test1/step1.sh from [67f9a133dc] to [a96d5c2635].
1 2 3 | 1 2 3 4 | + | #!/usr/bin/env bash # Run your step here echo Got here! |
Modified tests/simplerun/tests/test1/step2.sh from [67f9a133dc] to [b3e19b3724].
1 2 3 | 1 2 3 4 5 | + + | #!/usr/bin/env bash # Run your step here echo Got here eh! |
Modified tests/simplerun/tests/test1/testconfig from [9ddcfab86d] to [57935abc84].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | # Add additional steps here. Format is "stepname script" [ezsteps] step1 step1.sh step2 step2.sh # Test requirements are specified here [requirements] |
︙ |
Modified tests/tests.scm from [ca5a9de19f] to [8b33f1945e].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + + + + + + + + | (require-extension test) (define test-work-dir (current-directory)) ;; read in all the _record files (let ((files (glob "*_records.scm"))) (for-each (lambda (file) (print "Loading " file) (load file)) files)) (define conffile #f) (test "Read a config" #t (hash-table? (read-config "test.config" #f #f))) (test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.config" #f #f))) (set! conffile (read-config "test.config" #f #f)) (test "Get available diskspace" #t (number? (get-df "./"))) |
︙ | |||
121 122 123 124 125 126 127 128 129 130 131 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | + - - + + + - + - - + + - - - + - + - + + + + + - + - + - - - | (test #f #t (let ((db (open-test-db testdbpath))) (set! *tdb* db) (sqlite3#database? db))) (sqlite3#finalize! *tdb*) ;; (test "Remove the rollup run" #t (begin (remove-runs) #t)) ;; (set! *verbosity* 20) (test "Run a test" #t (general-run-call "-runtests" "run a test" (lambda (target runname keys keynames keyvallst) |