-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make it possible to run tests when configuring with -Dgnuinstall:BOOL=ON #130
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
Conversation
|
That is fantastic, wow! Thank you! Is there a reason you decided to use an env var over a flag to trigger this? (I am honestly polling for reasons here.) Cheers, Axel. |
|
The reason for using an environment variable is the following: It is a common occurrence in the root code to use initialization classes that perform configuration in its constructor, and then have a static instance of this class declared in a library so that this initialization happens automatically when the library is loaded. This initialization often depends on the various directory paths. Since the initialization of the static instances in the libraries an application links to happens before the main program starts, the behaviour of these initialization routines can not be modified by command line options, since these options are parsed by the main program. With an environment variable this works though. |
|
Excellent reason. It's also likely only needed in very specific situations, i.e. usability is not really a concern here. I'll do a review the patch; looked good on a first quick glimpse! |
core/base/src/TROOT.cxx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to move this preprocessor logic into TROOT::GetEtcDir()? I.e. have TROOT::GetEtcDir() return TROOT::GetRootSys() for iphone / simulator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't make sense to me in the first place. I simply tried to not change what de code did so that I didn't introduce any new behaviour.
The main reason for thinking that it is strange is that if "etc does not exist on ios", then I would have expected this #ifdef to appear every place where ROOTETCDIR is used. This is not the case. It appears - if I remember correctly - twice in the whole source tree. For all the other places ROOTETCDIR is used also for ios.
If ios does not have etc I would have expected that for ios configure/cmake would default to --etcdir='${prefix}' and then ROOTETCDIR would correctly point to rootsys already and no #ifdefs would be needed.
I agree the code as it is written is strange - but I didn't want to just assume the code was wrong and "fix" it in case I had the wrong idea of what was the intended behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that makes perfect sense. If we determine that this should happen in all instances then I will do this in a separate commit.
|
Thx |
net/http/src/THttpServer.cxx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get
src/net/http/src/THttpServer.cxx:150:50: error: cannot pass non-trivial object of type
'const TString' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
TString jsdir = TString::Format("%s/http", TROOT::GetEtcDir());
~~ ^~~~~~~~~~~~~~~~~~
1 error generated.
Could you cross-check the other occurrences, please?
|
This is an awesome patch, @ellert - thanks so much! I am done reviewing the code and the configure/make build system; I'll ask Pere for a to review of the CMake part. Ideally I'd like to see the fixes to my comments first. Do you think you would be able to help us with those, too? Cheers, Axel. |
|
A general comment, if possible it would be better if we could avoid the commits "Merge branch 'master' into install-test" if possible. |
core/base/inc/TROOT.h
Outdated
| static const TString& GetDataDir(); | ||
| static const TString& GetDocDir(); | ||
| static const TString& GetMacroDir(); | ||
| static const TString& GetTutorialsDir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is back incompatible (as you noticed by having to add .Data() in the tutorials). So we need to find an alternative name/way to introduce the thread safe version. thanks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed GetTutorialsDir to GetTutorialDir and added a backward compatible GetTutorialsDir that returns const char*.
The name without the s actually is more consistent since none of the others uses the plural (GetIncludeDir, GetDocDir, GetMacroDir, GetSourceDir and so on - not Includes, Docs, Macros, Sources).
|
I have tried to keep this PR mergeable, but since it touches quite a lot of files it is not uncommon that changes to master make changes to the same files in a way that can not be automatically resolved. The "Merge branch 'master' into install-test" commits are the resolutions of these merge conflicts. |
|
Sorry Mattias - I believe you're done with my comments, right? So then I'll assign this to Pere for the CMake part. |
|
Thanks. I merged master and resolved the conflicts again. This time there were quite a few of them due to the recent changes to the rootcling statge 1 processing. |
|
I am testing it now. |
|
Hi Mattias. Running with this PR I manage to run all tests successfully without the option gnuinstall. Running with the option I get 227 tests failed out of 1395. Basically all the failures are related to difficulties to build dictionaries or libraries because the ROOT libraries are expected in different place. |
|
I always run with the gnuinstall option, and I see no failures. But I don't have as many tests in total as you. For my 6.08.04 build I have (see: https://kojipkgs.fedoraproject.org//packages/root/6.08.04/1.fc25/data/logs/x86_64/build.log): 100% tests passed, 0 tests failed out of 602 This is with a few tests requiring network access disabled make test 'ARGS=-j16 --output-on-failure -E "test-stressIOPlugins-.*|tutorial-tree-run_h1analysis|tutorial-multicore-imt001_parBranchProcessing|tutorial-multicore-mp103_processSelector|tutorial-multicore-imt101_parTreeProcessing"' But those few disabled tests do not account for the difference between 602 and 1395. I disable all the builtin options (except for llvm), and build using the versions of external dependencies that are available in the distribution. Can you elaborate on what you mean by "because the ROOT libraries are expected in different place"? When running the test suite in the build tree, the libraries are expected to be in the same place independently of the gnuinstall option (i.e. in ${CMAKE_BINARY_DIR}/lib). The location of the built targets in the build tree are supposed to not depend on whether the gnuinstall option is on or off. |
|
Are you enabling the 'roottest' tests (with -Droottest=ON)? Because all the failing tests are in this category. Lets take for example Another type of failures are the following, which involves the location of Clang resources. |
|
The failing tests where from roottest suit. Two fixes:
|
This is a possible solution for ROOT-7538. I hope this is at least similar to what you had in mind when you wrote the comment in that ticket. Hopefully it can at least be used as a start.