{"thread":{"id":"33458","subject":"[PATCH] test-lint-duplicates: consider only numbered test cases","startedAt":"2013-04-10T14:22:57Z","lastAt":"2013-04-10T16:03:50Z","messageCount":2,"participants":["Torsten Bögershausen","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"213775","messageId":"201304101622.58688.tboegi@web.de","threadId":"33458","inReplyTo":null,"subject":"[PATCH] test-lint-duplicates: consider only numbered test cases","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-04-10T14:22:57Z","receivedAt":"2013-04-10T14:22:57Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Running make inside contrib/remote-helpers may fail in \"test-lint-duplicates\"\n\nThis was because the regexp checking for duplicate numbers strips everything\nafter the first \"-\" in the filename, including the prefix.\n\nAs a result, 2 pathnames like\n\"xxxx/contrib/remote-helpers/test-XX.sh\" and\n\"xxxx/contrib/remote-helpers/test-YY.sh\"\n\nare both converted into\n\"xxxx/contrib/remote\", and reported as duplicate.\n\nImprove the regexp:\n- strip the leading path and look only at the basename\n- only look at files which have tNNNN- (where N stand for a digit) in the name\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n\nhttp://comments.gmane.org/gmane.comp.version-control.git/214194\n\n t/Makefile | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 1923cc1..cfd6d5a 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -48,7 +48,9 @@ clean: clean-except-prove-cache\n test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n \n test-lint-duplicates:\n-\t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n+\t@dups=`echo $(T) | tr ' ' '\\n' | \\\n+\t\tsed -e 's,.*/,,' -ne 's|\\(.*/\\)*t\\([0-9][0-9][0-9][0-9]\\)-.*|\\2|p' | \\\n+\t\tsort | uniq -d` && \\\n \t\ttest -z \"$$dups\" || { \\\n \t\techo >&2 \"duplicate test numbers:\" $$dups; exit 1; }\n \n-- \n1.8.2.282.g4bc7171\n"},{"id":"213782","messageId":"20130410160350.GC10749@sigill.intra.peff.net","threadId":"33458","inReplyTo":"201304101622.58688.tboegi@web.de","subject":"Re: [PATCH] test-lint-duplicates: consider only numbered test cases","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-04-10T16:03:50Z","receivedAt":"2013-04-10T16:03:50Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 10, 2013 at 04:22:57PM +0200, Torsten Bögershausen wrote:\n\n> Running make inside contrib/remote-helpers may fail in \"test-lint-duplicates\"\n> \n> This was because the regexp checking for duplicate numbers strips everything\n> after the first \"-\" in the filename, including the prefix.\n> \n> As a result, 2 pathnames like\n> \"xxxx/contrib/remote-helpers/test-XX.sh\" and\n> \"xxxx/contrib/remote-helpers/test-YY.sh\"\n> \n> are both converted into\n> \"xxxx/contrib/remote\", and reported as duplicate.\n> \n> Improve the regexp:\n> - strip the leading path and look only at the basename\n> - only look at files which have tNNNN- (where N stand for a digit) in the name\n> \n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n> ---\n\nYeah, I think this is fine. Though note that we already have Felipe's\npatch to just set TEST_LINT explicitly, so I think it is a non-issue\nnow.\n\n-Peff\n"}]}