From 659fcc5ebd03b72a4081bf0853538800ddf16f86 Mon Sep 17 00:00:00 2001 From: Adam Lindberg Date: Mon, 6 Feb 2012 11:57:35 +0100 Subject: [asn1] Parallelize test suites --- lib/asn1/test/testTCAP.erl | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'lib/asn1/test/testTCAP.erl') diff --git a/lib/asn1/test/testTCAP.erl b/lib/asn1/test/testTCAP.erl index 5e29938a16..f4e80ecd3b 100644 --- a/lib/asn1/test/testTCAP.erl +++ b/lib/asn1/test/testTCAP.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2010. All Rights Reserved. +%% Copyright Ericsson AB 2003-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,33 +19,22 @@ %% -module(testTCAP). --export([compile/3,test/2,compile_asn1config/3,test_asn1config/0]). +-export([compile/2,test/2,compile_asn1config/2,test_asn1config/0]). -include_lib("test_server/include/test_server.hrl"). +compile(Config, Options) -> + Files = ["Remote-Operations-Information-Objects", + "TCAPMessages", + "TCAPMessages-simple", + "TCAPPackage"], + asn1_test_lib:compile_all(Files, Config, Options), + DataDir = ?config(data_dir,Config), + CaseDir = ?config(case_dir,Config), + compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,CaseDir},{outdir,CaseDir}]). - -compile(Config,Rules,Opt) -> - - ?line DataDir = ?config(data_dir,Config), - ?line OutDir = ?config(priv_dir,Config), - ?line true = code:add_patha(?config(priv_dir,Config)), - - ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Information-Objects",[Rules,{outdir,OutDir}]++Opt), -% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Generic-ROS-PDUs",[Rules,{outdir,OutDir}]++Opt), -% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Useful-Definitions",[Rules,{outdir,OutDir}]++Opt), - ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages",[Rules,{outdir,OutDir}]++Opt), - ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages-simple",[Rules,{outdir,OutDir}]++Opt), - ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage",[Rules,{outdir,OutDir}]++Opt), - ?line compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,OutDir},{outdir,OutDir}]). - -compile_asn1config(Config,Rules,Opt) -> - ?line DataDir = ?config(data_dir,Config), - ?line OutDir = ?config(priv_dir,Config), - ?line true = code:add_patha(?config(priv_dir,Config)), - - ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage", - [Rules,{outdir,OutDir},{i,DataDir}]++Opt). +compile_asn1config(Config, Options) -> + asn1_test_lib:compile("TCAPPackage", Config, Options). test(Erule,_Config) when Erule==ber;Erule==ber_bin;Erule==ber_bin_v2 -> % ?line OutDir = ?config(priv_dir,Config), -- cgit v1.2.3 From 9ec0a0babace0932d78accf7c10b237a32dc801c Mon Sep 17 00:00:00 2001 From: Adam Lindberg Date: Thu, 16 Feb 2012 15:51:37 +0100 Subject: [asn1] Refactor test cases and remove extra suites --- lib/asn1/test/testTCAP.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/asn1/test/testTCAP.erl') diff --git a/lib/asn1/test/testTCAP.erl b/lib/asn1/test/testTCAP.erl index f4e80ecd3b..878ce7c070 100644 --- a/lib/asn1/test/testTCAP.erl +++ b/lib/asn1/test/testTCAP.erl @@ -29,12 +29,13 @@ compile(Config, Options) -> "TCAPMessages-simple", "TCAPPackage"], asn1_test_lib:compile_all(Files, Config, Options), - DataDir = ?config(data_dir,Config), - CaseDir = ?config(case_dir,Config), - compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,CaseDir},{outdir,CaseDir}]). + asn1_test_lib:compile_erlang("TCAPPackage_msg", Config, []). compile_asn1config(Config, Options) -> - asn1_test_lib:compile("TCAPPackage", Config, Options). + Files = ["Remote-Operations-Information-Objects", + "TCAPPackage"], + asn1_test_lib:compile_all(Files, Config, Options), + asn1_test_lib:compile_erlang("TCAPPackage_msg", Config, []). test(Erule,_Config) when Erule==ber;Erule==ber_bin;Erule==ber_bin_v2 -> % ?line OutDir = ?config(priv_dir,Config), -- cgit v1.2.3