   "The configuration file loaded by the bin tool"
   (promise))
 
+(defn add-config-dir-to-classpath
+  [config-file]
+  (let [dir (-> config-file
+                io/file
+                .getCanonicalFile
+                .getParent)]
+    (pom/add-classpath dir)))
+
 (defn set-config-file!
   "Sets the config file used by Riemann. Adds the config file's enclosing
   directory to the classpath as well."

        (error e "Couldn't reload:")
        e))))

(defn handle-signals
  "Sets up POSIX signal handlers."
  []

        (run-tests-with-format test-name-pattern)))
    (run-tests-with-format test-name-pattern)))

(defn run-app!
  "Start Riemann with the given setup function. The setup function is responsible
  for executing code that you would normally put into your riemann.config file,
