Skip to content

Refactor test scripts into modular examples directory with dual-engine driver architecture#33

Merged
copybara-service[bot] merged 1 commit into
mainfrom
refactor-examples
May 16, 2026
Merged

Refactor test scripts into modular examples directory with dual-engine driver architecture#33
copybara-service[bot] merged 1 commit into
mainfrom
refactor-examples

Conversation

@smilingday

Copy link
Copy Markdown
Collaborator

This PR comprehensively refactors the legacy test_scripts/ directory into a highly modular, reusable examples/ directory featuring a dual-engine driver architecture.

Key Improvements

  1. Directory & File Normalization:

    • Renamed test_scripts/ to examples/.
    • Flattened utility locations: Moved models/utils.sh and models/utils.ps1 to examples/utils.sh and examples/utils.ps1.
  2. Modular Command-Specific Test Suite (examples/commands/):

    • Replaced the monolithic, unmaintainable litert_cli_test_commands.sh with 5 pristine, independent test scripts: download_test.sh, compile_test.sh, run_test.sh, benchmark_test.sh, and visualize_test.sh.
    • Stripped out all verbose $TEST_DATA_DIR and $MODEL_DIR variables in favor of clean symlinked workspaces.
  3. Dual-Engine Driver Architecture:

    • examples/run_commands.sh: Automated regression driver for all CLI commands.
    • examples/run_models.sh: Automated driver for model-specific end-to-end demos.
    • Both drivers support comma-separated execution lists (download,compile) and default to running all tests when invoked without arguments.
    • Integrated LITERT_CLI_SHARED_VENV="true" caching mode, drastically reducing CI execution time by sharing the UV environment and model caches across all test suites.
  4. Platform & Hardware Robustness:

    • Added standard Linux host checks around offline AOT compilation steps across all scripts, elegantly skipping them on macOS to prevent CI failures.
    • Documented and commented out Android OpenCL GPU runs for ResNet18 due to known PADV2 op delegation limitations.
  5. Comprehensive Documentation Sync:

    • Updated README.md, pyproject.toml, and SKILL.md to reflect the new examples/ structure and execution SOPs.

@smilingday smilingday removed the request for review from ai-edge-bot May 16, 2026 00:08
@copybara-service copybara-service Bot merged commit 3b085bf into main May 16, 2026
17 of 23 checks passed
@smilingday smilingday deleted the refactor-examples branch May 19, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants