Author: justi9
Date: 2008-10-11 17:32:40 -0400 (Sat, 11 Oct 2008)
New Revision: 2623
Added:
mgmt/trunk/bin/devel-check
Log:
Add a script to check the devel environment
Added: mgmt/trunk/bin/devel-check
===================================================================
--- mgmt/trunk/bin/devel-check (rev 0)
+++ mgmt/trunk/bin/devel-check 2008-10-11 21:32:40 UTC (rev 2623)
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+function print_path {
+ for line in $(echo $1 | tr ":" " "); do
+ echo " ${line}"
+ done
+}
+
+echo "#"
+echo "# Environment"
+echo "#"
+
+echo DEVEL_HOME $DEVEL_HOME
+echo CUMIN_HOME $CUMIN_HOME
+echo PYTHONPATH; print_path $PYTHONPATH
+echo PATH; print_path $PATH
+
+echo "#"
+echo "# Python"
+echo "#"
+
+which python && python <<EOF
+import sys, traceback
+
+print "Python %s" % sys.version
+
+smodules = ["qpid", "mllib", "sqlobject",
"psycopg2"]
+
+for smodule in smodules:
+ print "Module '%s' ->" % smodule,
+ try:
+ module = __import__(smodule)
+ print module
+ except ImportError:
+ print "** NOT FOUND **"
+
+try:
+ import qpid
+
+ path = qpid.spec.default()
+ print "Loading spec '%s' ->" % path,
+ spec = qpid.spec.load(path)
+ print spec
+except:
+ traceback.print_exc()
+
+EOF
+
+echo "#"
+echo "# Database"
+echo "#"
+
+which psql
+
+psql -d cumin -U cumin -h localhost -c "\q" && {
+ psql -d cumin -U cumin -h localhost -c "select * from mint_info;"
+}
Property changes on: mgmt/trunk/bin/devel-check
___________________________________________________________________
Name: svn:executable
+ *