FreeCalypso > hg > fc-magnetite
comparison src/cs/services/lls/tests/lls_test.c @ 0:945cf7f506b2
src/cs: chipsetsw import from tcs211-fcmodem
binary blobs and LCD demo files have been excluded,
all line endings are LF only
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 25 Sep 2016 22:50:11 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:945cf7f506b2 |
|---|---|
| 1 /********************************************************************************/ | |
| 2 /* */ | |
| 3 /* File Name: lls_test.c */ | |
| 4 /* */ | |
| 5 /* Purpose: This file contains LLS test generic functions. */ | |
| 6 /* */ | |
| 7 /* Note: None. */ | |
| 8 /* */ | |
| 9 /* Revision History: */ | |
| 10 /* 03/12/2002 Laurent Sollier Create. */ | |
| 11 /* */ | |
| 12 /* (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved */ | |
| 13 /* */ | |
| 14 /********************************************************************************/ | |
| 15 | |
| 16 #include "tests/rv/rv_test_filter_redirect.h" | |
| 17 #include "tests/rv/rv_test.h" | |
| 18 | |
| 19 #if (LLS_TEST == SW_COMPILED) | |
| 20 | |
| 21 | |
| 22 /********************************************************************************/ | |
| 23 /* Global variables for tests */ | |
| 24 /********************************************************************************/ | |
| 25 | |
| 26 T_RVF_MB_ID mb_lls_test; | |
| 27 T_RV_RETURN lls_test_path; | |
| 28 | |
| 29 /********************************************************************************/ | |
| 30 /* */ | |
| 31 /* Function Name: lls_test_set_mb_id */ | |
| 32 /* */ | |
| 33 /* Purpose: This function is called to set LLS test MB IDs. */ | |
| 34 /* */ | |
| 35 /* Note: None. */ | |
| 36 /* */ | |
| 37 /* Revision History: */ | |
| 38 /* 03/12/2002 Laurent Sollier Create. */ | |
| 39 /* */ | |
| 40 /********************************************************************************/ | |
| 41 void lls_test_set_mb_id (T_RVF_MB_ID mb_id[]) | |
| 42 { | |
| 43 mb_lls_test = mb_id[0]; | |
| 44 lls_test_path.callback_func = NULL; | |
| 45 lls_test_path.addr_id = rvf_get_taskid(); | |
| 46 } | |
| 47 /********************* End of lls_test_set_mb_id function *********************/ | |
| 48 | |
| 49 | |
| 50 | |
| 51 /********************************************************************************/ | |
| 52 /* */ | |
| 53 /* Function Name: fix_lls_test_verdict */ | |
| 54 /* */ | |
| 55 /* Purpose: The purpose of this function is to fix test_verdict */ | |
| 56 /* param value depending on error_type param value. */ | |
| 57 /* */ | |
| 58 /* Note: None. */ | |
| 59 /* */ | |
| 60 /* Revision History: */ | |
| 61 /* 03/12/2002 Laurent Sollier Create. */ | |
| 62 /* */ | |
| 63 /********************************************************************************/ | |
| 64 | |
| 65 T_RV_TEST_RET fix_lls_test_verdict (T_RV_TEST_ERR_TYPE *error_type) | |
| 66 { | |
| 67 T_RV_TEST_RET test_verdict; | |
| 68 | |
| 69 /******************** fix_lls_test_verdict function begins ********************/ | |
| 70 | |
| 71 switch (*error_type) | |
| 72 { | |
| 73 case NO_ERR: | |
| 74 { | |
| 75 test_verdict = TEST_PASSED; | |
| 76 break; | |
| 77 } | |
| 78 case NO_EVENT_RECV: | |
| 79 { | |
| 80 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 81 break; | |
| 82 } | |
| 83 case BAD_EVENT_RECV: | |
| 84 { | |
| 85 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 86 break; | |
| 87 } | |
| 88 case EVENT_PARAM_ERROR: | |
| 89 { | |
| 90 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 91 break; | |
| 92 } | |
| 93 case DATA_ERROR: | |
| 94 { | |
| 95 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 96 break; | |
| 97 } | |
| 98 case MEMORY_ERROR: | |
| 99 { | |
| 100 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 101 break; | |
| 102 } | |
| 103 default: | |
| 104 { | |
| 105 rvf_send_trace ("!!! ERROR !!! Wrong error_type value", | |
| 106 36, | |
| 107 NULL_PARAM, | |
| 108 RV_TRACE_LEVEL_ERROR, | |
| 109 TRACE_RVTEST); | |
| 110 test_verdict = TEST_IRRECOVERABLY_FAILED; | |
| 111 break; | |
| 112 } | |
| 113 } /* End of "switch (*error_type)" */ | |
| 114 | |
| 115 return (test_verdict); | |
| 116 } | |
| 117 | |
| 118 /******************** End of fix_lls_test_verdict function ********************/ | |
| 119 #else | |
| 120 | |
| 121 /* Add a dummy function in order to allow compilation of the LLS test lib on | |
| 122 ARM V1.22 compiler */ | |
| 123 void lls_test_dummy(void) | |
| 124 { | |
| 125 } | |
| 126 #endif /* #if (LLS_TEST == SW_COMPILED) */ |
