8000 Tools - mkbuildoptglobals refactoring & attempt to fix caching by mcspr · Pull Request #9249 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Tools - mkbuildoptglobals refactoring & attempt to fix caching #9249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
$cache_dir & $root quoting
  • Loading branch information
mcspr committed Jul 1, 2025
commit a91da86a0f9cdc662c98584362f050963375e2fa
2 changes: 1 addition & 1 deletion tests/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ root=$(git rev-parse --show-toplevel)
source "$root/tests/env.sh"

cmd=${0##*/}
usage="
usage=$"
ENVIRONMENT:
ESP8266_ARDUINO_SKETCHES - list of .ino files; defaults to **all available examples**
ESP8266_ARDUINO_BUILDER - arduino or platformio
Expand Down
27 changes: 15 additions & 12 deletions tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ END {
local elf_file=$2

local elf_name
elf_name=$(basename $elf_file)
elf_name=$(basename "$elf_file")
$size --format=sysv "$elf_file" | \
awk -v sketch_name="${elf_name%.*}" "$awk_script" -
}
Expand Down Expand Up @@ -251,8 +251,8 @@ function install_library()
local url=$6

fetch_and_unpack "$archive" "$hash" "$url"
mkdir -p "$lib_path"
rm -rf "$lib_path/$name"
mkdir -p "${lib_path:?}"
rm -rf "${lib_path}/${name:?}"
mv "$extract" "$lib_path/$name"
}

Expand All @@ -264,7 +264,7 @@ function install_libraries()
mkdir -p "$core_path"/tools/dist
pushd "$core_path"/tools/dist

source "$root/tests/dep-libraries.sh"
source "${root:?}"/tests/dep-libraries.sh

popd
}
Expand All @@ -279,14 +279,17 @@ function install_arduino_cli()

echo "Arduino CLI ${ver}"

mkdir -p ${core_path}/dist
pushd ${core_path}/dist
mkdir -p "${core_path}"/dist
pushd "${core_path}"/dist

source "$root/tests/dep-arduino-cli.sh"

mkdir -p $(dirname $path)
cp -v arduino-cli $path
chmod +x $path
local path_dir
path_dir=$(dirname "$path")

mkdir -p "$path_dir"
cp -v arduino-cli "$path"
chmod +x "$path"

popd
}
Expand All @@ -311,7 +314,7 @@ function install_core()
"compiler.c.extra_flags=-Wall -Wextra $debug_flags" \
"compiler.cpp.extra_flags=-Wall -Wextra $debug_flags" \
"recipe.hooks.prebuild.1.pattern=\"{runtime.tools.python3.path}/python3\" -I \"{runtime.tools.makecorever}\" --git-root \"{runtime.platform.path}\" --version \"{version}\" \"{runtime.platform.path}/cores/esp8266/core_version.h\"" \
> ${core_path}/platform.local.txt
> "${core_path}"/platform.local.txt
echo -e "\n----platform.local.txt----"
cat platform.local.txt
echo -e "\n----\n"
Expand Down Expand Up @@ -432,7 +435,7 @@ function install_platformio()

local board=$1

pushd $ESP8266_ARDUINO_BUILD_DIR/tools
pushd "$ESP8266_ARDUINO_BUILD_DIR"/tools
python3 get.py -q
popd

Expand All @@ -446,7 +449,7 @@ function install_platformio()
local toolchain_symlink="toolchain-xtensa @ symlink://${ESP8266_ARDUINO_BUILD_DIR}/tools/xtensa-lx106-elf/"

# pre-generate config; pio-ci with multiple '-O' options replace each other instead of appending to the same named list
cat <<EOF > $cache_dir/platformio.ini
cat <<EOF > "$cache_dir"/platformio.ini
[env:$board]
platform = espressif8266
board = $board
Expand Down
0