Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test case failures 4.0.8 build from source #141

Closed
marcpawl opened this issue Apr 29, 2016 · 4 comments
Closed

test case failures 4.0.8 build from source #141

marcpawl opened this issue Apr 29, 2016 · 4 comments

Comments

@marcpawl
Copy link

marcpawl commented Apr 29, 2016

Environment:
Using docker to get reproducible build, fedora21, openjdk8

$cat Dockerfile 
FROM fedora:21 
RUN yum update -y 
RUN yum install -y java-1.8.0-openjdk unzip maven wget
RUN wget https://github.com/antlr/stringtemplate4/archive/4.0.8.zip
RUN unzip 4.0.8.zip
RUN cd stringtemplate4-4.0.8 && mvn initialize
RUN cd stringtemplate4-4.0.8 && mvn install
RUN chmod -R 755 /root
CMD /bin/bash
$docker build -t st408 . 
....
Tests in error: 
  TestEarlyEvaluation.testEarlyEval:71 ? Headless 
No X11 DISPLAY variable was s...
  TestEarlyEvaluation.testEarlyEval2:103 ? Headless 
No X11 DISPLAY variable was...
  TestEarlyEvaluation.testBugArrayIndexOutOfBoundsExceptionInSTRuntimeMessage_getSourceLocation:142 ? Headless

Tests run: 609, Failures: 2, Errors: 3, Skipped: 2

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.163 s
[INFO] Finished at: 2016-04-29T12:31:33-04:00
[INFO] Final Memory: 21M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project ST4: There are test failures.
[ERROR] 
[ERROR] Please refer to /stringtemplate4-4.0.8/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command '/bin/sh -c cd stringtemplate4-4.0.8 && mvn install' returned a non-zero code: 1
@marcpawl
Copy link
Author

marcpawl commented Apr 29, 2016

docker  run -it -v `pwd`:/repo   \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix st408 \
 /bin/bash -c "cd stringtemplate4-4.0.8 && mvn install"

will pass the X11 requirement, but fail with

Failed tests: 
  TestGroupSyntaxErrors.testMissingImportString:52 expected:<...g STRING
t.stg 2:3: [required (...)+ loop did not match anything at inpu]t '('
> but was:<...g STRING
t.stg 2:3: [missing EOF a]t '('
>
  TestGroups.testUnknownNamedArg:545 expected:<context [/g] 1:1 []attribute z isn't de...> but was:<context [/g] 1:1 [passed 2 arg(s) to template /f with 2 declared arg(s)
context [/g] 1:1 ]attribute z isn't de...>

Tests run: 609, Failures: 2, Errors: 0, Skipped: 2

@parrt
Copy link
Member

parrt commented Nov 8, 2018

Hmm...yeah, sorry. I've no idea why those Java versions are different or why linux wouldn't work.

@Clashsoft
Copy link
Contributor

May be related to #229 and fixed by #231 ?

@Clashsoft
Copy link
Contributor

Clashsoft commented Aug 14, 2020

I tried to reproduce this with the Dockerfile but using v4.3.1, and it failed because maven could not resolve dependencies:

[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.antlr:ST4:4.3.1 (/stringtemplate4-4.3.1/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.sonatype.oss:oss-parent:pom:9 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at wrong local POM @ line 3, column 10 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

It looks like the maven version (maven.noarch 0:3.2.2-4.fc21) on Fedora 21 is outdated and does not use the new https endpoints, so it's impossible to reproduce with the exact environment.

Voting to close this unless it can be reproduced with an environment that is not out of support.

@parrt parrt closed this as completed Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants