From b6b7faee9d677a2198341fda73490460cfe85af3 Mon Sep 17 00:00:00 2001 From: Albert Ho Date: Wed, 17 Apr 2024 17:21:56 -0700 Subject: [PATCH] copy test resources --- .github/workflows/ios-appcenter.yml | 3 +++ .github/workflows/ios-perf.yml | 3 +++ binding/ios/FalconAppTest/.gitignore | 3 +++ .../test_resources/.gitkeep | 0 .../ios/FalconAppTest/copy_test_resources.sh | 20 +++++++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 binding/ios/FalconAppTest/FalconAppTestUITests/test_resources/.gitkeep create mode 100755 binding/ios/FalconAppTest/copy_test_resources.sh diff --git a/.github/workflows/ios-appcenter.yml b/.github/workflows/ios-appcenter.yml index 7c46dea..75b953e 100644 --- a/.github/workflows/ios-appcenter.yml +++ b/.github/workflows/ios-appcenter.yml @@ -45,6 +45,9 @@ jobs: brew update brew install convmv + - name: Copy test_resources + run: ./copy_test_resources.sh + - name: Run Cocoapods run: pod install diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index f95b4e1..ac68f2f 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -52,6 +52,9 @@ jobs: brew update brew install convmv + - name: Copy test_resources + run: ./copy_test_resources.sh + - name: Run Cocoapods run: pod install diff --git a/binding/ios/FalconAppTest/.gitignore b/binding/ios/FalconAppTest/.gitignore index f7f7d3c..56a6a17 100644 --- a/binding/ios/FalconAppTest/.gitignore +++ b/binding/ios/FalconAppTest/.gitignore @@ -18,3 +18,6 @@ build/* xcuserdata Pods ddp + +FalconAppTestUITests/test_resources/* +!FalconAppTestUITests/test_resources/.gitkeep diff --git a/binding/ios/FalconAppTest/FalconAppTestUITests/test_resources/.gitkeep b/binding/ios/FalconAppTest/FalconAppTestUITests/test_resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/binding/ios/FalconAppTest/copy_test_resources.sh b/binding/ios/FalconAppTest/copy_test_resources.sh new file mode 100755 index 0000000..7e921ef --- /dev/null +++ b/binding/ios/FalconAppTest/copy_test_resources.sh @@ -0,0 +1,20 @@ +LIB_DIR="../../../lib" +RESOURCE_DIR="../../../resources" +ASSETS_DIR="./FalconAppTestUITests/test_resources" + +echo "Creating test resources asset directory" +mkdir -p ${ASSETS_DIR} + +echo "Copying test audio samples..." +mkdir -p ${ASSETS_DIR}/audio_samples +cp ${RESOURCE_DIR}/audio_samples/*.wav ${ASSETS_DIR}/audio_samples + +echo "Copying test model files..." +mkdir -p ${ASSETS_DIR}/model_files +cp ${LIB_DIR}/common/*.pv ${ASSETS_DIR}/model_files + +echo "Copying test data file..." +cp ${RESOURCE_DIR}/.test/test_data.json ${ASSETS_DIR} + +echo "Fixing filename encodings for Appcenter compatibility" +convmv --notest -f utf8 -t utf8 --nfd -r ${ASSETS_DIR}