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

allow ct suites to be specified at root of project (or root of app) #966

Merged
merged 4 commits into from
Jan 6, 2016

Conversation

talentdeficit
Copy link
Contributor

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'

@@ -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;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@ferd
Copy link
Collaborator

ferd commented Dec 7, 2015

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.

@talentdeficit
Copy link
Contributor Author

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

@tsloughter tsloughter changed the title allow ct suites to be specified at root of project (or root of app) WIP: allow ct suites to be specified at root of project (or root of app) Dec 19, 2015
alisdair sullivan added 3 commits December 20, 2015 19:06
…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
@ferd ferd changed the title WIP: allow ct suites to be specified at root of project (or root of app) allow ct suites to be specified at root of project (or root of app) Jan 6, 2016
ferd added a commit that referenced this pull request Jan 6, 2016
allow ct suites to be specified at root of project (or root of app)
@ferd ferd merged commit 956e43a into erlang:master Jan 6, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants