if not os.path.exists(opts.config): print >> sys.stderr, "configfile %s does not exist" % opts.config sys.exit(1) if os.environ.get("AQDCONF") and (os.path.realpath(opts.config) != os.path.realpath(os.environ["AQDCONF"])): force_yes("""Will ignore AQDCONF variable value: %s and use %s instead.""" % (os.environ["AQDCONF"], opts.config)) config = Config(configfile=opts.config) if not config.has_section("unittest"): config.add_section("unittest") if not config.has_option("unittest", "srcdir"): config.set("unittest", "srcdir", SRCDIR) if opts.coverage: config.set("unittest", "coverage", "True") if opts.profile: config.set("unittest", "profile", "True") hostname = config.get("unittest", "hostname") if hostname.find(".") < 0: print >> sys.stderr, """ Some regression tests depend on the config value for hostname to be fully qualified. Please set the config value manually since the default on this system (%s) is a short name. """ % hostname sys.exit(1)