From 682b9d672c751fb2471443a038d26592a13eb42f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 12 Sep 2012 20:03:01 +0400 Subject: [PATCH] app-test: check screen application Add test for screen c/r. Signed-off-by: Andrey Vagin Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- test/app-emu/screen/run.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/app-emu/screen/run.sh 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