Skip to contentSkip to conversation

ptest-runner: compatibile with busybox

PATCH Superseded [email protected] 2 participants 2 messages Sep 23, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptest-runner: compatibile with busybox

From: Roy Li <[email protected]>

Do not use pushd, busybox does not support it if system only has busybox; run-ptests are always installed under ${libdir}, not linked into ${libdir}, so do not need to find run-ptest under a link, that avoid to use -L option when use find command

---
 meta/recipes-support/ptest-runner/files/ptest-runner |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta/recipes-support/ptest-runner/files/ptest-runner +2 -14
index ccb0434..3c89073 100644
@@ -7,24 +7,12 @@ do
 
     [ ! -d "$libdir" ] && continue
 
-    cd "$libdir"
-    for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x`
+    for x in `find $libdir -name run-ptest -type f`
     do
-        # test if a dir is linking to one that they are under same directory
-        # like perl5-->perl
-        ptestdir=`dirname $x|cut -f2 -d"/"`
-        if [ -h "$ptestdir" ]; then
-            linkdir=`readlink -f "$ptestdir"`
-            if [ `dirname "$linkdir"` = "$libdir" ]; then
-                continue
-            fi
-        fi
-    
         date "+%Y-%m-%dT%H:%M"
         echo "BEGIN: $x"
-        pushd `dirname "$x"`
+        cd `dirname "$x"`
         ./run-ptest
-        popd
         echo "END: $x"
         date "+%Y-%m-%dT%H:%M"
     done
Signature · 1 line
1.7.10.4
#1 lore raw

meta/recipes-support/ptest-runner/files/ptest-runner do · line 14

Quoted 2 lines · [email protected] wrote:
meta/recipes-support/ptest-runner/files/ptest-runner +2 -0
+    for x in `find $libdir -name run-ptest -type f`
+        cd `dirname "$x"`

You can get this list of ptest dirs by just running ls -d */ptest. It is simpler and also much faster than using "find".

Signature · 1 line
Björn