Exemplo n.º 1
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='triangle'),
        LoadSymbols(module_search_string="triangle.exe"),
        VerifySymbolsLoaded(symbol_search_string="wWinMain"),
        LoadSymbols(module_search_string="d3d11.dll"),
        VerifySymbolsLoaded(symbol_search_string="Present")
    ]
    suite = E2ETestSuite(test_name="Load Symbols PE/COFF",
                         test_cases=test_cases)
    suite.execute()
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='hello_'),
        LoadSymbols(module_search_string="hello_ggp"),
        FilterAndEnableFrameTrackForFunction(
            function_search_string='DrawFrame'),
        LoadSymbols(module_search_string="libvulkan.so.1"),
        FilterAndEnableFrameTrackForFunction(
            function_search_string='vkQueuePresentKHR'),
        Capture(length_in_seconds=1),
        CaptureRepeatedly(number_of_f5_presses=200)
    ]
    suite = E2ETestSuite(test_name="Capture repeatedly", test_cases=test_cases)
    suite.execute()
Exemplo n.º 3
0
def main(argv):
    tracks = [
        "DynamicName_0", "DynamicName_1", "DynamicName_2", "DynamicName_3", "double_var",
        "float_var", "int64_var", "int_var", "uint64_var", "uint_var", "ORBIT_ASYNC_TASKS",
        "ORBIT_START_ASYNC_TEST"
    ]
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='OrbitTest'),
        LoadSymbols(module_search_string="OrbitTest"),
        # Take a capture without manual instrumentation and assert that no tracks show up.
        Capture(manual_instrumentation=False),
        VerifyTracksDoNotExist(track_names=tracks),
        # Take a capture with manual instrumentation and check for the existence of the tracks and the timers in the thread tracks.
        Capture(manual_instrumentation=True),
        VerifyTracksExist(track_names=tracks),
        FilterTracks(filter_string="OrbitThread_", expected_track_count=3),
        ToggleCollapsedStateOfAllTracks(),
        CheckTimers(track_name_filter="OrbitThread_*"),
        # Take another capture without manual instrumentation and assert that the tracks are gone.
        Capture(manual_instrumentation=False),
        VerifyTracksDoNotExist(track_names=tracks),
    ]
    suite = E2ETestSuite(test_name="Manual Instrumentation", test_cases=test_cases)
    suite.execute()
Exemplo n.º 4
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='no_symbols_elf'),
        ClearSymbolCache(),
        ClearAllSymbolLocations(),
        LoadSymbols(module_search_string="no_symbols_elf", expect_fail=True),
        AddSymbolLocation(location=stale_path),
        LoadSymbols(module_search_string="no_symbols_elf", expect_fail=True),
        AddSymbolLocation(location=working_path),
        LoadSymbols(module_search_string="no_symbols_elf"),
        ClearAllSymbolLocations()
    ]
    suite = E2ETestSuite(test_name="Custom symbol locations",
                         test_cases=test_cases)
    suite.execute()
Exemplo n.º 5
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter="hello_ggp_c"),
        LoadSymbols(module_search_string="hello_ggp_c"),
        ShowSourceCode(function_search_string="DrawFrame"),
    ]
    suite = E2ETestSuite(test_name="Show Source Code", test_cases=test_cases)
    suite.execute()
Exemplo n.º 6
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter="call_foo_repeat"),
        LoadSymbols(module_search_string="call_foo_repeatedly"),
        FilterAndHookFunction(function_search_string="foo{(}{)}"),
        CaptureAndWaitForInterruptedWarning(user_space_instrumentation=True)
    ]
    suite = E2ETestSuite(test_name="Memory watchdog", test_cases=test_cases)
    suite.execute()
Exemplo n.º 7
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter="hello_ggp"),
        LoadSymbols(module_search_string="hello_ggp"),
        FilterAndHookFunction(function_search_string='DrawFrame'),
        Capture(),
        AddIterator(function_name="DrawFrame")
    ]
    suite = E2ETestSuite(test_name="Add Iterator", test_cases=test_cases)
    suite.execute()
