stressit_em
892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
SHMKEY=$$
#echo shmkey is $SHMKEY
$ROOT/usr/etc/driverd &
DRIVERD_PID=$!
#echo driverd pid is $DRIVERD_PID
if [ $# -ne 0 ]
then
$ROOT/usr/sbin/emulate -e -a "$*" -k $SHMKEY stress_em rom_em &
else
$ROOT/usr/sbin/emulate -e -k $SHMKEY stress_em rom_em &
fi
EMULATE_PID=$!
#echo emulate pid is $EMULATE_PID
$ROOT/usr/tv/bin/dbgif -kcdbr -e $EMULATE_PID &
DBGIF_PID=$!
#echo dbgif pid is $DBGIF_PID
trap "killall emulate stressui; kill -9 $DRIVERD_PID $DBGIF_PID; ipcrm -M $$; exit" 1 2 3 15
#echo start user interface
#echo emulate pid is $EMULATE_PID dbgif pid is $DBGIF_PID
# Ui key pid_of_emulate
cd Ui
stressui ../stresstcl_em.so $$ $EMULATE_PID ../stresstcl_em.so
echo "killing driverd, emulate and dbgif $DRIVERD_PID $EMULATE_PID $DBGIF_PID"
kill -2 $EMULATE_PID
kill -9 $DRIVERD_PID $DBGIF_PID
ipcrm -M $$
exit 0