summaryrefslogtreecommitdiffstats
path: root/tests/libptxdisttest.sh
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-08-13 23:33:06 +0000
committerWolfram Sang <w.sang@pengutronix.de>2008-08-13 23:33:06 +0000
commit028ea9e7ad9a1b0ec1d9faf4bb5568b44b50801f (patch)
treeaa0eb35f1b3d3bd4c6ccbad8f345f5efbf463774 /tests/libptxdisttest.sh
parent0a0e36ca05824c69bc62f2e236879a2c7aa89b59 (diff)
downloadptxdist-028ea9e7ad9a1b0ec1d9faf4bb5568b44b50801f.tar.gz
ptxdist-028ea9e7ad9a1b0ec1d9faf4bb5568b44b50801f.tar.xz
* first set of test scripts also suitable for U-Boot1
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8744 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'tests/libptxdisttest.sh')
-rw-r--r--tests/libptxdisttest.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/libptxdisttest.sh b/tests/libptxdisttest.sh
index 3f7330430..be54c1a86 100644
--- a/tests/libptxdisttest.sh
+++ b/tests/libptxdisttest.sh
@@ -158,8 +158,10 @@ remote_busybox() {
remote_assure_process() {
if remote_busybox
then
- echo "remote \"ps | grep $1 | grep -v grep\"" >> "$LOGFILE"
- local ret=$(remote "ps | grep $1 | grep -v grep") 2>> "$LOGFILE"
+ #put brackets around the first char of search string, so grep won't hit its own pid
+ local lookfor="[${1:0:1}]${1:1}"
+ echo "remote \"ps | grep $lookfor\"" >> "$LOGFILE"
+ local ret=$(remote "ps | grep $lookfor") 2>> "$LOGFILE"
echo "$ret" | grep "$1[$ ]" 2>> "${PTXDIST_WORKSPACE}/test.log"
else
echo "remote \"ps axo s,comm | grep \\\"^S $1\\\"\"" >> "$LOGFILE"