ns2: introduce module parameter SnsRole

Allow the .cfg to define which tests should be run.
The new SGSN role SNS tests have their own configurations for
TTCN3 and osmo-nsdummy.

Change-Id: If8162f256428e2e1f353ffbf42a7c0cd24bcecd9
diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index d42ef8c..0cef341 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -24,7 +24,13 @@
 import from Osmocom_VTY_Functions all;
 import from TELNETasp_PortType all;
 
+type enumerated SnsRole {
+	SNS_ROLE_BSS			('00'H),
+	SNS_ROLE_SGSN			('01'H)
+};
+
 modulepar {
+	SnsRole mp_sns_role := SNS_ROLE_BSS;
 	OsmoNsDialect mp_dialect := NS2_DIALECT_IPACCESS;
 	NSConfiguration mp_nsconfig := {
 		nsei := 96,
@@ -736,15 +742,17 @@
 	}
 
 	if (mp_dialect == NS2_DIALECT_SNS) {
-		/* BSS test cases */
-		execute( TC_sns_bss_config_success() );
-		execute( TC_sns_bss_change_weight() );
-		execute( TC_sns_bss_change_weight_timeout() );
-		execute( TC_sns_bss_add() );
-		execute( TC_sns_bss_del() );
-		execute( TC_sns_bss_add_change_del() );
-		execute( TC_sns_bss_all_signalling_nsvcs_failed() );
-		execute( TC_sns_rx_size_force_unconf() );
+		if (mp_sns_role == SNS_ROLE_BSS) {
+			/* BSS test cases */
+			execute( TC_sns_bss_config_success() );
+			execute( TC_sns_bss_change_weight() );
+			execute( TC_sns_bss_change_weight_timeout() );
+			execute( TC_sns_bss_add() );
+			execute( TC_sns_bss_del() );
+			execute( TC_sns_bss_add_change_del() );
+			execute( TC_sns_bss_all_signalling_nsvcs_failed() );
+			execute( TC_sns_rx_size_force_unconf() );
+		}
 	}
 }