Mercurial > hg
comparison contrib/check-config.py @ 27992:8f244b75cc5e
tests: execute check-config.py without xargs
Before this patch, test-check-config.t fails on Solaris, because
"xargs" doesn't invoke check-config.py with all filenames at once.
"xargs" may invoke specified command multiple times with part of
arguments given from stdin: according to "xargs(1)" man page, this
dividing arguments is system-dependent.
For portability of test-check-config.t, this patch adds "xargs" like
mode to check-config.py and executes it in test-check-config.t without
"xargs".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 05 Feb 2016 22:32:05 +0900 |
parents | 9d155accd8f1 |
children | a92ee4d8a574 |
comparison
equal
deleted
inserted
replaced
27991:5daf1a8c5f1d | 27992:8f244b75cc5e |
---|---|
103 if default: | 103 if default: |
104 default = ' [%s]' % default | 104 default = ' [%s]' % default |
105 print "undocumented: %s (%s)%s" % (name, ctype, default) | 105 print "undocumented: %s (%s)%s" % (name, ctype, default) |
106 | 106 |
107 if __name__ == "__main__": | 107 if __name__ == "__main__": |
108 sys.exit(main(sys.argv[1:])) | 108 if len(sys.argv) > 1: |
109 sys.exit(main(sys.argv[1:])) | |
110 else: | |
111 sys.exit(main([l.rstrip() for l in sys.stdin])) |