optimize hardware list for test (#1151)

Signed-off-by: chensuyue <suyue.chen@intel.com>
This commit is contained in:
chen, suyue
2024-11-15 22:46:02 +08:00
committed by GitHub
parent e66d7fe381
commit 3b1a9fe9e1
3 changed files with 9 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ on:
test_mode:
required: false
type: string
default: 'docker_compose'
default: 'compose'
outputs:
run_matrix:
description: "The matrix string"

View File

@@ -18,7 +18,7 @@ jobs:
job1:
uses: ./.github/workflows/_get-test-matrix.yml
with:
test_mode: "docker_image_build/build.yaml"
test_mode: "docker_image_build"
image-build:
needs: job1

View File

@@ -16,8 +16,13 @@ for example in ${examples}; do
if [[ ! $(find . -type f | grep ${test_mode}) ]]; then continue; fi
cd tests
ls -l
hardware_list=$(find . -type f -name "test_compose*_on_*.sh" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
echo "Test supported hardware list = ${hardware_list}"
if [[ "$test_mode" == "docker_image_build" ]]; then
find_name="test_manifest_on_*.sh"
else
find_name="test_${test_mode}*_on_*.sh"
fi
hardware_list=$(find . -type f -name "${find_name}" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
echo -e "Test supported hardware list: \n${hardware_list}"
run_hardware=""
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | cut -d'/' -f2 | grep -E '*.py|Dockerfile*|ui|docker_image_build' ) ]]; then