Skip to content

Commit

Permalink
Update scripts build_coverage.sh for Ubuntu 22.04 LTS/macOS 10.15 and…
Browse files Browse the repository at this point in the history
… later versions (#22569)
  • Loading branch information
yufengwangca authored and pull[bot] committed Jun 26, 2023
1 parent 638ee88 commit 3744458
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion scripts/build_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,28 @@

set -e

_install_lcov() {
if ! lcov --version >/dev/null 2>&1; then
echo "lcov not installed. Installing..."
case "$(uname)" in
"Darwin")
brew install lcov
;;
"Linux")
sudo apt-get update
sudo apt-get install -y lcov
;;
*)
die
;;
esac
fi
}

_install_lcov

_normpath() {
python -c "import os.path; print(os.path.normpath('$@'))"
python3 -c "import os.path; print(os.path.normpath('$@'))"
}

CHIP_ROOT=$(_normpath "$(dirname "$0")/..")
Expand Down

0 comments on commit 3744458

Please sign in to comment.