Skip to content

Commit

Permalink
ci_automation: log success
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Nov 3, 2023
1 parent 60e05d3 commit c7cc6b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ int main(int, char *[])
WriteWin32SuccessFile();
#endif

printf("Exiting ci_automation_test_app with success!\n");
return 0;
}
17 changes: 11 additions & 6 deletions .github/ci_automation_tests/ci_automation_test_app_bundle.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
from imgui_bundle import hello_imgui, immapp, imgui

import sys
from typing import Optional


test_open_metrics: imgui.test_engine.Test = None
test_capture: imgui.test_engine.Test = None
test_exit: imgui.test_engine.Test = None
test_open_metrics: Optional[imgui.test_engine.Test] = None
test_capture: Optional[imgui.test_engine.Test] = None
test_exit: Optional[imgui.test_engine.Test] = None


def my_register_tests():
global test_open_metrics, test_capture, test_exit
engine = hello_imgui.get_imgui_test_engine()

# Open Metrics window
test_open_metrics =imgui.test_engine.register_test(engine, "demo_tests", "open_metrics")
test_open_metrics = imgui.test_engine.register_test(engine, "demo_tests", "open_metrics")

def test_func_metrics(ctx: imgui.test_engine.TestContext):
ctx.set_ref("Dear ImGui Demo")
ctx.menu_check("Tools/Metrics\\/Debugger")
test_open_metrics.test_func = test_func_metrics

# Capture entire Dear ImGui Demo window.
test_capture = imgui.test_engine.register_test(engine, "demo_tests", "capture_screenshot")

def test_func_capture(ctx: imgui.test_engine.TestContext):
ctx.set_ref("Dear ImGui Demo")
ctx.item_open("Widgets") # Open collapsing header
Expand All @@ -30,12 +33,13 @@ def test_func_capture(ctx: imgui.test_engine.TestContext):

# Exit
test_exit = imgui.test_engine.register_test(engine, "demo_tests", "exit")

def test_func_exit(ctx: imgui.test_engine.TestContext):
ctx.item_click("**/Exit")
test_exit.test_func = test_func_exit


@immapp.static(idx_frame_count = 0)
@immapp.static(idx_frame_count=0)
def queue_all_tests():
static = queue_all_tests
static.idx_frame_count += 1
Expand All @@ -57,7 +61,7 @@ def app_gui():
hello_imgui.get_runner_params().app_shall_exit = True

imgui.show_demo_window()
imgui.test_engine.show_test_engine_windows(hello_imgui.get_imgui_test_engine(), None)
imgui.test_engine.show_test_engine_windows(hello_imgui.get_imgui_test_engine(), True)

queue_all_tests()

Expand All @@ -75,6 +79,7 @@ def main() -> int:
print("ERROR: exception in ci_automation_test_app", e)
return 1

print("Exiting ci_automation_test_app with success!\n")
return 0


Expand Down

0 comments on commit c7cc6b7

Please sign in to comment.