summaryrefslogtreecommitdiff
path: root/t/lib-read-tree-m-3way.sh
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2021-01-26 23:05:33 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-26 17:58:33 -0800
commit134768cf53f433867164cc7a5bc329b332362dd9 (patch)
tree839e77e0d2fc2a908e3d71b7e41a09083f653b8a /t/lib-read-tree-m-3way.sh
parentThe fourth batch (diff)
downloadtgif-134768cf53f433867164cc7a5bc329b332362dd9.tar.xz
test-lib: prevent '--stress-jobs=X' from being ignored
'./t1234-foo.sh --stress-jobs=X ...' is supposed to run that test script in X parallel jobs, but the number of jobs specified on the command line is entirely ignored if other '--stress'-related options follow. I.e. both './t1234-foo.sh --stress-jobs=X --stress-limit=Y' and './t1234-foo.sh --stress-jobs=X --stress' fall back to using twice the number of CPUs parallel jobs instead. The former has been broken since commit de69e6f6c9 (tests: let --stress-limit=<N> imply --stress, 2019-03-03) [1], which started to unconditionally overwrite the $stress variable holding the specified number of jobs in its effort to imply '--stress'. The latter has been broken since f545737144 (tests: introduce --stress-jobs=<N>, 2019-03-03), because it didn't consider that handling '--stress' will overwrite that variable as well. We could fix this by being more careful about (over)writing that $stress variable and checking first whether it has already been set. But I think it's cleaner to use a dedicated variable to hold the number of specified parallel jobs, so let's do that instead. [1] In de69e6f6c9 there was no '--stress-jobs=X' option yet, the number of parallel jobs had to be specified via '--stress=X', so, strictly speaking, de69e6f6c9 broke './t1234-foo.sh --stress=X --stress-limit=Y'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-read-tree-m-3way.sh')
0 files changed, 0 insertions, 0 deletions