Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -311,10 +311,13 @@ $(PREFIX)/bin/mt-new-to-old.sh : utils/mt-new-to-old.sh $(INSTALL) $< $@ chmod a+x $@ +$(PREFIX)/bin/convert-db.sh : utils/convert-db.sh + $(INSTALL) $< $@ + chmod a+x $@ deploytarg/nbfake : utils/nbfake $(INSTALL) $< $@ chmod a+x $@ @@ -358,10 +361,11 @@ install : $(PREFIX)/bin/.$(ARCHSTR) $(PREFIX)/bin/.$(ARCHSTR)/mtest $(PREFIX)/bin/megatest \ $(PREFIX)/bin/.$(ARCHSTR)/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake \ $(PREFIX)/bin/.$(ARCHSTR)/mtexec $(PREFIX)/bin/mtexec $(PREFIX)/bin/serialize-env \ $(PREFIX)/bin/nbfind $(PREFIX)/bin/mtrunner $(PREFIX)/bin/viewscreen $(PREFIX)/bin/mt_xterm \ $(PREFIX)/bin/mt-old-to-new.sh $(PREFIX)/bin/mt-new-to-old.sh \ + $(PREFIX)/bin/convert-db.sh $(PREFIX)/bin/convert-db.sh \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun $(PREFIX)/bin/mtutil \ $(PREFIX)/bin/tcmt $(PREFIX)/share/db/mt-pg.sql \ $(PREFIX)/share/js/jquery-3.1.0.slim.min.js \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so \ ADDED utils/convert-db.sh Index: utils/convert-db.sh ================================================================== --- /dev/null +++ utils/convert-db.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [ -z "megatest.config" ]; then + echo "The file 'megatest.config' does not exist. This must be run in a megatest area." + exit 1 +fi +if [ -d ".mtdb" ]; then + echo "The .mtdb directory already exists. Will not do the conversion" + exit 1 +fi +if [ -d ".megatest" ]; then + echo "Found a .megatest directory. Will convert from megatest 1.70 to 1.71/1.80 format" + /p/foundry/env/pkgs/megatest/1.70/16/bin/megatest -list-runs % -dumpmode sexpr > data.sexpr +else + if [ -f "megatest.db" ]; then + echo "Found megatest.db. Will convert from megatest 1.65 to 1.71/1.80 format" + /p/foundry/env/pkgs/megatest/1.65/92/bin/megatest -list-runs % -dumpmode sexpr > data.sexpr + else + echo "Did not find .megatest or megatest.db. Cannot do the conversion" + exit 1 + fi +fi +which megatest +megatest -import-sexpr data.sexpr +