diff --git a/test/app-emu/screen/run.sh b/test/app-emu/screen/run.sh new file mode 100644 index 000000000..739f8eae8 --- /dev/null +++ b/test/app-emu/screen/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +crtools="../../../crtools" + +set -x + +echo "Creating reference objects" + +screen -d -m -S crtools-zdtm +pid=$(screen -list | grep '\.*Detached' | sed 's/\s*\([0-9]*\).*/\1/'); +echo PID=$pid + +mkdir dump + +${crtools} dump -D dump -o dump.log -v 4 -t ${pid} || { + echo "Dump failed" + exit 1 +} + +echo "Dumped, restoring and waiting for completion" + +${crtools} restore -d -D dump -o restore.log -v 4 -t ${pid} || { + echo "Restore failed" + exit 1 +} + +echo PASS