Author: sebastien.lelong
Date: Fri Oct 31 08:11:28 2008
New Revision: 508

Modified:
    trunk/tools/build/compile.sh
    trunk/tools/build/validate.sh

Log:
done mini build script

Modified: trunk/tools/build/compile.sh
==============================================================================
--- trunk/tools/build/compile.sh        (original)
+++ trunk/tools/build/compile.sh        Fri Oct 31 08:11:28 2008
@@ -1,39 +1,51 @@
  #!/bin/bash

  export JALLIB_ROOT=`pwd`      # correct when set by buildbot
+###export JALLIB_ROOT=`pwd`/../..      # run manually here
  export JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
  export JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample

-echo JALLIB_ROOT=$JALLIB_ROOT
-echo JALLIB_ENV=$JALLIB_ENV
-echo JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
-echo JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample
-echo JALLIB_JALV2=$JALLIB_JALV2
-echo JALLIB_PYTHON=$JALLIB_PYTHON
-
-

  jalsamples=`find $JALLIB_SAMPLEDIR/by_device -name \*.jal -type f`
  echo `echo $jalsamples | sed "s#\.jal #.jal\n#g" | wc -l` samples to  
compile...

  at_least_one_failed=0
+counter=0
+
+echo "" > /tmp/compile.out

  for sample in $jalsamples
  do
-   echo -n sample: $sample ...
-   $JALLIB_PYTHON $JALLIB_ROOT/tools/jallib.py compile $sample >  
/tmp/compiler.out 2>&1
-   if [ "$?" = "0" ]
-   then
-         echo OK
-   else
-         echo Failed !
-         cat /tmp/compiler.out
-         echo -- jalv2 output --
-         echo $output
-         echo -- -- --
-         at_least_one_failed=1
-   fi
+       $JALLIB_PYTHON $JALLIB_ROOT/tools/jallib.py compile $sample >  
/tmp/tmpcomp.out 2>&1
+       if [ "$?" != "0" ]
+       then
+               echo sample: $sample ... Failed >> /tmp/compile.out
+               echo -- jalv2 output -- >> /tmp/compile.out
+               cat /tmp/tmpcomp.out >> /tmp/compile.out
+               echo -- -- -- >> /tmp/compile.out
+               at_least_one_failed=1
+               counter=`expr $counter + 1`
+       fi
  done

-rm -f /tmp/compiler.out
+if [ "$counter" = "0" ]
+then
+       echo "All samples compile :)"
+else
+       echo "$counter samples can't be compiled..."
+       echo
+       cat /tmp/compile.out
+       echo
+fi
+
+echo JALLIB_ROOT=$JALLIB_ROOT
+echo JALLIB_ENV=$JALLIB_ENV
+echo JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
+echo JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample
+echo JALLIB_JALV2=$JALLIB_JALV2
+echo JALLIB_PYTHON=$JALLIB_PYTHON
+
+
+
+rm -f /tmp/compile.out
  exit $at_least_one_failed

Modified: trunk/tools/build/validate.sh
==============================================================================
--- trunk/tools/build/validate.sh       (original)
+++ trunk/tools/build/validate.sh       Fri Oct 31 08:11:28 2008
@@ -1,17 +1,10 @@
  #!/bin/bash

  export JALLIB_ROOT=`pwd`      # correct when set by buildbot
+###export JALLIB_ROOT=`pwd`/../..      # run manually here
  export JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
  export JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample

-echo JALLIB_ROOT=$JALLIB_ROOT
-echo JALLIB_ENV=$JALLIB_ENV
-echo JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
-echo JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample
-echo JALLIB_JALV2=$JALLIB_JALV2
-echo JALLIB_PYTHON=$JALLIB_PYTHON
-
-
  jalsamples=`find $JALLIB_SAMPLEDIR/by_device -name \*.jal -type f`
  jallibs=`find $JALLIB_REPOS -name \*.jal -type f`

@@ -19,23 +12,44 @@
  echo `echo $jallibs | sed "s#\.jal #.jal\n#g" | wc -l` libraries to  
validate...

  at_least_one_failed=0
+counter=0
+
+echo "" > /tmp/validate.out

  for jalfile in `echo $jalsamples $jallibs`
  do
-   echo -n file: $jalfile...
-   $JALLIB_PYTHON $JALLIB_ROOT/tools/jallib.py validate $jalfile>  
/tmp/validate.out 2>&1
-   if [ "$?" = "0" ]
-   then
-         echo OK
-   else
-         echo Failed !
-         cat /tmp/validate.out
-         echo -- jsg output --
-         echo $output
-         echo -- -- --
-         at_least_one_failed=1
-   fi
+       ##echo -n file: $jalfile...
+       $JALLIB_PYTHON $JALLIB_ROOT/tools/jallib.py validate $jalfile>  
/tmp/tmpval.out 2>&1
+       if [ "$?" != "0" ]
+       then
+               echo -- jsg output -- >> /tmp/validate.out
+               cat /tmp/tmpval.out >> /tmp/validate.out
+               echo -- -- -- >> /tmp/validate.out
+               echo >> /tmp/validate.out
+               at_least_one_failed=1
+               counter=`expr $counter + 1`             
+       fi
  done
+
+if [ "$counter" = "0" ]
+then
+       echo "All files validated :)"
+else
+       echo "$counter files can't be validated..."
+       echo
+       cat /tmp/validate.out
+       echo
+fi
+
+echo "Environment config"
+echo JALLIB_ROOT=$JALLIB_ROOT
+echo JALLIB_ENV=$JALLIB_ENV
+echo JALLIB_REPOS=$JALLIB_ROOT/$JALLIB_ENV/include
+echo JALLIB_SAMPLEDIR=$JALLIB_ROOT/$JALLIB_ENV/sample
+echo JALLIB_JALV2=$JALLIB_JALV2
+echo JALLIB_PYTHON=$JALLIB_PYTHON
+
+

  rm -f /tmp/validate.out
  exit $at_least_one_failed

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to