Exemplo n.º 8
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter="hello_ggp"),
        LoadSymbols(module_search_string="hello_ggp"),
        FilterAndHookFunction(function_search_string='DrawFrame'),
        Capture(),
        AddFrameTrack(function_name="DrawFrame"),
        VerifyTracksExist(track_names="Frame track*"),  # Verify there's exactly one frame track
        CheckTimers(track_name_filter='Frame track*')  # Verify the frame track has timers
    ]
    suite = E2ETestSuite(test_name="Add Frame Track", test_cases=test_cases)
    suite.execute()
Exemplo n.º 9
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='hello_'),
        LoadSymbols(module_search_string="hello_ggp"),
        FilterAndHookFunction(function_search_string='DrawFrame'),
        Capture(),
        VerifyFunctionCallCount(function_name='DrawFrame',
                                min_calls=30,
                                max_calls=3000)
    ]
    suite = E2ETestSuite(test_name="Connect & Capture", test_cases=test_cases)
    suite.execute()
Exemplo n.º 10
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='hello_'),
        LoadSymbols(module_search_string="libggp"),
        FilterAndHookMultipleFunctions(
            function_search_string='GgpIssueFrameToken_v'),
        Capture(),
        VerifyOneFunctionWasCalled(
            function_name_contains='GgpIssueFrameToken_v',
            min_calls=30,
            max_calls=3000)
    ]
    suite = E2ETestSuite(test_name="Instrument libggp", test_cases=test_cases)
    suite.execute()
Exemplo n.º 11
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='hello_'),
        LoadSymbols(module_search_string="hello_ggp"),
        Capture(),
        CheckTimers(track_name_filter='Scheduler'),
        CheckTimers(track_name_filter='gfx'),
        CheckTimers(track_name_filter="All Threads", expect_exists=False),
        CheckTimers(track_name_filter="hello_ggp_stand", expect_exists=False),
        FilterAndHookFunction(function_search_string='DrawFrame'),
        Capture(),
        VerifyFunctionCallCount(function_name='DrawFrame', min_calls=30, max_calls=3000),
        CheckTimers(track_name_filter="All Threads", expect_exists=False),
        CheckTimers(track_name_filter="hello_ggp_stand")
    ]
    suite = E2ETestSuite(test_name="Instrument Function", test_cases=test_cases)
    suite.execute()
Exemplo n.º 12
0
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter='hello_ggp'),
        ClearSymbolCache(),
        LoadAllSymbolsAndVerifyCache(),
        EndSession(),
        FilterAndSelectFirstProcess(process_filter='hello_ggp'),
        LoadAllSymbolsAndVerifyCache(expected_duration_difference_ratio=0.99),
        EndSession(),
        FilterAndSelectFirstProcess(process_filter='hello_ggp'),
        LoadSymbols(module_search_string="libggp"),
        EndSession(),
        FilterAndSelectFirstProcess(process_filter='hello_ggp'),
        ForceAndVerifySymbolUpdate(full_module_path="/user/local/cloudcast/lib/libggp.so",
                                   replace_with_module="/mnt/developer/hello_ggp_standalone")

    ]
    suite = E2ETestSuite(test_name="Symbol loading and caching", test_cases=test_cases)
    suite.execute()
def main(argv):
    test_cases = [
        ConnectToStadiaInstance(),
        FilterAndSelectFirstProcess(process_filter="triangle.exe"),
        LoadSymbols(module_search_string="triangle.exe"),
        Capture(manual_instrumentation=True),
        VerifyTracksExist(track_names=[
            "Frame time, ms (double)", "Frame time, ms (float)",
            "Frame time, us (int)", "Frame time, us (int64)",
            "Frame time, us (uint)", "Frame time, us (uint64)",
            "Render (async)"
        ]),
        VerifyTracksExist(track_names="triangle.exe", allow_duplicates=True),
        CheckTimers(track_name_filter="Render (async)"),
        # There are multiple tracks with the name of the process, and we can't rename threads on Windows,
        # hence `require_all=False`.
        CheckTimers(track_name_filter="triangle.exe", require_all=False),
    ]
    suite = E2ETestSuite(test_name="Manual Instrumentation on Silenus",
                         test_cases=test_cases)
    suite.execute()