Overview
Comment: | updated mt-old-to-new.sh to fix the wrap arround |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.70 |
Files: | files | file ages | folders |
SHA1: |
3d09b9433eb9d95a3c8411fcdd377151 |
User & Date: | pjhatwal on 2022-07-14 10:31:47 |
Other Links: | branch diff | manifest | tags |
Context
2022-07-21
| ||
10:19 | corrected typo check-in: c88e33816f user: mmgraham tags: v1.70 | |
2022-07-14
| ||
10:31 | updated mt-old-to-new.sh to fix the wrap arround check-in: 3d09b9433e user: pjhatwal tags: v1.70 | |
2022-06-13
| ||
19:25 | Changed megatest version to v1.7004 check-in: ba39e7edd8 user: mmgraham tags: v1.70, v1.7004 | |
Changes
Modified utils/mt-old-to-new.sh from [0e59c08737] to [ebb7c5975c].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/bash mkdir -p .megatest cp megatest.db .megatest/main.db sqlite3 .megatest/main.db << END_SQL delete from tests; delete from test_steps; END_SQL version_id=$(sqlite3 .megatest/main.db "select id from metadat where var = 'MEGATEST_VERSION'") current_version=$(megatest -version) sqlite3 .megatest/main.db "replace into metadat (id,var,val) values($version_id,'MEGATEST_VERSION','$current_version')" sqlite3 megatest.db 'select id from runs' > runs.txt for run in $(cat runs.txt) do dbnum=$(($run%100)) | > > > > > > > > > > | | | | | | | | > > > | 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 30 31 32 33 34 35 36 37 38 39 40 41 | #!/bin/bash if [ -d ".megatest" ] then echo ".megatest directory present." echo "You have already migerated. " exit fi mkdir -p .megatest cp megatest.db .megatest/main.db sqlite3 .megatest/main.db << END_SQL delete from tests; delete from test_steps; END_SQL version_id=$(sqlite3 .megatest/main.db "select id from metadat where var = 'MEGATEST_VERSION'") current_version=$(megatest -version) sqlite3 .megatest/main.db "replace into metadat (id,var,val) values($version_id,'MEGATEST_VERSION','$current_version')" sqlite3 megatest.db 'select id from runs' > runs.txt for run in $(cat runs.txt) do echo "working on run id $run" dbnum=$(($run%100)) if [ ! -f ".megatest/$dbnum.db" ] then dbnum=$(($run%100)) cp megatest.db .megatest/$dbnum.db sqlite3 .megatest/$dbnum.db << END_SQL delete from tests where run_id in (select id from runs where id%100!=$dbnum); delete from test_data; delete from test_meta; delete from test_rundat; delete from test_steps where not exists ( select id from tests where tests.id = test_steps.test_id); replace into metadat (id,var,val) values($version_id,'MEGATEST_VERSION','$current_version'); VACUUM; END_SQL fi done |