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

Feature/it app veyour #682

Merged
merged 1 commit into from
Feb 9, 2016

Conversation

jmecosta
Copy link
Member

this just enables it in appveyour

@guwirth
Copy link
Collaborator

guwirth commented Nov 21, 2015

@jmecosta test failed. Not ready for merging?

@jmecosta
Copy link
Member Author

nop, its waiting for these to be answered:
https://groups.google.com/forum/#!topic/sonarqube/FN-YWKAG2A4
and
https://groups.google.com/forum/#!topic/sonarqube/nl8i7-dtHJg

looks to me sonarqube has a bug

@jmecosta jmecosta force-pushed the feature/it-app-veyour branch 2 times, most recently from 2c662d7 to 0135150 Compare January 9, 2016 17:06
@SonarOpenCommunityAdmin
Copy link
Collaborator

@guwirth has the last #741 change the support for env variables. i finally go the windows it running, however i had to use ${TestDataFolder} and set those as environment variables for the all build.

seems the translation is no longer working

@SonarOpenCommunityAdmin
Copy link
Collaborator

@guwirth another question, is that there are some tests that might run only on unix environments since they have -Dsonar.include=/usr/include

@guwirth
Copy link
Collaborator

guwirth commented Jan 10, 2016

@jmecosta will have a look and add an integration test

@jmecosta
Copy link
Member Author

It's fine to extend the multi module 2 since we have some hard coded paths that need fixing so it can be run in both envs

@SonarOpenCommunityAdmin
Copy link
Collaborator

@guwirth now its are running in both appveyour and travis,ive include helper method to skip scenario if platform is not correct.

the only issue now is with the ${TestDataFolder} not being translated in the plugin when set via environment variable in travis and appveyour

@guwirth
Copy link
Collaborator

guwirth commented Jan 10, 2016

@jmecosta I have CxxProjectBuilder running again. Which value should ${TestDataFolder} have? Who is setting it?

