Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -473,11 +473,11 @@ (itempath (db:test-get-item-path test)) (testfullname (test:test-get-fullname test)) (teststatus (db:test-get-status test)) (teststate (db:test-get-state test)) ;;(teststart (db:test-get-event_time test)) - (runtime (db:test-get-run_duration test)) + ;;(runtime (db:test-get-run_duration test)) (buttontxt (cond ((equal? teststate "COMPLETED") teststatus) ((and (equal? teststate "NOT_STARTED") (member teststatus '("ZERO_ITEMS" "BLOCKED" "PREQ_FAIL" "PREQ_DISCARDED" "TIMED_OUT" "KEEP_TRYING" "TEN_STRIKES"))) teststatus) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -524,11 +524,11 @@ (db:replace-test-records dbstruct run-id testrecs) (sqlite3:finalize! (dbr:dbstruct-get-rundb dbstruct)))) run-ids))) ;; now ensure all newdb data are synced to megatest.db - (if (member 'old2new options) + (if (member 'new2old options) (for-each (lambda (run-id) (let ((fromdb (if toppath (make-dbr:dbstruct path: toppath local: #t) #f))) (db:sync-tables db:sync-tests-only (db:get-db fromdb run-id) mtdb))) run-ids)) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -123,10 +123,11 @@ Misc -start-dir path : switch to this directory before running megatest -rebuild-db : bring the database schema up to date -cleanup-db : remove any orphan records, vacuum the db -import-megatest.db : migrate a database from v1.55 series to v1.60 series + -sync-to-megatest.db : migrate data back to megatest.db -update-meta : update the tests metadata for all tests -setvars VAR1=val1,VAR2=val2 : Add environment variables to a run NB// these are overwritten by values set in config files. -server -|hostname : start the server (reduces contention on megatest.db), use - to automatically figure out hostname @@ -269,10 +270,11 @@ "-mark-incompletes" "-convert-to-norm" "-convert-to-old" "-import-megatest.db" + "-sync-to-megatest.db" "-logging" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only ) @@ -1309,10 +1311,19 @@ 'adj-testids 'old2new 'new2old ) (set! *didsomething* #t))) + +(if (args:get-arg "-sync-to-megatest.db") + (begin + (db:multi-db-sync + #f ;; do all run-ids + 'new2old + ) + (set! *didsomething* #t))) + ;;====================================================================== ;; Exit and clean up ;;====================================================================== (if *runremote* (close-all-connections!))