mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 15:47:46 +00:00
[test] fix script/test on macOS (#4916)
This commit is contained in:
+9
-8
@@ -95,7 +95,7 @@ build_simulation()
|
||||
local builddir="${OT_BUILDDIR}/cmake/openthread-simulation-${version}"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja)
|
||||
|
||||
if [[ "${version}" == "1.2" ]]; then
|
||||
@@ -109,7 +109,7 @@ build_simulation()
|
||||
local builddir="${OT_BUILDDIR}/cmake/openthread-simulation-${version}-bbr"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja)
|
||||
|
||||
fi
|
||||
@@ -139,7 +139,7 @@ build_posix()
|
||||
local builddir="${OT_BUILDDIR}/cmake/openthread-posix-${version}"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja)
|
||||
|
||||
if [[ "${version}" == "1.2" ]]; then
|
||||
@@ -153,7 +153,7 @@ build_posix()
|
||||
local builddir="${OT_BUILDDIR}/cmake/openthread-posix-${version}-bbr"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja)
|
||||
fi
|
||||
}
|
||||
@@ -344,22 +344,22 @@ do_package() {
|
||||
)
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" -DOT_PLATFORM="simulation" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja -DOT_PLATFORM="simulation" "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja package \
|
||||
&& ls "${builddir}"/openthread-simulation-*.deb)
|
||||
|
||||
builddir="${OT_BUILDDIR}/cmake/openthread-host"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" -DOT_PLATFORM="posix" "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja -DOT_PLATFORM="posix" "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja package \
|
||||
&& ls "${builddir}"/openthread-standalone-*.deb)
|
||||
|
||||
builddir="${OT_BUILDDIR}/cmake/openthread-daemon"
|
||||
(mkdir -p "${builddir}" \
|
||||
&& cd "${builddir}" \
|
||||
&& cmake -GNinja "${OT_SRCDIR}" -DOT_PLATFORM="posix" \
|
||||
-DOT_DAEMON=1 -DOT_PLATFORM_NETIF=1 -DOT_PLATFORM_UDP=1 "${options[@]}" "${ot_extra_options[@]}" \
|
||||
&& cmake -GNinja -DOT_PLATFORM="posix" \
|
||||
-DOT_DAEMON=1 -DOT_PLATFORM_NETIF=1 -DOT_PLATFORM_UDP=1 "${options[@]}" "${ot_extra_options[@]}" "${OT_SRCDIR}" \
|
||||
&& ninja package \
|
||||
&& ls "${builddir}"/openthread-daemon-*.deb)
|
||||
}
|
||||
@@ -390,6 +390,7 @@ envsetup()
|
||||
fi
|
||||
|
||||
read -r -a ot_extra_options <<< "${OT_OPTIONS-}"
|
||||
ot_extra_options=${ot_extra_options:-()}
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user