This patch needs a detailed commit message, since it's not obvious why
these changes are made at all. It'd also be helpful for reviewing.
General style comment for shell scripts: Always put curly braces around
variables even if they are unnecessary. a $source_path could become
$source_pathPREFIX in the future and instead of ${source_path} it would
expand to ${source_pathPREFIX}.
On Tue, 08 Aug 2023 16:17, Yeqi Fu <fufuyqqq...@gmail.com> wrote:
+tcg_tests_targets=
+for target in $target_list; do
+ case $target in
+ *-softmmu)
+ test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" ||
continue
+ ;;
+ esac
+ if test -f cross-build/$target/config-target.mak; then
targets will never have spaces but I'd still double quote ${target} for
consistency and style
+ mkdir -p "tests/tcg/$target"
+ ln -srf cross-build/$target/config-target.mak
tests/tcg/$target/config-target.mak
+ ln -sf $source_path/tests/tcg/Makefile.target tests/tcg/$target/Makefile
This ln definitely needs double quoting.
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
tcg_tests_targets="$tcg_tests_targets $target"
fi
--
2.34.1