-
Notifications
You must be signed in to change notification settings - Fork 512
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
allow ct suites to be specified at root of project (or root of app) #966
Conversation
@@ -217,6 +217,9 @@ copy(OldAppDir, AppDir, Dir) -> | |||
|
|||
%% TODO: use ec_file:copy/2 to do this, it preserves timestamps and | |||
%% may prevent recompilation of files in extra dirs | |||
copy(Source, Source) -> | |||
%% someone specified a src dir inside _build. weird but ok | |||
ok; |
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.
Sounds like a thing where we should crash? I'm not sure what use case is ever valid for that, unless they'Re trying to run deps' suites or something?
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.
it's useful for providers and plugins that want to stage some files to _build precompilation. without the source/dest check cp_r fails and aborts messily
If my reading of the patch is fine, this only alters behaviour when specifying suites at the root, right, and not anywhere else? I'd hate to lose the recursive copy in a well-isolated test directory. If my understanding is right, then +1. |
yes, this only effects passing either the project root or an app's root dir as a ct compile target, either via --dir directly or by inferring the dir based on a suite's path don't merge yet though, i have one more refinement that can go in that allows for duplicate names for suites per app i thought up on the way to work this morning |
8a96b73
to
39c7ed2
Compare
39c7ed2
to
69c5033
Compare
…app) previously rebar3 dropped suites declared at the root of the project (via `--suite=whatever_SUITE' probably) and warned. this was because the compiler would recursively copy and compile everything in the directory indicated by the test suite. this changes the copy mechanism to only copy erl source files and directories that end with `_SUITE_data' into the `extras' dir in `_build'
this allows repeated test suite names across apps without conflicts
69c5033
to
a4711d0
Compare
allow ct suites to be specified at root of project (or root of app)
previously rebar3 dropped suites declared at the root of the project (via
--suite=whatever_SUITE' probably) and warned. this was because the compiler would recursively copy and compile everything in the directory indicated by the test suite. this changes the copy mechanism to only copy erl source files and directories that end with
_SUITE_data' into theextras' dir in
_build'