-
Notifications
You must be signed in to change notification settings - Fork 518
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
How to compile in *_SUITE_data directories? #1345
Comments
the rebar compiler recurses into subdirs by default but there's an (internal) option to disable that. it could pretty easily be used to stop ct from compiling subdir code. would that address this issue? |
Great! I guess it would solve the problem of compiled data dir code ending up in the test directory. Which option is it? |
@talentdeficit did you do a PR for this? I could try to implement it otherwise. I need to learn and navigate the common test provider anyhow. |
Finally had a look at the 'recursive' option, and it would probably solve the problem in most cases. However, to be "always correct" we would need to set it to |
If I was to add a 'recursive' option to the config, should it be
or a new top level opt, e.g.
And if using No matter what, I think that |
i'm not sure how feasible it currently is to compile only specific directories recursively. as an all-or-nothing option it should probably be something like alternately, if we want to pursue recursive compilation for subsets of directories, it could be attached as an argument to
|
Thanks! I'll look at |
I think I can close this since #1382 was merged in. Let me know if it's not the case and we'll reopen it. |
We have some apps that need to compile some extra test code specific for certain suites. The source for this is placed in the suite's data dir, and it is built by a common_test hook which is part of the 'ts' stuff under common_test/test_server - i.e. specific for running OTP tests. The code can be erlang, c, java..., and the build result is typically also placed in the data dir so there won't be any conflict between test suites. Some times the file structure for the outcome is also important, e.g. when needing a whole OTP application for testing upgrade or other OTP application mechanisms.
Now I'm looking into how rebar3 can be used for building and testing of split out OTP applications. I find that rebar3 builds erlang code in my data dirs and places the result flat in the test directory. Is there a way to avoid this?
I also wonder if there is a "better" and/or more "rebar3 typical" way to build the code in the data dirs? A plugin to hook into the compilation under the test profile? Any other idea?
The text was updated successfully, but these errors were encountered: