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

some tests fail while building CFLint #137

Closed
bardware opened this issue Dec 9, 2015 · 6 comments
Closed

some tests fail while building CFLint #137

bardware opened this issue Dec 9, 2015 · 6 comments

Comments

@bardware
Copy link

bardware commented Dec 9, 2015

I'm on a windows machin and use JAVA 1.8.65

I did a git pull in an msys2 environment and received

remote: Counting objects: 23, done.
remote: Total 23 (delta 9), reused 9 (delta 9), pack-reused 14
Entpacke Objekte: 100% (23/23), Fertig.
Von https://github.com/cflint/CFLint
   5c9278e..0d512cf  master     -> origin/master
   901cfaf..97b13a8  dev        -> origin/dev
 * [neuer Branch]    revert-135-hashmapbug -> origin/revert-135-hashmapbug
Aktualisiere 5c9278e..0d512cf
Fast-forward

mvn clean install then failed like so:

Running com.cflint.TestUnusedArgumentChecker
Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.655 sec <<< F
AILURE! - in com.cflint.TestUnusedArgumentChecker
testMultipleArgumentsNotUsedTag(com.cflint.TestUnusedArgumentChecker)  Time elap
sed: 0.453 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<4>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at com.cflint.TestUnusedArgumentChecker.testMultipleArgumentsNotUsedTag(
TestUnusedArgumentChecker.java:223)

Running com.cflint.TestUnusedLocalVarChecker
Tests run: 11, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 6.047 sec <<< F
AILURE! - in com.cflint.TestUnusedLocalVarChecker
testMultipleUnusedVarFunctionInScript(com.cflint.TestUnusedLocalVarChecker)  Tim
e elapsed: 0.538 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<6>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at com.cflint.TestUnusedLocalVarChecker.testMultipleUnusedVarFunctionInS
cript(TestUnusedLocalVarChecker.java:147)

testMultipleUnusedVarFunctionInTag(com.cflint.TestUnusedLocalVarChecker)  Time e
lapsed: 0.548 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<5>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at com.cflint.TestUnusedLocalVarChecker.testMultipleUnusedVarFunctionInT
ag(TestUnusedLocalVarChecker.java:254)

Running com.cflint.TestValidNames
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in
com.cflint.TestValidNames
Running com.cflint.TestWriteDumpChecker
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.602 sec - in c
om.cflint.TestWriteDumpChecker
Running com.cflint.Test_Switch_Default_Checker
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.547 sec - in c
om.cflint.Test_Switch_Default_Checker
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0

Results :

Failed tests:
  TestUnusedArgumentChecker.testMultipleArgumentsNotUsedTag:223 expected:<6> but
 was:<4>
  TestUnusedLocalVarChecker.testMultipleUnusedVarFunctionInScript:147 expected:<
7> but was:<6>
  TestUnusedLocalVarChecker.testMultipleUnusedVarFunctionInTag:254 expected:<6>
but was:<5>

Tests run: 363, Failures: 3, Errors: 0, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:42 min
[INFO] Finished at: 2015-12-09T22:13:15+01:00
[INFO] Final Memory: 24M/312M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
18.1:test (default-test) on project CFLint: There are test failures.
[ERROR]
[ERROR] Please refer to D:\msys64\home\bd\src\github\cflint\CFLint\target\surefi
re-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on proj
ect CFLint: There are test failures.

Please refer to D:\msys64\home\bd\src\github\cflint\CFLint\target\surefire-repor
ts for the individual test results.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures
.

Please refer to D:\msys64\home\bd\src\github\cflint\CFLint\target\surefire-repor
ts for the individual test results.
        at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(Suref
ireHelper.java:82)
        at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(Surefir
ePlugin.java:254)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPre
conditionsChecked(AbstractSurefireMojo.java:854)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(Abstrac
tSurefireMojo.java:722)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 20 more
[ERROR]
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption

Is it know or is there something I can do?

@justinmclean
Copy link
Contributor

Hi,

What branch and version of java are you using? There was an issue with Java 1.7 vs 1.8 and a couple of tests tests but I believe that has now been fixed in the develop branch.

Thanks,
Justin

@bardware
Copy link
Author

bardware commented Dec 9, 2015

Hi,

I'm on CFLint master branch.
I use The 64 bit JDK on Windows 7 as provided by Oracle

thanks for caring.

@ryaneberly
Copy link
Contributor

from the log, it looks like Java 8.

On Wed, Dec 9, 2015 at 5:07 PM, Bernhard Döbler notifications@github.com
wrote:

Hi,

I'm on CFLint master branch.
I use The 64 bit JDK on Windows 7 as provided by Oracle

thanks for caring.


Reply to this email directly or view it on GitHub
#137 (comment).

@bardware
Copy link
Author

I wanted to find the erronoeus commit by checking out earlier versions and compiling one after the other. I called

[bd:~/src/github/cflint/CFLint] master 1m43s ± git checkout master~1
Note: checking out 'master~1'.
[...]
HEAD ist jetzt bei 6188fcf... Merge pull request #135 from playedinane/hashmapbug

It seems the last commit bróke something - at least the tests.

@bardware
Copy link
Author

Commit 9587c9baf186cf4a3c88c3aaa67d167e2eeb7a67 works. Thanks for the good job.

@ryaneberly
Copy link
Contributor

Thanks. The travis build was still failing. I think I fixed it now. I
couldn't duplicate it locally.

On Fri, Dec 18, 2015 at 4:48 PM, Bernhard Döbler notifications@github.com
wrote:

Closed #137 #137.


Reply to this email directly or view it on GitHub
#137 (comment).

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