     if err
         process.exit(1)
     if program.test
-        winston.debug("Test mode -- now exiting")
-        process.exit(0)
-
+        winston.debug("Test mode -- waiting 5 seconds")
+        setTimeout ->
+            winston.debug("Test mode -- now exiting")
+            process.exit(0)
+        , 5000
+

uuid    = require('uuid')
winston = require('winston')
request = require('request')
program = require('commander')          # command line arguments -- https://github.com/visionmedia/commander.js/

init_gitconfig = require('./gitconfig').init_gitconfig


        # we report and ignore errors
        winston.debug("ERROR set_extra_env -- cannot process '#{process.env.COCALC_EXTRA_ENV}' -- #{err}")


# Final steps: kucalc specific setup, environment variable cleanup, and then we issue the "start_server" command …

if program.kucalc
    winston.debug("running in kucalc")
