comparison contrib/check-code.py @ 16364:f64b25f147d7 stable

tests: avoid test-hup hanging on AIX test-hup hangs on AIX. Under ksh89 on AIX (the default shell), echo Hello; while [ ! -s not-there ]; do true; done produces no output while the loop executes. Replacing 'true' with 'sleep 0' fixes, as does using a less broken shell. ksh93 is fine. Update check-code.py to look for this, and make same change in test-serve.t. In fact test-serve works fine, probably because of additional commands between echo and the loop, but that's a subtlety not easy to test for.
author Jim Hague <jim.hague@acm.org>
date Thu, 05 Apr 2012 12:31:21 +0100
parents c6c9b83a1e8a
children 329887a7074c c3aedd526d53
comparison
equal deleted inserted replaced
16362:16b75661828e 16364:f64b25f147d7
92 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"), 92 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
93 (uprefix + r'.*\|\| echo.*(fail|error)', 93 (uprefix + r'.*\|\| echo.*(fail|error)',
94 "explicit exit code checks unnecessary"), 94 "explicit exit code checks unnecessary"),
95 (uprefix + r'set -e', "don't use set -e"), 95 (uprefix + r'set -e', "don't use set -e"),
96 (uprefixc + r'( *)\t', "don't use tabs to indent"), 96 (uprefixc + r'( *)\t', "don't use tabs to indent"),
97 (uprefixc + r'.*do\s*true;\s*done',
98 "don't use true as loop body, use sleep 0"),
97 ], 99 ],
98 # warnings 100 # warnings
99 [] 101 []
100 ] 102 ]
101 103