{"thread":{"id":"62374","subject":"[PATCH] t/meson.build: fix up tests for 'seen' branch","startedAt":"2024-10-20T16:00:53Z","lastAt":"2024-10-22T01:38:54Z","messageCount":4,"participants":["Ramsay Jones","Patrick Steinhardt","Taylor Blau","Eli Schwartz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"505560","messageId":"8b08b64a-aa5a-422d-9815-e67911a703e0@ramsayjones.plus.com","threadId":"62374","inReplyTo":null,"subject":"[PATCH] t/meson.build: fix up tests for 'seen' branch","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2024-10-20T16:00:44Z","receivedAt":"2024-10-20T16:00:53Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Patrick,\n\nSo, having got the build to work, I noticed that 'ninja test' was running\nless tests than 'make test': 1028 v. 1035. Having a fixed list of tests\nto run has 'issues'. :) This patch fixes up the list for the 'seen' branch.\n\nThe 'new' tests in 'seen' are:\n\n  t1017-cat-file-remote-object-info.sh\n    branch: 'ej/cat-file-remote-object-info'\n    commit: ef30c4557c (\"cat-file: add remote-object-info to batch-command\",\n    2024-09-25)\n\n  t5710-promisor-remote-capability.sh\n    branch: 'cc/promisor-remote-capability'\n    commit: 3cb155a011 (\"Add 'promisor-remote' capability to protocol v2\",\n    2024-09-10)\n\n  t6601-path-walk.sh\n    branch: 'ds/path-walk'\n    commit: d7e16a4ca9 (\"t6601: add helper for testing path-walk API\",\n    2024-10-08)\n\n  t8015-blame-default-ignore-revs.sh\n    branch: 'am/git-blame-ignore-revs-by-default'\n    commit: eca5438740 (\"blame: respect .git-blame-ignore-revs automatically\",\n    2024-10-12)\n\n  t8016-blame-override-ignore-revs.sh\n    branch: 'am/git-blame-ignore-revs-by-default'\n    commit: 0386bb36aa (\"blame: introduce --override-ignore-revs to bypass\n    ignore revisions list\", 2024-10-12)\n\nA 'new' test in 'next':\n\n  t2408-worktree-relative.sh\n    branch: 'cw/worktree-relative'\n    commit: 717af916cd (\"worktree: link worktrees with relative paths\",\n    2024-10-07)\n\nA missing test which (as you know ;) ) is in maint:\n\n  unit-tests/t-reftable-reader.c\n    commit: 0a148a8eda (\"reftable/reader: make table iterator reseekable\",\n    2024-09-16)\n\nHmm, this is going to be a PITA as far as maintenance is concerned! :(\nIf I am reading it correctly, the cmake solution uses file globbing\nto get the list of test files to run - could meson do the same?\n\nATB,\nRamsay Jones\n\n\n\n t/meson.build | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/t/meson.build b/t/meson.build\nindex 152fd7dc13..a956e6db75 100644\n--- a/t/meson.build\n+++ b/t/meson.build\n@@ -43,6 +43,7 @@ unit_test_programs = [\n   'unit-tests/t-reftable-block.c',\n   'unit-tests/t-reftable-merged.c',\n   'unit-tests/t-reftable-pq.c',\n+  'unit-tests/t-reftable-reader.c',\n   'unit-tests/t-reftable-readwrite.c',\n   'unit-tests/t-reftable-record.c',\n   'unit-tests/t-reftable-stack.c',\n@@ -166,6 +167,7 @@ integration_tests = [\n   't1014-read-tree-confusing.sh',\n   't1015-read-index-unmerged.sh',\n   't1016-compatObjectFormat.sh',\n+  't1017-cat-file-remote-object-info.sh',\n   't1020-subdirectory.sh',\n   't1021-rerere-in-workdir.sh',\n   't1022-read-tree-partial-clone.sh',\n@@ -295,6 +297,7 @@ integration_tests = [\n   't2405-worktree-submodule.sh',\n   't2406-worktree-repair.sh',\n   't2407-worktree-heads.sh',\n+  't2408-worktree-relative.sh',\n   't2500-untracked-overwriting.sh',\n   't2501-cwd-empty.sh',\n   't3000-ls-files-others.sh',\n@@ -716,6 +719,7 @@ integration_tests = [\n   't5703-upload-pack-ref-in-want.sh',\n   't5704-protocol-violations.sh',\n   't5705-session-id-in-capabilities.sh',\n+  't5710-promisor-remote-capability.sh',\n   't5730-protocol-v2-bundle-uri-file.sh',\n   't5731-protocol-v2-bundle-uri-git.sh',\n   't5732-protocol-v2-bundle-uri-http.sh',\n@@ -818,6 +822,7 @@ integration_tests = [\n   't6500-gc.sh',\n   't6501-freshen-objects.sh',\n   't6600-test-reach.sh',\n+  't6601-path-walk.sh',\n   't6700-tree-depth.sh',\n   't7001-mv.sh',\n   't7002-mv-sparse-checkout.sh',\n@@ -944,6 +949,8 @@ integration_tests = [\n   't8012-blame-colors.sh',\n   't8013-blame-ignore-revs.sh',\n   't8014-blame-ignore-fuzzy.sh',\n+  't8015-blame-default-ignore-revs.sh',\n+  't8016-blame-override-ignore-revs.sh',\n   't9001-send-email.sh',\n   't9002-column.sh',\n   't9003-help-autocorrect.sh',\n-- \n2.47.0\n"},{"id":"505586","messageId":"ZxXu2rG1ls8UcXug@pks.im","threadId":"62374","inReplyTo":"8b08b64a-aa5a-422d-9815-e67911a703e0@ramsayjones.plus.com","subject":"Re: [PATCH] t/meson.build: fix up tests for 'seen' branch","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-10-21T06:04:16Z","receivedAt":"2024-10-21T06:04:24Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sun, Oct 20, 2024 at 05:00:44PM +0100, Ramsay Jones wrote:\n\nThanks, I'll pick these up.\n\n> Hmm, this is going to be a PITA as far as maintenance is concerned! :(\n> If I am reading it correctly, the cmake solution uses file globbing\n> to get the list of test files to run - could meson do the same?\n\nIn theory we can, yes. But there's a big problem with it, both in Meson\nand in CMake: the instructions to deduce source files only get executed\nat configure time. Consequently, when new files get added, the build\ninstructions do not get updated accordingly and are thus broken. So\nCMake does get around this, but not in a way that is feasible for use as\nour main build system, and the same would be true for Meson.\n\nFor our integration-style tests I'd be okay with not listing the files\nindividually, such that we instead use e.g. prove(1) to run all tests\nvia a single test target. It would be a regression in functionality as\nwe now cannot easily run e.g. \"meson test t0000*\", but at least we would\nnot have to maintain the list of test scripts anymore.\n\nBut for our source files I don't really see an alternative to listing\nthem out explicitly. You don't want things like git-rebase(1) or\ngit-bisect(1) to be broken just because one of the commits happens to\nadd or remove a file. And this is true for whichever build system we\nwant to adopt as additional official buildsystem, whether that is CMake\nor Meson.\n\nI guess we have less churn here anyway, and we would notice breakage\nmore readily because things would stop compiling. So this is likely less\nof a problem compared to our tests.\n\nPatrick\n"},{"id":"505770","messageId":"ZxbEJbigarbklNJq@nand.local","threadId":"62374","inReplyTo":"ZxXu2rG1ls8UcXug@pks.im","subject":"Re: [PATCH] t/meson.build: fix up tests for 'seen' branch","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-21T21:14:13Z","receivedAt":"2024-10-21T21:14:16Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Mon, Oct 21, 2024 at 08:04:16AM +0200, Patrick Steinhardt wrote:\n> On Sun, Oct 20, 2024 at 05:00:44PM +0100, Ramsay Jones wrote:\n>\n> Thanks, I'll pick these up.\n\nThanks. Please make sure to let me know which topic(s) that the new\nversion of ps/build depends on as a result so I can queue it properly.\n\n> > Hmm, this is going to be a PITA as far as maintenance is concerned! :(\n> > If I am reading it correctly, the cmake solution uses file globbing\n> > to get the list of test files to run - could meson do the same?\n>\n> In theory we can, yes. But there's a big problem with it, both in Meson\n> and in CMake: the instructions to deduce source files only get executed\n> at configure time. Consequently, when new files get added, the build\n> instructions do not get updated accordingly and are thus broken. So\n> CMake does get around this, but not in a way that is feasible for use as\n> our main build system, and the same would be true for Meson.\n>\n> For our integration-style tests I'd be okay with not listing the files\n> individually, such that we instead use e.g. prove(1) to run all tests\n> via a single test target. It would be a regression in functionality as\n> we now cannot easily run e.g. \"meson test t0000*\", but at least we would\n> not have to maintain the list of test scripts anymore.\n\nI quite like the ability to run tNNNN-*.sh individually when spelled\nlike that (i.e. including the test number, but not the full script\nname).\n\nI find that for the areas that I have worked on most over the years that\nI have the relevant test numbers committed by heart, but often don't\nknow the full script name. So it is nice to be able to refer to them by\nnumber only.\n\nAm I reading it write that this suggests that Meson would lose that\nability?\n\nThanks,\nTaylor\n"},{"id":"505797","messageId":"9820a7a6-c9c0-44eb-9c04-9445a5061c14@gmail.com","threadId":"62374","inReplyTo":"ZxbEJbigarbklNJq@nand.local","subject":"Re: [PATCH] t/meson.build: fix up tests for 'seen' branch","fromName":"Eli Schwartz","fromEmail":"eschwartz93@gmail.com","sentAt":"2024-10-22T01:38:50Z","receivedAt":"2024-10-22T01:38:54Z","isPatch":true,"sender":{"key":"eschwartz93@gmail.com","avatar":"https://gravatar.com/avatar/80b459bb75c0edb5e116884705adb9095fbd01cbbf91cb29a9ed23577fff7d34?d=mp&s=160"},"body":"On 10/21/24 5:14 PM, Taylor Blau wrote:\n> On Mon, Oct 21, 2024 at 08:04:16AM +0200, Patrick Steinhardt wrote:\n>> For our integration-style tests I'd be okay with not listing the files\n>> individually, such that we instead use e.g. prove(1) to run all tests\n>> via a single test target. It would be a regression in functionality as\n>> we now cannot easily run e.g. \"meson test t0000*\", but at least we would\n>> not have to maintain the list of test scripts anymore.\n> \n> I quite like the ability to run tNNNN-*.sh individually when spelled\n> like that (i.e. including the test number, but not the full script\n> name).\n> \n> I find that for the areas that I have worked on most over the years that\n> I have the relevant test numbers committed by heart, but often don't\n> know the full script name. So it is nice to be able to refer to them by\n> number only.\n> \n> Am I reading it write that this suggests that Meson would lose that\n> ability?\n\n\nIf \"meson test\" simply ran the prove(1) utility then it would still be\npossible to do:\n\n```\nmeson test --test-args \"--args --to --prove\"\n```\n\nThis would not actually do what you want, since prove(1) doesn't\nimplement \"t0000*\" style globbing, does it?\n\nSo your reading is correct -- meson's own globbing support relies on\nmeson knowing the list of all test names, which means you do have to\nmaintain that list somehow (and have that list update when you do \"git\npull\" and new tests materialize).\n\n\n-- \nEli Schwartz\n"}]}