Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6715b24
Lab: set up lab/main, the base for lab builds (#92)
dayfine Oct 31, 2026
52fb02b
Merge origin/main into lab/main
dayfine Nov 1, 2026
0e737fb
Settings: default audio display and collapsed console settings (#99)
dayfine Nov 1, 2026
877cee4
Merge origin/main into lab/main (#83)
dayfine Nov 1, 2026
cd2a04a
Merge origin/main into lab/main (#104)
dayfine Nov 1, 2026
7d6712e
Lab control folder: start/stop the selected program from scripts (#76)
dayfine Oct 30, 2026
b30fb26
Lab control folder: a README for the files and their protocol
dayfine Nov 1, 2026
bc834a8
Command File Runner: a developer program driven by text command files
dayfine Nov 1, 2026
557e5ec
Skills: the console-iteration dev loop, with the Command File Runner …
dayfine Nov 1, 2026
e280a48
Lab scripts: the console lock, Lab Control and Command File Runner fr…
dayfine Nov 1, 2026
8f2441d
Skills: make the console-iteration loop program-agnostic
dayfine Nov 1, 2026
21e2ce3
Command File Runner: expose its command table for the lab channel
dayfine Nov 1, 2026
bec4aee
Lab channel: one request folder per app, replacing the lab control fo…
dayfine Nov 1, 2026
00b35e8
Lab channel: select a program and set its options from a request
dayfine Nov 1, 2026
7483b96
Lab channel: the owner lock and keepawake
dayfine Nov 1, 2026
ac5ea4b
Lab channel: one README for the files, the commands and a worked run
dayfine Nov 1, 2026
7f99715
Merge remote-tracking branch 'origin/lab/tooling' into lab/tooling-ch…
dayfine Nov 1, 2026
7ea0326
Lab scripts: speak the lab channel
dayfine Nov 1, 2026
c004be6
Lab scripts README: the claim's journal line is line 2, after the own…
dayfine Nov 1, 2026
4151709
Command File Runner: std::format for log and error lines
dayfine Nov 1, 2026
842ef8b
Lab channel: drop LabControl.md
dayfine Nov 1, 2026
322e754
Merge lab/tooling (#107) into lab/main
dayfine Nov 1, 2026
8459564
Lab channel: a refused start or stop is a journal error
dayfine Nov 1, 2026
9c150c1
Lab channel: "set" takes the JSON as written; '#' inside a string is …
dayfine Nov 1, 2026
9c4b56f
Lab channel: start from MainWindow only when Lab/ exists, as a pool task
dayfine Nov 1, 2026
e35c859
Lab commands: screen-only commands don't wait for the controller
dayfine Nov 1, 2026
566ede8
lablock.sh: a lock being written is not stale
dayfine Nov 1, 2026
c23466d
Skill: how to use it, and one step of any program
dayfine Nov 1, 2026
e275c27
Skills: make CFR verification explicit in the console iteration loop
dayfine Nov 1, 2026
94be4fd
Skills: scope console iteration examples to their game and task
dayfine Nov 1, 2026
8d13713
Merge lab/tooling review fixes into lab/main
dayfine Nov 1, 2026
a45c82b
Merge origin/main into lab/main
dayfine Nov 1, 2026
fed71d6
Merge origin/main into lab/main
dayfine Nov 2, 2026
04f6521
Replace the USE_QT_UI global with use_qt_ui()
dayfine Nov 3, 2026
e06d70e
Add SerialProgramsTests, a unit test runner without the GUI
dayfine Nov 3, 2026
c1f27b6
Merge origin/main into lab/main
dayfine Nov 3, 2026
ee20fdc
Merge origin/main into build/use-qt-ui-accessor
dayfine Nov 3, 2026
43edf27
Merge origin/build/use-qt-ui-accessor into build/headless-tests
dayfine Nov 3, 2026
ad6aa40
SerialProgramsTests: address review (span filters, namespaces, docs)
dayfine Nov 3, 2026
c213cac
Unit test runner: blank lines around unit_test_names()
dayfine Nov 3, 2026
6cf3cdb
Add SerialProgramsTests for running unit tests without the GUI
dayfine Nov 4, 2026
d5d34b8
Use structured bindings for filtered unit test entries
dayfine Nov 4, 2026
0f9d232
Handle empty test selections before listing or running
dayfine Nov 4, 2026
006d547
Drop the --list option from SerialProgramsTests
dayfine Nov 4, 2026
b9548df
Merge origin/main into lab/main
dayfine Nov 4, 2026
0910e0f
Merge origin/main into build/use-qt-ui-accessor
dayfine Nov 4, 2026
e8d97ba
Merge origin/build/use-qt-ui-accessor into build/headless-tests
dayfine Nov 4, 2026
32f9003
Lab: reject unsafe startup and isolate native test launches (#233)
dayfine Nov 6, 2026
f369bf0
Merge origin/main into lab/main
dayfine Nov 6, 2026
3a00943
Merge origin/main into build/use-qt-ui-accessor
dayfine Nov 6, 2026
f66d3c3
Merge origin/build/use-qt-ui-accessor into build/headless-tests
dayfine Nov 6, 2026
0aedd1b
Autostory: fix bug in Area zero segment (#1850)
jw098 Nov 6, 2026
531917d
FRLG RNG: extra A press for JPN when entering the safari zone (#1855)
theastrogoth Nov 6, 2026
58af96a
Lab: seed isolated profiles and validate staged app identity (#236)
dayfine Nov 6, 2026
83dec64
Lab: enforce device ownership before hardware opens (#237)
dayfine Nov 6, 2026
fead15a
PokemonSV: add test for DialogArrowDetector::locate_dialog_arrow (#1857)
pa-devbot Nov 7, 2026
75e5bd9
Python: basic pybind11 interface to the microcontroller (#1612)
pa-devbot Nov 7, 2026
8355a6a
Set up ccache in CMake and add it to the Mac build guide (#1847)
Gin890 Nov 7, 2026
6d89008
FRLG BoxSorter LivingDex (#1809)
Dalton-V Nov 7, 2026
864ffcf
Joystick refactor: fix leftover stale old-API comments and option lab…
pa-devbot Nov 7, 2026
91fbbce
Remove use_qt_ui(): the CoreLib split made it vestigial (#1856)
pa-devbot Nov 7, 2026
ae05c7a
Fix the audio decoder thread leak in load_full_audio() (#1748)
Gin890 Nov 7, 2026
bd350bb
Support custom dex template from RotomLabs (#1858)
Dalton-V Nov 7, 2026
61f361a
Remove unused Qt UI accessor from standalone test runner
dayfine Nov 7, 2026
1f0edf0
Merge upstream main and retain test runner alongside Python bindings
dayfine Nov 7, 2026
f5ed406
Merge origin/upstream/headless-tests (SerialProgramsTests) into lab/main
dayfine Nov 8, 2026
68ecbf8
Lab: merge lab/tooling into lab/main (lab commands start inference th…
dayfine Nov 8, 2026
036a05e
Lab devices: a refusal names the device it refused (#257)
dayfine Nov 8, 2026
356aa15
Merge build/headless-tests (#207) into lab/main
dayfine Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/cpp-ci-python-bindings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: C++ CI Python Bindings
on:
push:
branches: [main]
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Builds the GUI-free core plus the _pa_core pybind11 module
# (Source/PythonBindings/README.md) and runs the package's pytest suite.
# This needs no Qt, OpenCV, ONNX Runtime, Tesseract, DPP or Discord SDK.

jobs:
build:
# if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-26.04

steps:
- name: Checkout Arduino-Source
uses: actions/checkout@v7
with:
path: 'Arduino-Source'
submodules: 'recursive'

# Step 1: Create a single environment for the entire job
- name: Set up Virtual Environment
run: |
python3 -m venv /tmp/pa-build-venv
/tmp/pa-build-venv/bin/pip install --upgrade pip
/tmp/pa-build-venv/bin/pip install pybind11 pytest

- name: Generate binaries
run: |
cd Arduino-Source/SerialPrograms
mkdir bin
cd bin
cmake .. -DPA_CORE_ONLY=ON -DPA_PYTHON_BINDINGS=ON -DPython_EXECUTABLE=/tmp/pa-build-venv/bin/python
cmake --build . --config RelWithDebInfo --parallel 10

- name: Run the Python tests
run: |
cd Arduino-Source/SerialPrograms/Source/PythonBindings
/tmp/pa-build-venv/bin/python -m pytest -q

# Note: the venv avoids PEP 668 issues with system-pip on newer runners.
# The runner's system Python needs dev headers (python3-dev is preinstalled on the images).
27 changes: 24 additions & 3 deletions .github/workflows/cpp-ci-serial-programs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ jobs:
# The unit tests assume the downloadable resources they need are already downloaded
# (see Packages/Resources/ResourceDownloadList.json). Unzip them from the Packages
# checkout into where the program looks for them, DOWNLOADED_RESOURCE_PATH():
# the working directory on Windows/Linux, and ~/Library/Application Support/SerialPrograms
# on macOS.
# the working directory on Windows/Linux, and ~/Library/Application Support/SerialPrograms/Profiles/unit-tests
# on macOS (the isolated test profile).
- name: Install downloadable resources for tests
if: inputs.run-tests
shell: bash
run: |
if [[ "${{inputs.os}}" == mac* ]]; then
DOWNLOADED_RESOURCES="$HOME/Library/Application Support/SerialPrograms/DownloadedResources"
DOWNLOADED_RESOURCES="$HOME/Library/Application Support/SerialPrograms/Profiles/unit-tests/DownloadedResources"
else
DOWNLOADED_RESOURCES="Arduino-Source/SerialPrograms/bin/DownloadedResources"
fi
Expand Down Expand Up @@ -289,6 +289,27 @@ jobs:
cd Arduino-Source/SerialPrograms/bin
./SerialPrograms --command-line-test-mode

- name: Reject unsafe lab launches (Mac)
if: startsWith(inputs.os, 'mac') && inputs.run-tests
shell: bash
run: |
cd Arduino-Source/SerialPrograms/bin
binary=./SerialPrograms.app/Contents/MacOS/SerialPrograms
expect_rejection() {
local status=0
"$binary" "$@" || status=$?
if [[ "$status" != 2 ]]; then
echo "Expected startup rejection (2), read $status"
exit 1
fi
}
expect_rejection --test bdsp
expect_rejection --profile
expect_rejection --profile ../lab-A
expect_rejection --command-line-test-mode --profile lab-A
# CI's default build has no PA_LAB_PROFILE: unprofiled relaunch must fail.
expect_rejection

- name: Run tests (Mac)
if: startsWith(inputs.os, 'mac') && inputs.run-tests
run: |
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/lab-device-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lab device ownership
on:
pull_request:
workflow_dispatch:
jobs:
native-leases:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: jurplel/install-qt-action@v4
with:
version: '6.10.2'
cache: true
- run: cmake -S SerialPrograms/Source/CommonFramework/Devices -B build-lab-devices -DCMAKE_BUILD_TYPE=Debug
- run: cmake --build build-lab-devices --config Debug -j4
- run: ctest --test-dir build-lab-devices -C Debug --output-on-failure
21 changes: 21 additions & 0 deletions .github/workflows/lab-instance-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lab instance tools
on:
pull_request:
paths:
- 'devtools/lab/**'
- 'SerialPrograms/cmake/LabBuildReceipt.cmake'
- 'SerialPrograms/CMakeLists.txt'
- '.github/workflows/lab-instance-tools.yml'
workflow_dispatch:
jobs:
offline-preparation:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- run: python3 -m unittest discover -s devtools/lab -p 'test_lab_instance.py' -v
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ migrate a file to the wrappers when you're already touching it and it's straight
Windows/Linux; `~/Library/Application Support/SerialPrograms/DownloadedResources` on macOS).
- Headless Linux: `QT_QPA_PLATFORM=offscreen` and
`TESSDATA_PREFIX=<bin>/Resources/Tesseract`.
- `SerialProgramsTests` (built by default next to `SerialPrograms`; `-DTEST_RUNNER_EXE=OFF`
turns it off) runs the same tests without the GUI, settings or device scans, so it can run
while SerialPrograms is open: `ninja SerialProgramsTests`, then
`SerialProgramsTests --filter <text>` (repeatable) or `--list`. Its exit code is the number
of failed tests. Same requirements as above.
- Test framework: test classes derive `UnitTest` (`Common/Cpp/TestRunners/UnitTest.h`) and are
collected via per-module `add_tests(UnitTestDatabase&)` — see
`SerialPrograms/Source/Tests/CommandLineTests.h`.
Expand Down
9 changes: 5 additions & 4 deletions Common/Cpp/Filesystem/Filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef PokemonAutomation_Filesystem_Filesystem_H
#define PokemonAutomation_Filesystem_Filesystem_H

#include <string_view>
#include <cstdint>
#include <vector>
#include "FilePath.h"
Expand Down Expand Up @@ -115,11 +116,11 @@ Path application_install_path();
Path application_scratch_path();


// Set a profile for program settings (/UserSettings/PROFILE_NAME/) on MacOS.
// Have to run the program with command-line argument "open -n PATH_TO_APP --args --profile PROFILE_NAME" to set the profile and launch a new window.
// This allows multiple instances of the program to run since settings are no longer shared.
#if defined(__APPLE__)
void set_startup_profile(int& argc, char* argv[]);
// Set a validated macOS settings profile before any settings paths are cached.
// GUI launch uses --profile NAME or the build-bound PA_LAB_PROFILE identity.
void set_startup_profile(std::string_view profile);
// Return the identity used for the window title and scratch directory.
const std::string& STARTUP_PROFILE();
#endif

Expand Down
19 changes: 3 additions & 16 deletions Common/Cpp/Filesystem/Filesystem_Mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,9 @@ namespace Filesystem{

static std::string g_startup_profile;

void set_startup_profile(int& argc, char* argv[]){
for (int i = 1; i + 1 < argc; i++){
if (strcmp(argv[i], "--profile") == 0){
std::string profile = argv[i + 1];
for (char c : profile){
if (!(std::isalpha(c) || std::isdigit(c)) && c != u'_' && c != u'-') c = u'_';
}
g_startup_profile = std::move(profile);
// Shift everything after --profile <name> down by 2.
for (int j = i; j + 2 < argc; j++){
argv[j] = argv[j + 2];
}
argc -= 2;
return;
}
}
// Store the already-validated identity before any scratch/settings path is cached.
void set_startup_profile(std::string_view profile){
g_startup_profile = profile;
}

const std::string& STARTUP_PROFILE(){
Expand Down
33 changes: 29 additions & 4 deletions SerialPrograms/BuildInstructions/CompilingForMac.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,18 @@ brew install cmake

### Install Ninja

Ninja is a build tool that CMake can use to find out quickly what files need rebuilding. Install it using Homebrew by running in Terminal
Ninja is a build tool that CMake can use to find out quickly what files need rebuilding by file modification time. Install it using Homebrew by running in Terminal
```
brew install ninja
```

### Install ccache

ccache is another build tool that saves build time. It uses a cache to skip building a source code file if that file's content has been compiled before. Install it using Homebrew by running in Terminal
```
brew install ccache
```

### Install Qt6

We use Qt6 software library to build UI (windows, panels, buttons...) for **SerialPrograms**. It also plays and decodes audio.
Expand Down Expand Up @@ -268,11 +275,13 @@ This makes a new folder called "build_mac" in "Arduino-Source" and moves the Ter

Execute the command in Terminal:
```
cmake ../SerialPrograms/ -G Ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_PREFIX_PATH=$HOME/Qt/6.10.2/macos
cmake ../SerialPrograms/ -G Ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_PREFIX_PATH=$HOME/Qt/6.10.2/macos -DPA_USE_CCACHE=ON
```
This command uses CMake to configure our code to prepare for compilation. `-G Ninja` tells CMake to compile with Ninja, and `-DCMAKE_PREFIX_PATH` tells CMake where the Qt you installed is. If successful, it should print texts like
This command uses CMake to configure our code to prepare for compilation. `-G Ninja` tells CMake to compile with Ninja, `-DCMAKE_PREFIX_PATH` tells CMake where the Qt you installed is, and `-DPA_USE_CCACHE=ON` tells CMake to compile with ccache. If successful, it should print texts like
```
...
-- Using ccache: /opt/homebrew/bin/ccache cache_dir=/Users/<YOUR_MAC_USERNAME>/Library/Caches/ccache/PA-Arduino-Source base_dir=<YOUR_PATH_TO_ARDUINO-SOURCE_FOLDER>
...
-- Configuring done
-- Generating done
-- Build files have been written to: <YOUR_PATH_TO_ARDUINO-SOURCE_FOLDER>/build_mac
Expand All @@ -286,6 +295,7 @@ cmake --build . -j 10
```
to compile and build the program in "build_mac" folder.
It will take a while to build depending on your computer's speed.
Later builds should be faster thanks to Ninja and ccache.

Each line starts with a counter like `[25/1613]`. If successful, the counter reaches the total, and the last lines in Terminal look like
```
Expand Down Expand Up @@ -351,11 +361,26 @@ rm -rf build_mac
to delete the old "build_mac" folder. Then follow [Part 4: Compile the Program](#part-4-compile-the-program) again,
with the new Qt version in the `-DCMAKE_PREFIX_PATH` part of the CMake command.

## Part 7: Tuning ccache (optional)

The default ccache settings work for most people. This part is for developers who build often or keep several copies of the code (a.k.a worktrees) in the filesystem.

To check cache statistics on the codebase (how many cache hits and misses so far and storage space uses), run in Terminal
```
ccache --dir $(ccache --get-config cache_dir)/PA-Arduino-Source -s
```

By default ccache has a max cache size of 5 GB. When the storage is full, ccache deletes the files it used least recently.
If you often switch between many branches and worktrees of the codebase, you can increase its size to say 20 GB by
```
ccache --dir $(ccache --get-config cache_dir)/PA-Arduino-Source --set-config max_size=20G
```

For more info on how we set up ccache when configuring the program, see `SerialPrograms/cmake/Ccache.cmake`.

<hr>

Guide Written by: jw098
Guide Written by: Gin, jw098

**Discord Server:**

Expand Down
78 changes: 71 additions & 7 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_VERBOSE_MAKEFILE ON)

# Compile through ccache when it is installed. See cmake/Ccache.cmake for the options.
include(cmake/Ccache.cmake)

# Set these three on globally so all intermediate Qt targets can get processed automatically
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
Expand Down Expand Up @@ -63,6 +66,32 @@ find_package(Threads REQUIRED)
# Define a toggle option (ON by default)
option(COMMAND_LINE_EXE "Build the optional executable" ON)

# Build SerialProgramsTests, which runs the unit tests without the GUI.
option(TEST_RUNNER_EXE "Build the unit test executable, SerialProgramsTests" ON)
# Build the _pa_core Python (pybind11) module; see Source/PythonBindings/README.md.
# OFF by default because it needs a Python interpreter with development headers
# and pybind11 (a system package or `pip install pybind11`).
option(PA_PYTHON_BINDINGS "Build the _pa_core Python module (Switch controller)" OFF)

# miniz is a third-party library compiled into every target that uses
# CORE_LIBRARY_SOURCES (CoreLib in both build modes, SerialProgramsLib in the
# full build): compile it with warnings off so its own code (and its header,
# which it includes from its own directory, so no SYSTEM include directory can
# shield it) can never trip -Werror / /WX, regardless of compiler or compiler
# version. Must run before the PA_CORE_ONLY early return below; source
# properties are global, so setting it once covers every target.
if (MSVC)
set_source_files_properties(
../3rdParty-Core/miniz-3.1.1/miniz.c
PROPERTIES COMPILE_OPTIONS "/W0"
)
else()
set_source_files_properties(
../3rdParty-Core/miniz-3.1.1/miniz.c
PROPERTIES COMPILE_OPTIONS "-w"
)
endif()

# Build only the GUI-free core: CoreLib and SerialProgramsCommandLine. This needs
# no Qt, OpenCV, ONNX Runtime, Tesseract, DPP or Discord SDK, so none of them are
# searched for.
Expand All @@ -84,6 +113,9 @@ if(PA_CORE_ONLY)
if(COMMAND_LINE_EXE)
include(Source/CommandLine/CommandLineExecutable.cmake)
endif()
if(PA_PYTHON_BINDINGS)
include(Source/PythonBindings/PythonBindings.cmake)
endif()
return()
endif()

Expand Down Expand Up @@ -203,6 +235,27 @@ if (APPLE)
# https://stackoverflow.com/questions/53560288/how-to-create-a-macos-app-bundle-with-cmake
# https://cmake.org/cmake/help/latest/command/add_executable.html
add_executable(SerialPrograms MACOSX_BUNDLE ${SerialPrograms_ICON} ${EXECUTABLE_SOURCES})
# Compiled identity survives Finder/TCC relaunch without command-line arguments.
set(PA_LAB_PROFILE "" CACHE STRING "Bind this lab binary to one macOS settings profile")
if(NOT PA_LAB_PROFILE STREQUAL "")
if(NOT PA_LAB_PROFILE MATCHES "^[A-Za-z0-9_][A-Za-z0-9_-]*$")
message(FATAL_ERROR "PA_LAB_PROFILE must contain only ASCII letters, digits, '_' or '-'.")
endif()
target_compile_definitions(SerialPrograms PRIVATE PA_LAB_PROFILE="${PA_LAB_PROFILE}")
endif()

# Receipt binds packaging to the linked binary, not just a CMake cache value.
set_property(TARGET SerialPrograms APPEND PROPERTY LINK_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/LabBuildReceipt.cmake")
add_custom_command(TARGET SerialPrograms POST_BUILD
COMMAND "${CMAKE_COMMAND}"
"-DBINARY=$<TARGET_FILE:SerialPrograms>"
"-DPROFILE=${PA_LAB_PROFILE}"
"-DSOURCE=${CMAKE_CURRENT_SOURCE_DIR}/.."
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/LabBuildReceipt.cmake"
VERBATIM
)

set_target_properties(SerialPrograms PROPERTIES
BUNDLE True
MACOSX_BUNDLE_GUI_IDENTIFIER PokemonAutomation.SerialPrograms
Expand Down Expand Up @@ -283,13 +336,6 @@ endfunction()
apply_common_target_properties(SerialProgramsLib)
apply_common_target_properties(SerialPrograms)

if(MSVC)
set_source_files_properties("../3rdParty-Core/miniz-3.1.1/miniz.c" PROPERTIES COMPILE_FLAGS "/W0")
else()
# For GCC/Clang
set_source_files_properties("../3rdParty-Core/miniz-3.1.1/miniz.c" PROPERTIES COMPILE_FLAGS "-w")
endif()

# REPO_ROOT_DIR: the root folder of the git repository, "Arduino-Source/"
set(PACKAGES_DIR "${REPO_ROOT_DIR}/Packages")
set(FIRMWARE_DIR "${PACKAGES_DIR}/Firmware")
Expand Down Expand Up @@ -336,6 +382,10 @@ if(NOT EXISTS "${DEST_DIR}/Scripts")
)
endif()

if(TEST_RUNNER_EXE)
include(Source/Tests/TestRunnerExecutable.cmake)
endif()

if (WIN32)
add_library(OpenCV_lib IMPORTED UNKNOWN)
target_include_directories(SerialProgramsLib SYSTEM PRIVATE ../3rdParty/opencv-4.12.0/)
Expand Down Expand Up @@ -888,3 +938,17 @@ if(COMMAND_LINE_EXE)
# Add command-line executable (GUI-free) from subdirectory
include(Source/CommandLine/CommandLineExecutable.cmake)
endif()

# The registered cross-process tests use this GUI-free native runner as their child.
add_subdirectory(Source/CommonFramework/Devices)
if(WIN32)
set_target_properties(LabDeviceAccessTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${WIN_DEPLOY_DIR}")
else()
set_target_properties(LabDeviceAccessTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:SerialPrograms>")
endif()
add_dependencies(SerialPrograms LabDeviceAccessTests)

if(PA_PYTHON_BINDINGS)
# Python bindings (GUI-free) from subdirectory
include(Source/PythonBindings/PythonBindings.cmake)
endif()
Loading