##// END OF EJS Templates
run-tests: add flag to provide extra hgrc options for test runs
Augie Fackler -
r14134:8468ec11 default
parent child Browse files
Show More
@@ -165,6 +165,8 b' def parseargs():'
165 "temporary installation")
165 "temporary installation")
166 parser.add_option("-3", "--py3k-warnings", action="store_true",
166 parser.add_option("-3", "--py3k-warnings", action="store_true",
167 help="enable Py3k warnings on Python 2.6+")
167 help="enable Py3k warnings on Python 2.6+")
168 parser.add_option('--extra-config-opt', action="append",
169 help='set the given config opt in the test hgrc')
168
170
169 for option, default in defaults.items():
171 for option, default in defaults.items():
170 defaults[option] = int(os.environ.get(*default))
172 defaults[option] = int(os.environ.get(*default))
@@ -754,6 +756,12 b' def runone(options, test):'
754 hgrc.write('[inotify]\n')
756 hgrc.write('[inotify]\n')
755 hgrc.write('pidfile=%s\n' % DAEMON_PIDS)
757 hgrc.write('pidfile=%s\n' % DAEMON_PIDS)
756 hgrc.write('appendpid=True\n')
758 hgrc.write('appendpid=True\n')
759 if options.extra_config_opt:
760 for opt in options.extra_config_opt:
761 section, key = opt.split('.', 1)
762 assert '=' in key, ('extra config opt %s must '
763 'have an = for assignment' % opt)
764 hgrc.write('[%s]\n%s\n' % (section, key))
757 hgrc.close()
765 hgrc.close()
758
766
759 ref = os.path.join(TESTDIR, test+".out")
767 ref = os.path.join(TESTDIR, test+".out")
General Comments 0
You need to be logged in to leave comments. Login now