Skip to content

Commit 31890cb

Browse files
Arm backend: Fix output_folder not created issue in scripts (#9269)
In files build_executorch_runner.sh and examples/arm/run.sh, realpath command is called on output_folder before checking whether the directory already exists. This will trigger the error like "realpath: ${output_folder}: No such file or directory." Fix it by moving mkdir forward. Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
1 parent 622b79e commit 31890cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backends/arm/scripts/build_executorch_runner.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ source ${setup_path_script}
7878
pte_file=$(realpath ${pte_file})
7979
ethosu_tools_dir=$(realpath ${ethosu_tools_dir})
8080
ethos_u_root_dir="$ethosu_tools_dir/ethos-u"
81+
mkdir -p "${ethos_u_root_dir}"
8182
ethosu_tools_dir=$(realpath ${ethos_u_root_dir})
8283

8384
et_build_dir=${et_build_root}/cmake-out
@@ -106,6 +107,7 @@ then
106107
fi
107108
fi
108109

110+
mkdir -p "${output_folder}"
109111
output_folder=$(realpath ${output_folder})
110112

111113
if [[ ${target} == *"ethos-u55"* ]]; then
@@ -128,7 +130,6 @@ if [ "$build_with_etdump" = true ] ; then
128130
fi
129131

130132
echo "Building with BundleIO/etdump/extra flags: ${build_bundleio_flags} ${build_with_etdump_flags} ${extra_build_flags}"
131-
mkdir -p "${output_folder}"
132133

133134
cmake \
134135
-DCMAKE_BUILD_TYPE=${build_type} \

examples/arm/run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,10 @@ for i in "${!test_model[@]}"; do
194194
output_folder=${et_build_root}/${model_short_name}
195195
fi
196196

197+
mkdir -p ${output_folder}
197198
output_folder=$(realpath ${output_folder})
198199
pte_file="${output_folder}/${model_filename}"
199200

200-
mkdir -p ${output_folder}
201-
202201
# Remove old pte files
203202
rm -f "${output_folder}/${model_filename}"
204203

0 commit comments

Comments
 (0)