{"thread":{"id":"6060","subject":"t5000-tar-tree.sh failing","startedAt":"2006-12-21T13:37:46Z","lastAt":"2006-12-22T02:48:40Z","messageCount":6,"participants":["Uwe Kleine-König","Johannes Schindelin","Brian Gernhardt","Uwe Kleine-Koenig"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"29947","messageId":"20061221133746.GA13751@cepheus","threadId":"6060","inReplyTo":null,"subject":"t5000-tar-tree.sh failing","fromName":"Uwe Kleine-König","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-12-21T13:37:46Z","receivedAt":"2006-12-21T13:37:46Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nwhen I run make test, I get:\n\n\t*** t5000-tar-tree.sh ***\n\tInitialized empty Git repository in .git/\n\t*   ok 1: populate workdir\n\t*   ok 2: add files to repository\n\t*   ok 3: git-tar-tree\n\t*   ok 4: validate file modification time\n\t*   ok 5: git-get-tar-commit-id\n\t*   ok 6: extract tar archive\n\t*   ok 7: validate filenames\n\t*   ok 8: validate file contents\n\t*   ok 9: git-tar-tree with prefix\n\t*   ok 10: extract tar archive with prefix\n\t*   ok 11: validate filenames with prefix\n\t*   ok 12: validate file contents with prefix\n\t*   ok 13: git-archive --format=zip\n\t* FAIL 14: extract ZIP archive\n\t\t(mkdir d && cd d && $UNZIP ../d.zip)\n\t* FAIL 15: validate filenames\n\t\t(cd d/a && find .) | sort >d.lst &&\n\t\t     diff a.lst d.lst\n\t* FAIL 16: validate file contents\n\t\tdiff -r a d/a\n\t*   ok 17: git-archive --format=zip with prefix\n\t* FAIL 18: extract ZIP archive with prefix\n\t\t(mkdir e && cd e && $UNZIP ../e.zip)\n\t* FAIL 19: validate filenames with prefix\n\t\t(cd e/prefix/a && find .) | sort >e.lst &&\n\t\t     diff a.lst e.lst\n\t* FAIL 20: validate file contents with prefix\n\t\tdiff -r a e/prefix/a\n\t* failed 6 among 20 test(s)\n\nI think the problem is:\n\n\tzeisberg@cepheus:~/gsrc/git$ unzip\n\tbash: unzip: command not found\n\nProbably the subversion tests suffer the same (for svn instead of\nunzip).\n\nDo we want the tests to depend on all that or would it be sensible to\noutput a warning that a program is missing?  Or maybe introduce test\n\"13.5:  check is unzip is available\".  Then it would be more obvious for\nthe tester what went wrong?\n\nBest regards\nUwe\n\n-- \nUwe Kleine-König\n\nprimes where sieve (p:xs) = [ x | x<-xs, x `rem` p /= 0 ]; \\\nprimes = map head (iterate sieve [2..])\n"},{"id":"29950","messageId":"Pine.LNX.4.63.0612211458360.19693@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6060","inReplyTo":"20061221133746.GA13751@cepheus","subject":"Re: t5000-tar-tree.sh failing","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-21T14:00:25Z","receivedAt":"2006-12-21T14:00:25Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 21 Dec 2006, Uwe Kleine-König wrote:\n\n> [...]\n> \t* FAIL 14: extract ZIP archive\n> \t\t(mkdir d && cd d && $UNZIP ../d.zip)\n> [...]\n>\n> I think the problem is:\n> \n> \tzeisberg@cepheus:~/gsrc/git$ unzip\n> \tbash: unzip: command not found\n\nYep. That's the problem.\n\n> Probably the subversion tests suffer the same (for svn instead of \n> unzip).\n> \n> Do we want the tests to depend on all that or would it be sensible to\n> output a warning that a program is missing?\n\nWhy not enclose the tests in a\n\n\tif unzip -h >/dev/null 2>/dev/null; then\n\n\t\t# all these tests\n\n\tfi\n\nHmm?\n\nCiao,\nDscho\n"},{"id":"29953","messageId":"9A725DAA-FAA8-4779-A73D-ED117CC068C1@silverinsanity.com","threadId":"6060","inReplyTo":"Pine.LNX.4.63.0612211458360.19693@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: t5000-tar-tree.sh failing","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2006-12-21T14:17:51Z","receivedAt":"2006-12-21T14:17:51Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Dec 21, 2006, at 9:00 AM, Johannes Schindelin wrote:\n\n>\n> Why not enclose the tests in a\n>\n> \tif unzip -h >/dev/null 2>/dev/null; then\n>\n> \t\t# all these tests\n>\n> \tfi\n>\n> Hmm?\n\nSeveral other test frameworks provide a \"skip\" method to indicate why  \nwe've skipped something.  We could do something similar...\n\nif skip 'unzip -h' 'tests need unzip'; then\n    # unzip tests\nfi\n\nskip() {\n   # Have not checked to see if this is anything resembling working code\n   if eval $1 > /dev/null 2>&1; then\n     true\n   else\n     echo \"* skipping tests: $2\" 1>&2\n     false\n   fi\n}\n\nMostly so that skipped tests are obvious, provide a reason, and have  \na standardized display format.  Again, too busy in actual work to try  \nto do this myself right now, but might hack at it this afternoon if  \nnobody else (hopefully someone more fluent in shell than I am) does.\n\n~~ Brian\n"},{"id":"29963","messageId":"20061221185948.GA27072@informatik.uni-freiburg.de","threadId":"6060","inReplyTo":"9A725DAA-FAA8-4779-A73D-ED117CC068C1@silverinsanity.com","subject":"Re: t5000-tar-tree.sh failing","fromName":"Uwe Kleine-Koenig","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-12-21T18:59:48Z","receivedAt":"2006-12-21T18:59:48Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nBrian Gernhardt wrote:\n> Several other test frameworks provide a \"skip\" method to indicate why  \n> we've skipped something.  We could do something similar...\n> \n> if skip 'unzip -h' 'tests need unzip'; then\n>    # unzip tests\n> fi\n> \n> skip() {\n>   # Have not checked to see if this is anything resembling working code\n>   if eval $1 > /dev/null 2>&1; then\n>     true\n>   else\n>     echo \"* skipping tests: $2\" 1>&2\n>     false\n>   fi\n> }\n> \n> Mostly so that skipped tests are obvious, provide a reason, and have  \n> a standardized display format.  Again, too busy in actual work to try  \n> to do this myself right now, but might hack at it this afternoon if  \n> nobody else (hopefully someone more fluent in shell than I am) does.\n\nI'm not sure if (in this case) a missing unzip should be as silent as\nyou suggest.  The danger is, that s.o. makes a change, runs `make test`\nand is then conviced that nothing broke.  So I think that the test\nshould fail, but with a more descriptive error than it is now. \n\nThe downside is, you need unzip, svn, what ever more to run the test\nsuite.\n\nBest regards\nUwe\n\n-- \nUwe Kleine-Koenig\n\nhttp://www.google.com/search?q=gigabyte+in+bit\n"},{"id":"29975","messageId":"D8B2508E-D9EE-43F8-BAEE-BE7E5B446132@silverinsanity.com","threadId":"6060","inReplyTo":"20061221185948.GA27072@informatik.uni-freiburg.de","subject":"Re: t5000-tar-tree.sh failing","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2006-12-21T23:37:52Z","receivedAt":"2006-12-21T23:37:52Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Dec 21, 2006, at 1:59 PM, Uwe Kleine-Koenig wrote:\n\n> I'm not sure if (in this case) a missing unzip should be as silent as\n> you suggest.  The danger is, that s.o. makes a change, runs `make  \n> test`\n> and is then conviced that nothing broke.  So I think that the test\n> should fail, but with a more descriptive error than it is now.\n>\n> The downside is, you need unzip, svn, what ever more to run the test\n> suite.\n\nI was attempting to say that if we're skipping tests we should say  \nso, and not just drop them silently like the code that Johannes  \nposted.  Really, I guess the ideal would be for there to be a test  \nharness that would run all the tests and report skips and errors in a  \nreport at the end rather than in the middle.\n\n~~ Brian\n"},{"id":"30005","messageId":"Pine.LNX.4.63.0612220345530.19693@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6060","inReplyTo":"20061221185948.GA27072@informatik.uni-freiburg.de","subject":"Re: t5000-tar-tree.sh failing","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-22T02:48:40Z","receivedAt":"2006-12-22T02:48:40Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 21 Dec 2006, Uwe Kleine-Koenig wrote:\n\n> I'm not sure if (in this case) a missing unzip should be as silent as\n> you suggest.  The danger is, that s.o. makes a change, runs `make test`\n> and is then conviced that nothing broke.\n\nWell, the tests are not distributed with the binary packages. For a \nreason. The maintainer of the binary packages has to check if the tests \nsucceed. An she better know what she's doing!\n\nSo, if Joe Average compiles git, does not have unzip installed, and runs \nthe tests, chances are that he does not want to be bothered about the zip \ntests failing because of the absence of unzip.\n\n>  So I think that the test should fail, but with a more descriptive error \n> than it is now.\n\nSorry. Does not work here. I _only_ look at the messages if the test suite \nfails somewhere, with a loud error message at the end.\n\nCiao,\nDscho\n"}]}