+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2010 Intel Corporation
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Author:
-# Cao, Jenny <jenny.q.cao@intel.com>
-# Yue, jianhui <jianhuix.a.yue@intel.com>
-
-if [ $# != 1 ];then
- echo "usage $0 + packagename"
-fi
-
-PACKAGENAME="/opt/tct-ext01-wrt-tests/$1"
-p_name=$1
-APP_NAME=${p_name%.*}
-WIDGETNAME=`wrt-launcher -l|grep $APP_NAME|awk '{print $NF}'`
-
-if [ -n $WIDGETNAME ];then
- wrt-installer -un $WIDGETNAME 1>/tmp/uninstaller.log 2>&1
- sleep 5
-fi
-wrt-installer -i $PACKAGENAME 1>/tmp/installer.log 2>&1
-sleep 5
-WIDGETNAME=`wrt-launcher -l|grep $APP_NAME|awk '{print $NF}'`
-
-RET=`grep "installation was successful" /tmp/installer.log `
-if [ -z "$RET" ]; then
- echo -e "wrt-installer install widget failed!"
- exit 1
-else
- echo -e " wrt-installer install widget successfully!"
- wrt-installer -un $WIDGETNAME 1>/dev/null 2>&1
- exit 0
-fi
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2010 Intel Corporation
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Author:
-# Cao, Jenny <jenny.q.cao@intel.com>
-# Yue, jianhui <jianhuix.a.yue@intel.com>
-
-if [ $# != 1 ];then
- echo "usage $0 + packagename"
-fi
-
-PACKAGENAME="/opt/tct-ext01-wrt-tests/$1"
-p_name=$1
-APP_NAME=${p_name%%.wgt}
-WIDGETNAME= $(wrt-launcher -l|grep "$APP_NAME"|awk '{print $NF}')
-
-wrt-installer -un $WIDGETNAME 1>/tmp/uninstaller.log 2>&1
-wrt-installer -i $PACKAGENAME 1>/tmp/installer.log 2>&1
-
-RET=`grep "installation was successful" /tmp/installer.log `
-if [ -z "$RET" ]
-then
- echo -e "wrt-installer install widget failed!"
- exit 0
-else
- echo -e " wrt-installer install widget successfully!"
- wrt-installer -un $WIDGETNAME 1>/dev/null 2>&1
- exit 1
-fi
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2010 Intel Corporation
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Author:
-# Cao, Jenny <jenny.q.cao@intel.com>
-# Yue, jianhui <jianhuix.a.yue@intel.com>
-
-if [ $# != 1 ];then
- echo "usage $0 + packagename"
-fi
-
-PACKAGENAME="/opt/tct-ext01-wrt-tests/$1"
-p_name=$1
-APP_NAME=${p_name%%.wgt}
-APPID=$(wrt-launcher -l | grep "$APP_NAME" | awk '{print $NF}')
-
-wrt-installer -un $APPID 1>/tmp/uninstaller.log 2>&1
-sleep 5
-wrt-installer -i $PACKAGENAME 1>/dev/null 2>&1
-sleep 5
-APPID=$(wrt-launcher -l | grep "$APP_NAME" | awk '{print $NF}')
-wrt-installer -un $APPID 1>/tmp/uninstaller.log 2>&1
-sleep 5
-
-RET=`grep "uninstallation was successful" /tmp/uninstaller.log `
-if [ -z "$RET" ]
-then
- echo -e "wrt-installer uninstall widget failed!"
- exit 1
-else
- echo -e " wrt-installer uninstall widget successfully!"
- exit 0
-fi
RET=`grep "installation was successful" /tmp/installer.log `
if [ -z "$RET" ]; then
echo -e "wrt-installer install widget failed!"
+ rm -f /tmp/installer.log
+ rm -f /tmp/uninstaller.log
exit 1
else
echo -e " wrt-installer install widget successfully!"
wrt-installer -un $WIDGETNAME 1>/dev/null 2>&1
+ rm -f /tmp/installer.log
+ rm -f /tmp/uninstaller.log
exit 0
fi
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2010 Intel Corporation
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Author:
-# Cao, Jenny <jenny.q.cao@intel.com>
-# Yue, jianhui <jianhuix.a.yue@intel.com>
-
-if [ $# != 1 ];then
- echo "usage $0 + packagename"
-fi
-
-PACKAGENAME="/opt/tct-ext02-wrt-tests/$1"
-p_name=$1
-APP_NAME=${p_name%%.wgt}
-WIDGETNAME= $(wrt-launcher -l|grep "$APP_NAME"|awk '{print $NF}')
-
-wrt-installer -un $WIDGETNAME 1>/tmp/uninstaller.log 2>&1
-wrt-installer -i $PACKAGENAME 1>/tmp/installer.log 2>&1
-
-RET=`grep "installation was successful" /tmp/installer.log `
-if [ -z "$RET" ]
-then
- echo -e "wrt-installer install widget failed!"
- exit 0
-else
- echo -e " wrt-installer install widget successfully!"
- wrt-installer -un $WIDGETNAME 1>/dev/null 2>&1
- exit 1
-fi
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2010 Intel Corporation
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Author:
-# Cao, Jenny <jenny.q.cao@intel.com>
-# Yue, jianhui <jianhuix.a.yue@intel.com>
-
-if [ $# != 1 ];then
- echo "usage $0 + packagename"
-fi
-
-PACKAGENAME="/opt/tct-ext02-wrt-tests/$1"
-p_name=$1
-APP_NAME=${p_name%%.wgt}
-APPID=$(wrt-launcher -l | grep "$APP_NAME" | awk '{print $NF}')
-
-wrt-installer -un $APPID 1>/tmp/uninstaller.log 2>&1
-sleep 5
-wrt-installer -i $PACKAGENAME 1>/dev/null 2>&1
-sleep 5
-APPID=$(wrt-launcher -l | grep "$APP_NAME" | awk '{print $NF}')
-wrt-installer -un $APPID 1>/tmp/uninstaller.log 2>&1
-sleep 5
-
-RET=`grep "uninstallation was successful" /tmp/uninstaller.log `
-if [ -z "$RET" ]
-then
- echo -e "wrt-installer uninstall widget failed!"
- exit 1
-else
- echo -e " wrt-installer uninstall widget successfully!"
- exit 0
-fi
+++ /dev/null
-#!/usr/bin/env python
-import time
-import os
-print 'Content-Type: text/html\n\n'
-while True:
- i = raw_input()
- if i is None:
- break
- if str(i).strip()=='':
- break
- n = 1
- if os.path.isfile('/tmp/csp-report.log'):
- file_object_num = open('/tmp/csp-report.log','r')
- for line in file_object_num:
- if str(line).find("Time:") >= 0:
- n = n+1
- file_object_num.close( )
- file_object = open('/tmp/csp-report.log', 'a')
- file_object.write('\n %d Time:' %n)
- file_object.write( time.strftime(' %Y-%m-%d %H:%M:%S',time.localtime(time.time())))
- file_object.write('\n')
- file_object.write(' Data:')
- file_object.write(i)
- file_object.write('\n')
- file_object.close( )
- print i
RET3=`grep "uninstallation failed" /tmp/uninstaller.log `
if [ -z "$RET3" ]; then
echo -e "informed failure of uninstallation failed!"
+ rm -f /tmp/uninstaller.log
exit 1
else
echo -e "informed failure of uninstallation successfully!"
+ rm -f /tmp/uninstaller.log
exit 0
fi