sonar.cxx.cppcheck.reportPath=/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2-reports/reports-cppcheck/*.xml

@jmecosta
Copy link
Member Author

in travis is /home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/ and in appveyour TestDataFolder=C:\projects\sonar-cxx\integration-tests\testdata

those are set in the yml files

cmd: SET TestDataFolder=C:\projects\sonar-cxx\integration-tests\testdata
and

RAILS_ENV=production PATH=$PATH:/tmp/sonar-runner-2.4/bin TestDataFolder=~/sonar-cxx/integration-tests/testdata behave

when users are running those thye need also set those accordinlgy... we might need to find a better way to handle this, like set it during the test with running path so it works everywhere.

@jmecosta
Copy link
Member Author

some findings with sonarqube 5.3:

  • 5.3 does not solve the current issues with using sonar as a service, recent changes made actually makes sonar not to start at all and no relevant error messages are found in logs. -Djava.io.tmpdir= defined in wrapper is now mandatory if we want to start sonarqube using local system account.
  • after struggling i tried to actually force the creation C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp that did no exist and was causing the failures during analysis in first place. this actually works in Appveyour and after applying both java.io.tmpdir and creation of temp folder ive finally was able to run the analysis
  • the current workarounds will need to be removed once core is able to properly work under system local account and use properties in the properties file instead of wrapper.

cc @simonbrandhof

@jmecosta
Copy link
Member Author

more findings:

  • appveyour duration of its are painfully slow, startup of server takes about 4 minutes alone (linux takes less than a minute).

curios since the compilation and starting the builds is much faster than travis. there must be something weird and its work to investigate this better. probably we require support from appveyour guys

@jmecosta
Copy link
Member Author

@guwirth still faling, the expansion is now printed into log however its not used in the report sensor

@guwirth
Copy link
Collaborator

guwirth commented Jan 10, 2016

multi-module project:

  • path projectBaseDir must be absolute and not .
  • for projectBaseDir it's not possible to use a placeholder because of sonar-runner restriction

@guwirth
Copy link
Collaborator

guwirth commented Jan 10, 2016

And rebase missing?

@jmecosta
Copy link
Member Author

It should be rebased!

At least I can see the cxxprojwct builder printing stuff to the log

@jmecosta
Copy link
Member Author

ok, seems missed something. i rebase

@jmecosta
Copy link
Member Author

the multi module project 1, seems not bother himself by the fact the projectBaseDir is . . passes both on windows and unix so i will leave it like that

@jmecosta jmecosta closed this Jan 10, 2016
@jmecosta jmecosta reopened this Jan 10, 2016
@jmecosta
Copy link
Member Author

@guwirth yep still fails, i think i had rebase it already.

relevant sutff:

16:08:14.645 DEBUG - property expansion: key 'sonar.cxx.cppcheck.reportPath'; value '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/.xml' => '/home/travis/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2-reports/reports-cppcheck/.xml'

16:08:18.202 DEBUG - Using pattern '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/.xml' to find reports
16:08:18.203 DEBUG - Unprocessed root directory '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a'
16:08:18.203 DEBUG - Unprocessed report file '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/
.xml'
16:08:18.203 DEBUG - Processed root directory '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a/${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck'
16:08:18.203 DEBUG - Processed report file '.xml'
16:08:18.210 WARN - File access Failed '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a/${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck' :
16:08:18.210 WARN - Cannot find a report for 'sonar.cxx.cppcheck.reportPath=${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/
.xml'

https://s3.amazonaws.com/archive.travis-ci.org/jobs/101420428/log.txt

@guwirth
Copy link
Collaborator

guwirth commented Jan 10, 2016

@jmecosta really strange. I did several tests with Windows 7, SQ 5.1.2, slash/backslash, environment variable/-D option, ... it was working.
In this line it should normally already be replaced: Using pattern '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/.xml' to find reports

@jmecosta
Copy link
Member Author

Did you try to run the it tests with current master and make the change I
did? For me it fails also locally.

On Sun, Jan 10, 2016, 21:23 Günter Wirth [email protected] wrote:

@jmecosta https://github.com/jmecosta really strange. I did several
tests with Windows 7, SQ 5.1.2, slash/backslash, environment variable/-D
option, ... it was working.
In this line it should normally already be replaced: Using pattern
'${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/.xml'
to find reports


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

@guwirth
Copy link
Collaborator

guwirth commented Jan 11, 2016

@jmecosta have less time this week but will try.

@jmecosta
Copy link
Member Author

Ok no prob. This is just for the sake of making sure we have this working
ok for the next release

On Mon, Jan 11, 2016, 19:40 Günter Wirth [email protected] wrote:

@jmecosta https://github.com/jmecosta have less time this week but will
try.


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

@jmecosta
Copy link
Member Author

@guwirth

exactly the same as with wrong path.

10:07:22.913 DEBUG - Using pattern '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/.xml' to find reports
10:07:22.913 DEBUG - Unprocessed root directory '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a'
10:07:22.913 DEBUG - Unprocessed report file '${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/
.xml'
10:07:22.913 DEBUG - Processed root directory '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a/${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck'
10:07:22.913 DEBUG - Processed report file '.xml'
10:07:22.922 WARN - File access Failed '/home/travis/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata/cpp-multimodule-project-2/A/1/a/${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck' :
10:07:22.922 WARN - Cannot find a report for 'sonar.cxx.cppcheck.reportPath=${TestDataFolder}/cpp-multimodule-project-2-reports/reports-cppcheck/
.xml'

ok so it seems the current implementation does not work in multi module since #756 is passing

@guwirth
Copy link
Collaborator

guwirth commented Jan 13, 2016

@jmecosta will have a look what's different with multi-module projects.

@SonarOpenCommunityAdmin
Copy link
Collaborator

@guwirth ready to review and merge. few things

. the differences in metrics observed in 5.3 ive comment them in the its tests, when we have new LTS than we can enable those again. same for the test density
. windows its are running 5.3 only. seems they take around 9 minutes (3 minutes to start sonar). Travis its around 4 minutes.

@guwirth guwirth added this to the M 0.9.5 milestone Feb 7, 2016
@guwirth
Copy link
Collaborator

guwirth commented Feb 7, 2016

@jmecosta thanks for providing this looks good. 👍

cpp-multimodule-project is commented out? Is this because of placeholder/ multi-module problem?

@jmecosta
Copy link
Member Author

jmecosta commented Feb 7, 2016

@guwirth yes, this is disabled because of the issue we were investigating earlier when environment variables not being properly picked in this kind of multi module approach. i can open a pull request and enable the test back again so you can try to look at it (not sure, but i thought it was the last change made to this that broke it, i tought the first implementation for env variables was working).

@guwirth
Copy link
Collaborator

guwirth commented Feb 8, 2016

@jmecosta would merge this and track remaining issue with #773

@jmecosta
Copy link
Member Author

jmecosta commented Feb 9, 2016

Sounds good

On Mon, 8 Feb 2016 23:39 Günter Wirth [email protected] wrote:

@jmecosta https://github.com/jmecosta would merge this and track
remaining issue with #773
#773


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

guwirth added a commit that referenced this pull request Feb 9, 2016
@guwirth guwirth merged commit 2ba787e into SonarOpenCommunity:master Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants