From 295c3b3222fbf7f414c5802c6af86bedadbc009a Mon Sep 17 00:00:00 2001 From: Imran Zaman Date: Mon, 17 Jun 2013 18:05:14 +0300 Subject: updated distribution specific changes --- tools/archive.sh | 6 +++++ tools/prepare-tizen.sh | 22 +++++++++++++++++ tools/run-tests.sh | 16 ++++++++++++ tools/setup-and-start-daemon.sh | 54 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100755 tools/archive.sh create mode 100755 tools/prepare-tizen.sh create mode 100755 tools/run-tests.sh create mode 100755 tools/setup-and-start-daemon.sh (limited to 'tools') diff --git a/tools/archive.sh b/tools/archive.sh new file mode 100755 index 0000000..b28d24f --- /dev/null +++ b/tools/archive.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +git archive --format=tar --prefix=gsignond-0.0.0/ -o ../gsignond-0.0.0.tar daemon +bzip2 ../gsignond-0.0.0.tar +mv ../gsignond-0.0.0.tar.bz2 ~/rpmbuild/SOURCES/ + diff --git a/tools/prepare-tizen.sh b/tools/prepare-tizen.sh new file mode 100755 index 0000000..d4329b2 --- /dev/null +++ b/tools/prepare-tizen.sh @@ -0,0 +1,22 @@ +# $1 corresponds to gsignond-.tar.gz +# $2 is the destination folder +# NOTE: all the files will be extracted under destination folder (instead of destfolder/gsignond-) + +if [ $# -ne 2 -o -z "$1" -o -z "$2" ]; then + echo "Invalid arguments supplied" + echo "Usage: ./prepare-tizen.sh gsignond-.tar.gz destfolder" + echo "NOTE: All the files will be extracted under destfolder (instead of destfolder/gsignond-)" + exit +fi + +currdir = `pwd`; +echo "CURR dir = $currdir" + +mkdir -p $2 && \ +tar -xzvf $1 -C $2 --strip-components 1 && \ +cd $2 && \ +mkdir -p packaging && \ +cd packaging && \ +cp -f ../dists/rpm/gsignond-tizen.spec gsignond.spec && +cp -f ../dists/rpm/gsignond-tizen.changes gsignond.changes; + diff --git a/tools/run-tests.sh b/tools/run-tests.sh new file mode 100755 index 0000000..0d271d4 --- /dev/null +++ b/tools/run-tests.sh @@ -0,0 +1,16 @@ +#Environment variables for the tests +export G_MESSAGES_DEBUG=all +export SSO_STORAGE_PATH=/tmp/gsignond +export SSO_SECRET_PATH=/tmp/gsignond + +rm -rf "$SSO_STORAGE_PATH" + +make distclean; +autoreconf -fi; +./configure --enable-dbus-type=session --enable-debug && \ +make -j4 && make check && make distclean && \ +./configure --enable-dbus-type=system --enable-debug && \ +make -j4 && make check && make distclean && \ +./configure --enable-dbus-type=p2p --enable-debug && \ +make -j4 && make check && make distclean; + diff --git a/tools/setup-and-start-daemon.sh b/tools/setup-and-start-daemon.sh new file mode 100755 index 0000000..a7ecd8b --- /dev/null +++ b/tools/setup-and-start-daemon.sh @@ -0,0 +1,54 @@ +SRC_HOME="." +with_duma=0 +with_gdb=0 + +if test $# -ge 1 ; then + if test "$1" == "--with-duma" ; then + with_duma=1 + with_gdb=1 + else + with_duma=0 + if test "$1" == "--with-gdb" ; then + with_gdb=1 + fi + fi +fi + +killall gsignond + +export SSO_SECRET_PATH="/tmp/gsignond" +export SSO_STORAGE_PATH="/tmp/gsignond" +if [ -f "$SRC_HOME/test/daemon/.libs/lt-daemontest" ] ; then +export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/lt-daemontest" +else +export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/daemontest" +fi +export SSO_BIN_DIR=$SRC_HOME/src/daemon/.libs +export SSO_PLUGINS_DIR=$SRC_HOME/src/plugins/.libs +export LD_LIBRARY_PATH="$SRC_HOME/src/daemon/plugins/plugind/.libs:$SRC_HOME/src/daemon/plugins/.libs" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SRC_HOME/src/common/.libs:$SRC_HOME/src/common/db/.libs:$SRC_HOME/src/daemon/.libs:$SRC_HOME/src/daemon/db/.libs:$SRC_HOME/src/daemon/dbus/.libs" +export G_MESSAGES_DEBUG="all" + +# Clean db +rm -rf /tmp/gsignond + +echo "--------------------------" +echo "with_duma: $with_duma" +echo "with_gdb: $with_gdb" +echo "--------------------------" +if test $with_duma -eq 1 ; then + export G_SLICE="always-malloc" + export DUMA_PROTECT_FREE=1 + export DUMA_PROTECT_BELOW=1 + + LD_PRELOAD="libduma.so" $SRC_HOME/src/daemon/.libs/gsignond & + + if test $with_gdb -eq 1 ; then + sudo gdb --pid=`pidof gsignond` + fi +elif test $with_gdb -eq 1 ; then + gdb $SRC_HOME/src/daemon/.libs/gsignond +else + $SRC_HOME/src/daemon/.libs/gsignond +fi + -- cgit v1.2.3