]> code.ossystems Code Review - openembedded-core.git/commitdiff
ptest-runner: compatibile with busybox
authorRoy Li <rongqing.li@windriver.com>
Tue, 24 Sep 2013 01:16:23 +0000 (09:16 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Sep 2013 16:47:50 +0000 (17:47 +0100)
Do not use pushd, busybox does not support it if system only has busybox;
Replace find command with ls to avoid some busybox's find unsupported options;

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/ptest-runner/files/ptest-runner

index ccb04341c855b1f6671a4a1a2f6a66e4d3417589..33424134c5e1f480e4ac693fa4f20ddbe584135c 100644 (file)
@@ -7,24 +7,15 @@ do
 
     [ ! -d "$libdir" ] && continue
 
-    cd "$libdir"
-    for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x`
+    for x in `ls -d $libdir/*/ptest 2>/dev/null`
     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
-    
+        [ ! -f $x/run-ptest ] && continue
+        [ -h `dirname $x` ] && continue
+
         date "+%Y-%m-%dT%H:%M"
         echo "BEGIN: $x"
-        pushd `dirname "$x"`
+        cd "$x"
         ./run-ptest
-        popd
         echo "END: $x"
         date "+%Y-%m-%dT%H:%M"
     done