gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r123552 - /gump/branches/Dec04MajorCleanup/bin/README.txt /gump/branches/Dec04MajorCleanup/gump
Date Tue, 28 Dec 2004 20:40:22 GMT
Author: leosimons
Date: Tue Dec 28 12:40:21 2004
New Revision: 123552

URL: http://svn.apache.org/viewcvs?view=rev&rev=123552
Log:
first cut at working script (no it don't work right now)
Added:
   gump/branches/Dec04MajorCleanup/bin/README.txt
Modified:
   gump/branches/Dec04MajorCleanup/gump

Added: gump/branches/Dec04MajorCleanup/bin/README.txt
Url: http://svn.apache.org/viewcvs/gump/branches/Dec04MajorCleanup/bin/README.txt?view=auto&rev=123552
==============================================================================
--- (empty file)
+++ gump/branches/Dec04MajorCleanup/bin/README.txt	Tue Dec 28 12:40:21 2004
@@ -0,0 +1 @@
+This directory contains some misc. command line utilities used by the main gump program.

Modified: gump/branches/Dec04MajorCleanup/gump
Url: http://svn.apache.org/viewcvs/gump/branches/Dec04MajorCleanup/gump?view=diff&rev=123552&p1=gump/branches/Dec04MajorCleanup/gump&r1=123551&p2=gump/branches/Dec04MajorCleanup/gump&r2=123552
==============================================================================
--- gump/branches/Dec04MajorCleanup/gump	(original)
+++ gump/branches/Dec04MajorCleanup/gump	Tue Dec 28 12:40:21 2004
@@ -57,54 +57,6 @@
         $0 test
 "
         ;;
-    integration-test)
-      echo "
-      Run Gumpy its integration tests.
-
-      Usage:
-        $0 integration-test [gump.py-args ...]
-"
-		;;
-    site)
-      echo "
-      Use Apache Forrest to build the documentation.
-
-      Usage:
-        $0 site
-"
-      ;;
-    site-publish)
-      echo "
-      Use svn and ssh to publish the site.
-
-      Usage:
-        $0 site-publish
-"
-      ;;
-    get-metadata)
-      echo "
-      Use CVS to check out or update the metadata.
-
-      Usage:
-        $0 get-metadata [CVSROOT]
-"
-      ;;
-    validate)
-      echo "
-      Run the DTD validation tools on the metadata.
-
-      Usage:
-        $0 validate
-"
-      ;;
-    experimental-tests)
-      echo "
-      Run the experimental new unit tests using testrunner.py.
-
-      Usage:
-        $0 experimental-tests
-"
-      ;;
     *)
       echo "
       Utility commandline interface for Gump.
@@ -147,8 +99,21 @@
 # Load the environment variables script if it exists
 function load_env
 {
+  if [[ -z "$GUMP_HOME" ]]; then
+    # look for this file
+    local current=`pwd`
+    local thisscript="`pwd`/gump"
+    if [[ -f "$thisscript" ]]; then
+      # guess...
+      export GUMP_HOME=$current
+    else
+      # complain!
+      error "GUMP_HOME is not set and failed to determine it. Please set it to the root of
your svn checkout!"
+    fi
+  fi
+
   local host=`hostname -s`
-  local envfile="`pwd`/cron/local-env-$host.sh"
+  local envfile="$GUMP_HOME/$host-settings.sh"
   if [[ -f $envfile ]]; then
     . $envfile
   fi
@@ -161,7 +126,7 @@
 #   - url to download the package that provides it
 function check_env
 {
-  local cmd=`bin/PrintPath $1`;
+  local cmd=`$GUMP_HOME/bin/PrintPath $1`;
   if [[ -z "$cmd" ]]; then
      error "Cannot find $1. Please retrieve it from 
 
@@ -179,7 +144,7 @@
 function check_env_var
 {
   local host=`hostname -s`
-  local envfile="`pwd`/cron/local-env-$host.sh"
+  local envfile="$GUMP_HOME/cron/local-env-$host.sh"
 
   local dereferenced=${!1}
   if [[ -z "$dereferenced" ]]; then
@@ -199,15 +164,15 @@
 #   - url to download location of the library
 function check_env_pylib
 {
-  cat > pycmd.tmp.py <<ENDCOMMAND
+  cat > "$GUMP_HOME/pycmd.tmp.py" <<ENDCOMMAND
 try:
   import $1
 except:
   print "error"
 ENDCOMMAND
-  local cmd=`python pycmd.tmp.py`
+  local cmd=`python "$GUMP_HOME/pycmd.tmp.py"`
   result=`$cmd`
-  rm -f pycmd.tmp.py
+  rm -f "$GUMP_HOME/pycmd.tmp.py"
 
   if [[ ! -z "$result" ]]; then
     error "Required python library $1 is not available.
@@ -242,27 +207,9 @@
     test)
       test $@
       ;;
-    integration-test)
-      integration_test $@
-      ;;
-    site)
-      site $@
-      ;;
-    site-publish)
-      site_publish $@
-      ;;
-    get-metadata)
-      get_metadata $@
-      ;;
-    validate)
-      validate $0
-      ;;
     help | usage | --help | -help | -H | -h)
       usage $@
       ;;
