| 785 | } |
| 786 | |
| 787 | int32 Internal::Test_Query() |
| 788 | { |
| 789 | if (gTestMethodIdx != -1) |
| 790 | { |
| 791 | uint32 tickEnd = BfpSystem_TickCount(); |
| 792 | TestString(StrFormat(":TestResult\t%d\n", tickEnd - gTestStartTick)); |
| 793 | } |
| 794 | |
| 795 | TestString(":TestQuery\n"); |
| 796 | |
| 797 | Beefy::String result; |
| 798 | TestReadCmd(result); |
| 799 | |
| 800 | Beefy::String param; |
| 801 | int tabPos = (int)result.IndexOf('\t'); |
| 802 | if (tabPos != -1) |
| 803 | { |
| 804 | param = result.Substring(tabPos + 1); |
| 805 | result.RemoveToEnd(tabPos); |
| 806 | } |
| 807 | |
| 808 | if (result == ":TestRun") |
| 809 | { |
| 810 | gTestStartTick = BfpSystem_TickCount(); |
| 811 | Beefy::String options; |
| 812 | int tabPos = (int)param.IndexOf('\t'); |
| 813 | if (tabPos != -1) |
| 814 | { |
| 815 | options = param.Substring(tabPos + 1); |
| 816 | param.RemoveToEnd(tabPos); |
| 817 | } |
| 818 | |
| 819 | gTestMethodIdx = atoi(param.c_str()); |
| 820 | gTestBreakOnFailure = options.Contains("FailBreak"); |
| 821 | return gTestMethodIdx; |
| 822 | } |
| 823 | else if (result == ":TestFinish") |
| 824 | { |
| 825 | return -1; |
| 826 | } |
| 827 | else |
| 828 | { |
| 829 | printf("Command Str: %s\n", result.c_str()); |
| 830 | BF_FATAL("Invalid test command string from test manager"); |
| 831 | } |
| 832 | |
| 833 | return false; |
| 834 | } |
| 835 | |
| 836 | void Internal::Test_Finish() |
| 837 | { |
nothing calls this directly
no test coverage detected