You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/10/04 09:46:23 UTC

[GitHub] [maven-integration-testing] gnodet commented on pull request #116: Fix build consumer tests on OSX

gnodet commented on pull request #116:
URL: https://github.com/apache/maven-integration-testing/pull/116#issuecomment-933320418


   > I am a bit confused, this should fail on any POSIX like OS, shouldn't it?
   
   I think this is mainly a problem with the git config on POSIX systems.  Depending on your `auto.crlf` git attribute configuration, the file on disk can contain `\r\n` or `\n` line endings.  The generator always generates system specific line endings, but if the git local repo is not configured correctly, the test may end up comparing different kind of line endings and will fail.
   
   This may also be the case that just a few files have problems with line endings:
   ```
   ➜  maven-integration-testing git:(master) gst
   On branch master
   Your branch is up to date with 'origin/master'.
   
   nothing to commit, working tree clean
   ➜  maven-integration-testing git:(master) git add --renormalize .
   ➜  maven-integration-testing git:(master) ✗ gst
   On branch master
   Your branch is up to date with 'origin/master'.
   
   Changes to be committed:
     (use "git restore --staged <file>..." to unstage)
   	modified:   core-it-suite/src/test/resources/it0146/project/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-4148/settings-template.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/ear/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/ejbs/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/primary-source/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/projects/logging/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/projects/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/servlets/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/servlets/servlet/pom.xml
   	modified:   core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/index.jsp
   
   ➜  maven-integration-testing git:(master) ✗ 
   ```
   
   I think one of the problem comes from the `run-its.sh` script which fails for me with 
   ```
   zsh: ./run-its.sh: bad interpreter: /bin/sh^M: no such file or directory
   ```
   which lead me to use
   ```
   git config auto.crlf true
   ```
   and ending up with the failing tests.
   
   An alternative to this commit would be the following to commit the few files mentioned above to renormalize them.  That could be a better option.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org