From: SZEDER Gábor Date: Sat, 5 Jan 2019 01:08:55 +0000 (+0100) Subject: test-lib: parse command line options earlier X-Git-Tag: v2.21.0-rc0~80^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8cf5800681a6f7c3324f835673974e39e598d1b5?hp=8cf5800681a6f7c3324f835673974e39e598d1b5 test-lib: parse command line options earlier 'test-lib.sh' looks for the presence of certain options like '--tee' and '--verbose-log', so it can execute the test script again to save its standard output and error. It looks for '--valgrind' as well, to set up some Valgrind-specific stuff. These all happen before the actual option parsing loop, and the conditions looking for these options look a bit odd, too. They are not completely correct, either, because in a bogus invocation like './t1234-foo.sh -r --tee' they recognize '--tee', although it should be handled as the required argument of the '-r' option. This patch series will add two more options to look out for early, and, in addition, will have to extract these options' stuck arguments (i.e. '--opt=arg') as well. So let's move the option parsing loop and the couple of related conditions following it earlier in 'test-lib.sh', before the place where the test script is executed again for '--tee' and its friends. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano ---