From 0ef5020588a76252e5fe1473991fee6246b13f4d Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sun, 4 Jan 2026 12:14:58 -0600 Subject: [PATCH 1/2] Fix tests. --- README.md | 10 +++++----- test/rom_test/dune | 4 +--- test/rom_test/mooneye/dune | 5 +++++ test/rom_test/mooneye/mooneye_utils.ml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 test/rom_test/mooneye/dune diff --git a/README.md b/README.md index 115ec25..a5ae806 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Try it out in our **[demo page](https://linoscope.github.io/CAMLBOY/)**! We ran the first 1500 frames of [Tobu Tobu Girl](https://tangramgames.dk/tobutobugirl/) in headless mode (i.e., without UI) for ten times each and calculated the average FPS. The error bars represent the standard deviation. See [`benchmark.md`](benchmark.md) for details about the environment/commands used for the benchmark.[^1] -[^1]: Note that we can not use this benchmark to compare the FPS with other Game Boy emulators. This is because the performance of an emulator depends significantly on how accurate it is and how much functionality it has. For example, CALMBOY does not implement the APU (Audio Processing Unit), so there is no point in comparing its FPS with emulators with APU support. +[^1]: Note that we can not use this benchmark to compare the FPS with other Game Boy emulators. This is because the performance of an emulator depends significantly on how accurate it is and how much functionality it has. For example, CAMLBOY does not implement the APU (Audio Processing Unit), so there is no point in comparing its FPS with emulators with APU support.
@@ -97,8 +97,8 @@ Here is a rough sketch of the various modules and their relationship. You can fi - `web` - Web - `sdl2` - SDL2 - `test` - - `unit_tests` - Unit tests - - `rom_tests` - Integration tests that use test roms + - `unit_test` - Unit tests + - `rom_test` - Integration tests that use test roms - `resource` - `games` - Game roms - `test_roms` - Test roms used in `rom_tests` @@ -183,9 +183,9 @@ First, follow the steps in "How to run with UI - js_of_ocaml frontend" above. No # Run all tests: $ dune runtest # Run unit tests only: -$ dune runtest test/unit_tests/ +$ dune runtest test/unit_test/ # Run integration tests (tests that use test ROMs): -$ dune runtest test/rom_tests/ +$ dune runtest test/rom_test/ ``` ## Resources diff --git a/test/rom_test/dune b/test/rom_test/dune index 79eb9b8..bd3b306 100644 --- a/test/rom_test/dune +++ b/test/rom_test/dune @@ -1,7 +1,5 @@ (library (name camlboy_rom_tests) (libraries camlboy_lib) - (inline_tests (deps (source_tree ../../resource/test_roms))) + (inline_tests (deps (source_tree ../../resource/test_roms))) (preprocess (pps ppx_jane))) - -(include_subdirs unqualified) diff --git a/test/rom_test/mooneye/dune b/test/rom_test/mooneye/dune new file mode 100644 index 0000000..7ca28c9 --- /dev/null +++ b/test/rom_test/mooneye/dune @@ -0,0 +1,5 @@ +(library + (name camlboy_mooneye_tests) + (libraries camlboy_lib) + (inline_tests (deps (source_tree ../../../resource/test_roms))) + (preprocess (pps ppx_jane))) diff --git a/test/rom_test/mooneye/mooneye_utils.ml b/test/rom_test/mooneye/mooneye_utils.ml index c587705..d5b6bd5 100644 --- a/test/rom_test/mooneye/mooneye_utils.ml +++ b/test/rom_test/mooneye/mooneye_utils.ml @@ -5,7 +5,7 @@ module Make (Cartridge : Cartridge_intf.S) = struct module Camlboy = Camlboy.Make (Cartridge) let run_test_rom_and_print_framebuffer file = - let path = Printf.sprintf "../../resource/test_roms/mooneye/%s" file in + let path = Printf.sprintf "../../../resource/test_roms/mooneye/%s" file in let rom_bytes = Read_rom_file.f path in let camlboy = Camlboy.create_with_rom ~rom_bytes ~print_serial_port:false in let rec loop () = From 0599aef4e7322227638c9fe134d4daf8df340e02 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sun, 4 Jan 2026 12:52:04 -0600 Subject: [PATCH 2/2] Add ocaml 5.x --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e1e39a8..b1a7c9d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -15,6 +15,7 @@ jobs: # - windows-latest ocaml-compiler: - 4.14.x + - 5.x runs-on: ${{ matrix.os }}