Vote count:
0
I have a text file as below. I need to find keywords as "(number) tests from (number) test cases ran" and store the number. In the below case the number is 67. Secondly, I need to find "PASSED" keyword and then followed by "(number) tests". In the below case it is 67 tests. How can i do it.
Tanks, Sharath
< 0x00000: 5b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 5d 20 31 34 20 [----------] 14
< 0x00010: 74 65 73 74 73 20 66 72 6f 6d 20 44 49 53 41 42 tests from DISAB
< 0x00020: 4c 45 44 5f 47 65 6e 65 72 69 63 44 52 4d 54 65 LED_GenericDRMTe
< 0x00030: 73 74 20 28 31 32 38 34 39 20 6d 73 20 74 6f 74 st (12849 ms tot
< 0x00040: 61 6c 29 0d 0a 0d 0a 5b 2d 2d 2d 2d 2d 2d 2d 2d al)....[--------
< 0x00050: 2d 2d 5d 20 47 6c 6f 62 61 6c 20 74 65 73 74 20 --] Global test
< 0x00060: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 74 65 61 72 environment tear
< 0x00070: 2d 64 6f 77 6e 0d 0a 5b 3d 3d 3d 3d 3d 3d 3d 3d -down..[========
< 0x00080: 3d 3d 5d 20 36 37 20 74 65 73 74 73 20 66 72 6f ==] 67 tests fro
< 0x00090: 6d 20 34 20 74 65 73 74 20 63 61 73 65 73 20 72 m 4 test cases r
< 0x000a0: 61 6e 2e 20 28 34 33 38 32 33 20 6d 73 20 74 6f an. (43823 ms to
< 0x000b0: 74 61 6c 29 0d 0a 5b 20 20 50 41 53 53 45 44 20 tal)..[ PASSED
< 0x000c0: 20 5d 20 36 37 20 74 65 73 74 73 2e 0d 0a ] 67 tests...
asked 2 mins ago
Aucun commentaire:
Enregistrer un commentaire