Skip to content

Commit 879128d

Browse files
committed
NXP backend: Enable initial unit tests workflow
1 parent 4559a61 commit 879128d

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/pull.yml

+26
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,32 @@ jobs:
513513
# Run pytest without simulator
514514
backends/arm/test/test_arm_baremetal.sh test_pytest
515515
516+
unittest-nxp-neutron:
517+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
518+
permissions:
519+
id-token: write
520+
contents: read
521+
with:
522+
runner: linux.2xlarge
523+
docker-image: executorch-ubuntu-22.04-clang12
524+
submodules: 'true'
525+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
526+
timeout: 90
527+
script: |
528+
set -eux
529+
530+
# The generic Linux job chooses to use base env, not the one setup by the image
531+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
532+
conda activate "${CONDA_ENV}"
533+
534+
# Build and install Executorch
535+
PYTHON_EXECUTABLE=python \
536+
CMAKE_ARGS="-DEXECUTORCH_BUILD_NXP_NEUTRON=ON" \
537+
.ci/scripts/setup-linux.sh --build-tool "cmake"
538+
539+
# Run pytest
540+
PYTHON_EXECUTABLE=python bash backends/nxp/run_unittests.sh
541+
516542
test-llama-runner-qnn-linux:
517543
name: test-llama-runner-qnn-linux
518544
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

backends/nxp/run_unittests.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Copyright 2025 NXP
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
set -eux
7+
8+
SCRIPT_DIR=$(dirname $(readlink -fm $0))
9+
EXECUTORCH_DIR=$(dirname $(dirname $SCRIPT_DIR))
10+
11+
cd $EXECUTORCH_DIR
12+
13+
# '-c /dev/null' is used to ignore root level pytest.ini.
14+
PYTHONPATH=`cd ..; pwd` pytest -c /dev/null backends/nxp/tests/

0 commit comments

Comments
 (0)