Message ID | cover-v3-00.13-00000000000-20220317T100820Z-avarab@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | tests: add and use a "test_hook" wrapper + hook fixes | expand |
Just a quick update before I finish my first integration cycle of today. t543 has a "test_hook" call inside a subshell, but because the helper runs test_when_finished, a sanity check kicks in and fails the test. I'll continue the integration cycle with this topic kicked out of 'seen' for now.
On Thu, Mar 17 2022, Junio C Hamano wrote: > Just a quick update before I finish my first integration cycle of > today. t543 has a "test_hook" call inside a subshell, but because > the helper runs test_when_finished, a sanity check kicks in and > fails the test. > > I'll continue the integration cycle with this topic kicked out of > 'seen' for now. Pending a re-roll this fix-up for 11/13 should fix it. I do test with /bin/bash before submitting to catch exactly this class of issue, but for reasons I haven't looked into this one is odd in not failing with --verbose-log, but I see the OSX CI (which I didn't wait for) fails on the same issue. Sorry. diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh index 90676365471..70431122a40 100755 --- a/t/t5543-atomic-push.sh +++ b/t/t5543-atomic-push.sh @@ -162,13 +162,10 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus test_commit two && git push --mirror up ) && - ( - cd upstream && - test_hook update <<-\EOF - # only allow update to main from now on - test "$1" = "refs/heads/main" - EOF - ) && + test_hook -C upstream update <<-\EOF && + # only allow update to main from now on + test "$1" = "refs/heads/main" + EOF ( cd workbench && git checkout main &&
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > Pending a re-roll this fix-up for 11/13 should fix it. > > I do test with /bin/bash before submitting to catch exactly this class > of issue, but for reasons I haven't looked into this one is odd in not > failing with --verbose-log, but I see the OSX CI (which I didn't wait > for) fails on the same issue. Sorry. Hmph, my integration run failed right away. I use bash and dash on alternate days, and you got lucky today ;-) > diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh > index 90676365471..70431122a40 100755 > --- a/t/t5543-atomic-push.sh > +++ b/t/t5543-atomic-push.sh > @@ -162,13 +162,10 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus > test_commit two && > git push --mirror up > ) && > - ( > - cd upstream && > - test_hook update <<-\EOF > - # only allow update to main from now on > - test "$1" = "refs/heads/main" > - EOF > - ) && > + test_hook -C upstream update <<-\EOF && > + # only allow update to main from now on > + test "$1" = "refs/heads/main" > + EOF OK. > ( > cd workbench && > git checkout main &&