19
19
use_checkout_plugins /1 ,
20
20
% % project-local plugins
21
21
complex_local_plugins /1 ,
22
- complex_local_project_plugins /1
22
+ complex_local_project_plugins /1 ,
23
+ local_plugins_umbrella_only /1
23
24
]).
24
25
25
26
-include_lib (" common_test/include/ct.hrl" ).
@@ -44,7 +45,7 @@ end_per_testcase(_, _Config) ->
44
45
all () ->
45
46
[compile_plugins , compile_global_plugins , complex_plugins , list , upgrade , upgrade_project_plugin ,
46
47
sub_app_plugins , sub_app_plugin_overrides , project_plugins , use_checkout_plugins ,
47
- complex_local_plugins , complex_local_project_plugins ].
48
+ complex_local_plugins , complex_local_project_plugins , local_plugins_umbrella_only ].
48
49
49
50
% % Tests that compiling a project installs and compiles the plugins of deps
50
51
compile_plugins (Config ) ->
@@ -527,3 +528,55 @@ complex_local_project_plugins(Config) ->
527
528
528
529
meck :unload (rebar_dir ).
529
530
531
+ local_plugins_umbrella_only (Config ) ->
532
+ BaseDir = ? config (apps , Config ),
533
+ AppName = rebar_test_utils :create_random_name (" app1_" ),
534
+ AppDir = BaseDir ,
535
+ LocalPluginName = rebar_test_utils :create_random_name (" localplugin1_" ),
536
+ PluginDir = filename :join ([BaseDir , " plugins" , LocalPluginName ]),
537
+
538
+ meck :new (rebar_dir , [passthrough ]),
539
+
540
+ Vsn = rebar_test_utils :create_random_vsn (),
541
+ Vsn2 = rebar_test_utils :create_random_vsn (),
542
+ rebar_test_utils :create_app (AppDir , AppName , Vsn , [kernel , stdlib ]),
543
+ rebar_test_utils :create_app (PluginDir , LocalPluginName , Vsn , [kernel , stdlib ]),
544
+
545
+ DepName = rebar_test_utils :create_random_name (" dep1_" ),
546
+ DepName2 = rebar_test_utils :create_random_name (" dep2_" ),
547
+ DepName3 = rebar_test_utils :create_random_name (" dep3_" ),
548
+ DepName4 = rebar_test_utils :create_random_name (" dep4_" ),
549
+ PluginName = rebar_test_utils :create_random_name (" plugin1_" ),
550
+
551
+ Deps = rebar_test_utils :expand_deps (git , [{PluginName , Vsn2 , [{DepName2 , Vsn ,
552
+ [{DepName3 , Vsn , []}]}]}
553
+ ,{DepName , Vsn , [{DepName4 , Vsn , []}]}]),
554
+ {SrcDeps , _ } = rebar_test_utils :flat_deps (Deps ),
555
+ mock_git_resource :mock ([{deps , SrcDeps }]),
556
+
557
+ RootConfFile =
558
+ rebar_test_utils :create_config (BaseDir ,
559
+ [{plugins , [list_to_atom (LocalPluginName )]}]),
560
+ rebar_test_utils :create_config (
561
+ PluginDir ,
562
+ [{deps , [{list_to_atom (DepName ),
563
+ {git , " http://site.com/user/" ++ DepName ++ " .git" , {tag , Vsn }}}]},
564
+ {plugins , [{list_to_atom (PluginName ),
565
+ {git , " http://site.com/user/" ++ PluginName ++ " .git" , {tag , Vsn2 }}}
566
+ ]}]
567
+ ),
568
+ {ok , RConf } = file :consult (RootConfFile ),
569
+
570
+ % % Build with deps.
571
+ rebar_test_utils :run_and_check (
572
+ Config , RConf , [" compile" ],
573
+ {ok , [{app , AppName },
574
+ {plugin_not_exist , LocalPluginName },
575
+ {plugin_not_exist , PluginName },
576
+ {plugin_not_exist , DepName2 },
577
+ {plugin_not_exist , DepName3 },
578
+ {plugin_not_exist , DepName4 },
579
+ {plugin_not_exist , DepName }]}
580
+ ),
581
+
582
+ meck :unload (rebar_dir ).
0 commit comments