Thread (49 messages) flat view 49 messages, 6 authors, 2020-09-25

Re: [PATCH 07/15] remote-mediawiki tests: guard test_cmp with test_path_is_file

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2020-09-21 08:54:20

On Wed, Sep 16 2020, Eric Sunshine wrote:
On Wed, Sep 16, 2020 at 8:17 AM Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
quoted
Change a test that used a plain test_cmp to first check the file(s)
using test_path_is_file. If some of these file(s) don't exist (as
happened to me during debugging), test_cmp will emit a way less useful
message about the failure.
An alternative would be to update test_cmp() to present a more helpful
error message so that all test scripts can benefit rather than just
this script. By the way, were you testing with a reasonably recent
version of Git? I ask because test_cmp() was updated not long ago to
provide better diagnostics when one of the files is missing.

[1]: d572f52a64 (test_cmp: diagnose incorrect arguments, 2020-08-09)
Thanks (and also to Đoàn Trần Công Danh in a side-thread). I've dropped
this patch. It's indeed better to leave this to a more general facility
as in your now-integrated test_cmp patch.

The reason I came up with this now-useless patch is because I originally
started hacking this series on a slightly older version of git, which
didn't have that patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help