make worlddump a function

This makes it simpler to call it all over the place.

Change-Id: Ib2a6296c590db7a05577abeef5c01fc455bb7b17
This commit is contained in:
Sean Dague 2015-05-12 12:10:22 -04:00
parent 349efaae08
commit b425bb3041

View File

@ -86,6 +86,15 @@ function save_data {
fi
}
function worlddump {
if [[ -x $TARGET_DEVSTACK_DIR/tools/worlddump.py ]]; then
$TARGET_DEVSTACK_DIR/tools/worlddump.py -d $LOGDIR
sleep 1
else
echo "WARNING: Attempted to worlddump but couldn't find $TARGET_DEVSTACK_DIR/tools/worlddump.py"
fi
}
# Setup Exit Traps for debug purposes
trap exit_trap EXIT
@ -108,12 +117,8 @@ function exit_trap {
while caller $frame; do
((frame++));
done
echo "Exit code: $r"
if [[ -x $TARGET_DEVSTACK_DIR/tools/worlddump.py ]]; then
$TARGET_DEVSTACK_DIR/tools/worlddump.py -d $LOGDIR
sleep 1
fi
worlddump
fi
exit $r
}