Skip to content

Commit

Permalink
[megaco|test] Made the app (and appup) sub-suite its own test suite
Browse files Browse the repository at this point in the history
Moved the app sub-suite out of the "main" test suite
into its own test suite.
Also removed the unused appup sub-suite (there was an appup
test case in the app suite).

OTP-16158
  • Loading branch information
bmk committed Dec 10, 2019
1 parent 74073d3 commit af09e07
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 123 deletions.
14 changes: 3 additions & 11 deletions lib/megaco/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ SOURCE = $(HRL_FILES) $(ERL_FILES)

TARGET_FILES = $(MODULES:%=%.$(EMULATOR))

APP_CASES = app appup
APP_CASES = app

CODEC_CASES = codec1 codec2 codec3a codec3b codec3c

Expand Down Expand Up @@ -211,9 +211,6 @@ help:
@echo " app"
@echo " Run the $(APPLICATION) application sub-test-suite. "
@echo ""
@echo " appup"
@echo " Run the $(APPLICATION) application upgrade (appup) sub-test-suite. "
@echo ""
@echo " conf"
@echo " Run the $(APPLICATION) config sub-test-suite. "
@echo " Checks various aspects of the megaco configuration. "
Expand Down Expand Up @@ -299,7 +296,7 @@ help:
aall: make
@echo "make sure epmd is new"
@epmd -kill > /dev/null
@echo "Running all app sub-suites separatelly"
@echo "Running all app suites separatelly"
@for i in $(APP_CASES); do \
echo "SUITE: $$i"; \
clearmake -V $$i > $$i.log; \
Expand Down Expand Up @@ -431,12 +428,7 @@ tickets: make

app: make
$(MERL) $(ARGS) -sname megaco_app $(ERL_PATH) \
-s megaco_test_lib t megaco_app_test \
$(ESTOP)

appup: make
$(MERL) $(ARGS) -sname megaco_appup $(ERL_PATH) \
-s megaco_test_lib t megaco_appup_test \
-s megaco_test_lib t megaco_app_SUITE \
$(ESTOP)

conf: make
Expand Down
7 changes: 2 additions & 5 deletions lib/megaco/test/megaco_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ init() ->
process_flag(trap_exit, true),
megaco_test_lib:flush().


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Top test case

suite() -> [{ct_hooks, [{ts_install_cth, [{nodenames,1}]}]}].

all() ->
[{group, app_test},
{group, appup_test},
{group, config},
[{group, config},
{group, flex},
{group, udp},
{group, tcp},
Expand All @@ -87,8 +86,6 @@ all() ->

groups() ->
[{tickets, [], [{group, mess}, {group, codec}]},
{app_test, [], [{megaco_app_test, all}]},
{appup_test, [], [{megaco_appup_test, all}]},
{config, [], [{megaco_config_test, all}]},
{call_flow, [], [{megaco_call_flow_test, all}]},
{digit_map, [], [{megaco_digit_map_test, all}]},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
%% Purpose: Verify the application specifics of the Megaco application
%%----------------------------------------------------------------------

-module(megaco_app_test).
-module(megaco_app_SUITE).

-export([
all/0,
suite/0, all/0,
init_per_suite/1, end_per_suite/1,
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2,

app/0, app/1,
appup/0, appup/1
Expand All @@ -37,13 +40,51 @@
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------

suite() ->
[{ct_hooks, [ts_install_cth]}].

all() ->
[
app,
appup
].


%%
%% -----
%%

init_per_suite(Config) when is_list(Config) ->
Config.

end_per_suite(Config) when is_list(Config) ->
Config.



%%
%% -----
%%

init_per_group(_GroupName, Config) ->
Config.

end_per_group(_GroupName, Config) ->
Config.


%%
%% -----
%%

init_per_testcase(_Case, Config) when is_list(Config) ->
Config.

end_per_testcase(_Case, Config) when is_list(Config) ->
Config.



%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
%%--------------------------------------------------------------------
Expand Down
100 changes: 0 additions & 100 deletions lib/megaco/test/megaco_appup_test.erl

This file was deleted.

14 changes: 9 additions & 5 deletions lib/megaco/test/modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# %CopyrightBegin%
#
# Copyright Ericsson AB 2001-2016. All Rights Reserved.
# Copyright Ericsson AB 2001-2019. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,11 +25,12 @@ COVER_SPEC_FILE = megaco.cover
BEHAVIOUR_MODULES = \
megaco_test_generator

MODULES = \
$(BEHAVIOUR_MODULES) \
SUITE_MODULES = \
megaco_SUITE \
megaco_app_test \
megaco_appup_test \
megaco_app_SUITE

TEST_UTIL_MODULES = \
$(BEHAVIOUR_MODULES) \
megaco_actions_test \
megaco_binary_term_id_test \
megaco_call_flow_test \
Expand Down Expand Up @@ -77,6 +78,9 @@ MODULES = \
megaco_test_msg_v3_lib \
megaco_test_lib

MODULES = \
$(TEST_UTIL_MODULES) \
$(SUITE_MODULES)

INTERNAL_HRL_FILES = \
megaco_test_lib.hrl
Expand Down

0 comments on commit af09e07

Please sign in to comment.