From: David Goulet Date: Mon, 18 Jul 2011 00:26:45 +0000 (-0400) Subject: Remove not working test X-Git-Tag: v2.0-pre1~19 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=0b8091d3f931437d2035cfa70549c5aa15b41aac Remove not working test Signed-off-by: David Goulet --- diff --git a/tests/Makefile.am b/tests/Makefile.am index e1c39bd3d..76ed2b545 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = . ltt-sessiond +SUBDIRS = . dist_noinst_SCRIPTS = runall.sh diff --git a/tests/ltt-sessiond/Makefile.am b/tests/ltt-sessiond/Makefile.am deleted file mode 100644 index 2614c56c9..000000000 --- a/tests/ltt-sessiond/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_SCRIPTS = run.sh -EXTRA_DIST = run.sh diff --git a/tests/ltt-sessiond/run.sh b/tests/ltt-sessiond/run.sh deleted file mode 100755 index 0f89d8b35..000000000 --- a/tests/ltt-sessiond/run.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 - David Goulet -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -PWD=$(dirname $0) - -SESSIOND_CLIENT_SOCK_PATH="/tmp/.test-sessiond-client" -SESSIOND_APPS_SOCK_PATH="/tmp/.test-sessiond-apps" -SESSIOND_BIN="$PWD/../../ltt-sessiond/ltt-sessiond" -LTTNG_BIN="$PWD/../../lttng/lttng" -#SESSIOND_ARGS="-c $SESSIOND_CLIENT_SOCK_PATH -a $SESSIOND_APPS_SOCK_PATH" -SESSIOND_ARGS="" -SESSION_ID_REGEX=".[[:alnum:]]{8}" - -function clean_exit() -{ - echo "[+] Shuting down session daemon..." - kill -s SIGTERM $pid - exit $1 -} - -# Exec $1, check error code. -# If 0, return output, else, stop execution -# and return and error. -function check_ret_code() -{ - if [ $1 -ne 0 ]; then - printf "\n!STOPPING!\n" - clean_exit 1 - fi -} - -# Create session with $1 and return output. -function lttng_create_session() -{ - local command="$LTTNG_BIN -c $1" - local ret=$($command) - LTTNG_RET_CODE=$? - - # Extract session UUID - if [[ "$ret" =~ $SESSION_ID_REGEX ]]; then - LTTNG_SESSION_ID="$BASH_REMATCH" - fi -} - -# List sessions and return output. -function lttng_list_session() -{ - local command="$LTTNG_BIN --list-sessions" - local ret=$(lttng_command "$command") - - if [[ "$result" =~ $session_id ]]; then - printf "SUCCESS!\n" - else - printf "FAIL!\n" - printf "Missing $session_id!\n" - exit 1 - fi - echo "$ret" -} - -function test_destroy_session() -{ - local command="$LTTNG_BIN -d $LTTNG_SESSION_ID" - local ret=$($command) - check_ret_code $LTTNG_RET_CODE - echo "[+] Destroy session: PASSED!" -} - -function test_one_session() -{ - lttng_create_session "test1" - check_ret_code $LTTNG_RET_CODE - echo "[+] Session creation: PASSED!" -} - -function test_session_same_name() -{ - lttng_create_session "test-same" - lttng_create_session "test-same" - if [ $LTTNG_RET_CODE -ne 0 ]; then - echo "[-] Session with the same name: FAILED!" - printf "Two session having the same name NOT ALLOWED\n" - clean_exit 1 - fi - echo "[+] Session with the same name: PASSED!" -} - -if [ ! -x $SESSIOND_BIN ]; then - echo "Please use make before test execution" - exit 1 -fi - -# Daemonized by the -d -./$SESSIOND_BIN $SESSIOND_ARGS -d -echo "[+] Session daemon started" - -pid=$(pidof lt-ltt-sessiond) -if [ -z "$pid" ]; then - echo "[-] Can't found session daemon" - ./$SESSIOND_BIN $SESSIOND_ARGS - exit 1 -fi -echo "[+] Got the session daemon pid $pid" - -printf "=== Starting tests ===\n" - -test_one_session - -test_destroy_session - -test_session_same_name - -clean_exit 0 - diff --git a/tests/runall.sh b/tests/runall.sh index a1db92d70..866f45adf 100755 --- a/tests/runall.sh +++ b/tests/runall.sh @@ -40,8 +40,6 @@ function run() { #### ADD TESTS HERE #### -run ltt-sessiond/run.sh - #### END TESTS HERE #### echo "--------------------------"