-    experimental-tests)
-      experimental_tests $@
-      ;;
     '')
       error "Please specify a command"
       ;;
@@ -282,22 +229,21 @@
   check_env "python" "http://www.python.org/"
   check_env "pkill" "http://sourceforge.net/projects/proctools"
 
-  check_env_var "GUMP_HOME" "the location of the gump checkout"
   check_env_var "JAVA_HOME" "the location of the java jdk"
   
   check_env_pylib "rdflib" "http://rdflib.net/"
   check_env_pylib "MySQLdb" "http://sourceforge.net/projects/mysql-python"
 
-  cd cron
+  local current=`pwd`
+  cd $GUMP_HOME/pygump
   ./gump.sh $@
-  cd ..
+  cd $current
 }
 
 # Run gumpy unit tests
 function test
 {
   check_env "python" "http://www.python.org/"
-  check_env_var "GUMP_HOME" "the location of the gump checkout"
 
   local oldpythonpath=$PYTHONPATH
   if [[ -z $oldpythonpath ]]; then
@@ -307,112 +253,10 @@
   fi
 
   # Run the tests
-  cd python
-  python ../bin/testrunner.py -d ../python/gump/test $@
-  cd ..
-  
-  # Clean up (NB: tests ought to do this themselves...)
-  rm -Rf python/test python/bogus python/x.svg python/gump/test/cache \
-      python/gump/test/temp \
-      python/gump/test/test python/gump/test/work
-}
-
-# Run gumpy integration tests
-function integration_test
-{
-  echo "
-
-This is currently not working! For some strange reason,
-gumpy thinks we have no projects defined :(
-
-"
-
-  local doupdate=$GUMP_NO_SCM_UPDATE
-  export GUMP_NO_SCM_UPDATE=true
-  run --workspace `pwd`/test/fixture/workspace.xml $@ #all
-  export GUMP_NO_SCM_UPDATE=$doupdate
-}
-
-# Use Apache Forrest to build the documentation.
-function site
-{
-  check_env "forrest" "http://forrest.apache.org/mirrors.cgi"
-
-  forrest
-}
-
-# Use svn and ssh to publish the site.
-function site_publish
-{
-  check_env "svn" "http://subversion.tigris.org/"
-  check_env "ssh" "http://www.openssh.org/"
-
-  error 'This functionality is not yet tested!'
-
-  cp -Rf build/site/* ../site/
-  cd ../site/
-  find . -type d -or -type -f -not -path '*/.svn*' -exec svn add \{\} \;
-  svn commit -m "Publishing site..."
-  ssh minotaur.apache.org svn up /www/gump.apache.org
-  cd ../trunk/
-}
-
-# Check out or update the gump metadata.
-function get_metadata
-{
-  check_env "cvs" "http://www.cvshome.org/"
-
-  local cvsroot=$1
-  if [[ -z "$cvsroot" ]]; then
-    cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-  fi
-
-  if [[ -d "metadata/CVS" ]]; then
-    cvs -d $cvsroot up -Pd metadata
-  else
-    # This is not dumb. Cannot check out into an existing checkout,
-    # and cannot remove the metadata either because 'svn up' will
-    # get confused that way
-    cvs -d $cvsroot co -d gump.cvs gump
-    mv gump.cvs/* metadata/
-    rm -Rf gump.cvs
-  fi
-}
-
-# Run the DTD validation tools on the metadata.
-function validate
-{
-  check_env "xmllint" "http://xmlsoft.org/"
-  check_env "xsltproc" "http://xmlsoft.org/"
-
-  cd metadata
-  ./validate
-  cd ..
-}
-
-# Run the experimental new unit tests.
-function experimental_tests
-{
-  check_env "python" "http://www.python.org/"
-
-  local oldpythonpath=$PYTHONPATH
-  if [[ -z $oldpythonpath ]]; then
-    export PYTHONPATH=`pwd`/src/py:`pwd`
-  else
-    export PYTHONPATH=`pwd`/src/py:`pwd`:$PYTHONPATH
-  fi
-
-  local dir=$1
-  if [[ -z "$dir" ]]; then
-    dir='src/py'
-  else
-    shift
-  fi
-
-  find $dir -name *.pyc | xargs rm -Rf  # get rid of compiled files
-  python bin/testrunner.py -d $dir $@   # run the tests
-
-  export PYTHONPATH=$oldpythonpath
+  local current=`pwd`
+  cd $GUMP_HOME/pygump/python
+  python ../../bin/testrunner.py -d ../python/gump/test $@
+  cd $current
 }
 
 #############################################################################
@@ -424,19 +268,3 @@
 
 # Figure out the action to take then run the appropriate function
 delegate $@
-
-#############################################################################
-# And some mess below...
-#############################################################################
-
-#option=$@
-#previous_argument=
-#for option
-#do
-   # get argument to options with arguments
-#  if test -n "$previous_argument"; then
-#    eval "$previous_argument=\$option"
-#    previous_argument=
-#    continue
-#  fi
-#done

Mime
View raw message