| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // Copyright (c) 2000-2019 Ericsson Telecom AB // |
| // // |
| // All rights reserved. This program and the accompanying materials // |
| // are made available under the terms of the Eclipse Public License v2.0 // |
| // which accompanies this distribution, and is available at // |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_ILog_demo |
| // |
| // Purpose: |
| // This module contains function definitions for the demo of EPTF ILog |
| // |
| // Module Parameters: |
| // - |
| // |
| // Module depends on: |
| // <EPTF_ILog_Application_Definitions> |
| // <EPTF_ILog_Application_Functions> |
| // <EPTF_CLL_LGenBase_ConfigFunctions> |
| // <EPTF_CLL_LGenBase_TrafficFunctions> |
| // |
| // Current Owner: |
| // Jozsef Gyurusi (ethjgi) |
| // |
| // Last Review Date: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| |
| module EPTF_ILog_demo { |
| |
| //========================================================================= |
| // Import Part |
| //========================================================================= |
| import from EPTF_ILog_Application_Definitions all; |
| import from EPTF_ILog_Application_Functions all; |
| import from EPTF_CLL_LGenBase_ConfigFunctions all; |
| import from EPTF_CLL_LGenBase_TrafficFunctions all; |
| |
| |
| //========================================================================= |
| // Functions |
| //========================================================================= |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_LGenBase_wait4TestFinished |
| // |
| // Purpose: |
| // Wait fot end of the test |
| // |
| // Parameters: |
| // pl_duration - *in* *float* - wait duration |
| // pl_setverdict - *in* *boolean* - set verdict flag |
| // |
| // Return Value: |
| // *boolean* - result of the test |
| /////////////////////////////////////////////////////////// |
| function f_EPTF_LGenBase_wait4TestFinished( |
| in float pl_duration := 60.0, |
| in boolean pl_setverdict := true) |
| runs on EPTF_ILog_Test_CT |
| return boolean{ |
| timer TL_1 |
| timer TL_2 |
| TL_1.start( 0.0 ) |
| TL_2.start( pl_duration ) |
| alt{ |
| [v_EPTF_ILog_Application_testFinished] TL_1.timeout{ |
| TL_2.stop |
| v_EPTF_ILog_Application_testFinished := false |
| action("----Finished") |
| if(pl_setverdict){ |
| setverdict(pass); |
| } |
| return true |
| } |
| [] TL_2.timeout { |
| action("----TimedOut ", pl_duration) |
| if(pl_setverdict){ |
| setverdict(fail, "timeout in "&%definitionId); |
| } |
| v_EPTF_ILog_Application_testFinished := false |
| return false |
| } |
| } |
| return false |
| } |
| |
| |
| //========================================================================= |
| // Testcases |
| //========================================================================= |
| |
| /////////////////////////////////////////////////////////// |
| // Testcase: tc_EPTF_ILog_demo |
| // |
| // Purpose: |
| // Process the demo application |
| // |
| // Parameters: |
| // - |
| // |
| // Return Value: |
| // - |
| /////////////////////////////////////////////////////////// |
| testcase tc_EPTF_ILog_demo() runs on EPTF_ILog_Test_CT { |
| f_EPTF_ILog_Application_init_CT("tc_EPTF_ILog_demo"); |
| f_EPTF_LGenBase_log(); |
| f_EPTF_LGenBase_setFsmDebugLight(f_EPTF_LGenBase_fsmNameIndex("MAIN_FSM"), true); |
| if(f_EPTF_LGenBase_wait4TestFinished(30.0)==false){ |
| action("----Wait for finish->fail!") |
| } |
| f_EPTF_LGenBase_stopTrafficCase("eg1","SC1","TC1"); |
| } |
| |
| } //module EPTF_ILog_demo |