Index: /main/waeup.stress/trunk/src/waeup/stress/run.py
===================================================================
--- /main/waeup.stress/trunk/src/waeup/stress/run.py	(revision 8748)
+++ /main/waeup.stress/trunk/src/waeup/stress/run.py	(revision 8749)
@@ -5,4 +5,6 @@
 from optparse import OptionParser
 from ConfigParser import SafeConfigParser
+
+VALID_MODES = ('paster', 'kofactl', 'zeo', 'profile')
 
 def configure_options():
@@ -55,6 +57,7 @@
         print name, value
         params.update(dict({name: value}))
-    if params['instance_mode'] not in ('paster', 'kofactl', 'zeo'):
+    if params['instance_mode'] not in VALID_MODES:
         print "Warning: invalid instance_mode in config.cfg, picking 'paster'."
+        print "  valid would be: %s" % VALID_MODES
         params['instance_mode'] = 'paster'
     params['start_instance'] = config.getboolean(
@@ -62,16 +65,21 @@
     return params
 
-def main():
-    # late import as this scripts mangles sys.argv
-    from multimechanize.utilities import run
+def configure():
     cmd_opts, args = configure_options()
     project_name = args[0]
     path = os.path.abspath(os.path.join(cmd_opts.projects_dir, project_name))
     cfg_opts = configure_project(project_name, path)
+    return path, project_name, cmd_opts, cfg_opts
+
+def main():
+    path, project_name, cmd_opts, cfg_opts = configure()
     pre_run_path = os.path.join(path, 'pre_run.py')
     post_run_path = os.path.join(path, 'post_run.py')
+    sys.path.append(path) # make project scripts available for import
     if os.path.exists(pre_run_path):
         print "WAEUP.STRESS.RUN: running pre_run %s" % pre_run_path
         execfile(pre_run_path)
+    # late import as this scripts mangles sys.argv
+    from multimechanize.utilities import run
     run.main()
     if os.path.exists(post_run_path):
