8000 Check newlib-xtensa#24 by mcspr · Pull Request #9259 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Check newlib-xtensa#24 #9259

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

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8253d94
Tools - mkbuildoptglobals refactoring & attempt to fix caching
mcspr May 27, 2025
8cdc906
compile args typo
mcspr May 27, 2025
eac15af
build_out & no explicit clean
mcspr May 27, 2025
60689bc
drop partial data, handle missing closing comment
mcspr May 27, 2025
9be7e67
check cache state dir state in ci
mcspr May 27, 2025
c3b64a2
missing file
mcspr May 27, 2025
a527244
typo, fix err trap for "test ...something..."
mcspr May 27, 2025
fe3102f
mention indirect and direct dependency on globals .h contents
mcspr May 28, 2025
d72ca55
update doc
mcspr May 28, 2025
35c6221
update docs
mcspr May 28, 2025
d1c9c7b
restore command-line opts info, newlined debugging
mcspr May 28, 2025
a3f9218
mkdir parent when writing
mcspr May 28, 2025
56bac44
useless from None
mcspr May 28, 2025
eb1a542
multiple quoting fixes from sc & naming
mcspr May 28, 2025
a9afc33
spacing
mcspr May 29, 2025
a91da86
$cache_dir & $root quoting
mcspr May 29, 2025
7f06e65
debug flag passed as fqbn
mcspr Jul 1, 2025
664e9d8
direct types
mcspr Jul 1, 2025
78380e8
warnings fix v2, propogate errors instead
mcspr Jul 1, 2025
2e63e3e
debugging in ci tool checks
mcspr Jul 1, 2025
e023926
invalid debug lvl=
mcspr Jul 1, 2025
0c67f33
rebase unused var
mcspr Jul 1, 2025
2039398
nested comment block as error
mcspr Jul 2, 2025
a364e2d
check newlib-4.0.0 rebuild
mcspr Jul 2, 2025
38d4d38
missing lib_a- prefix for some symbols
mcspr Jul 2, 2025
48f9336
invalid header-only include of stdarg.h w/ implicitly requested va_..…
mcspr Jul 2, 2025
ba927bc
check newlib4.5.99 preview
mcspr Jul 2, 2025
0e6158a
synced machine files
mcspr Jul 2, 2025
7235791
sanity check linkage
mcspr Jul 3, 2025
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
multiple quoting fixes from sc & naming
  • Loading branch information
mcspr committed Jul 1, 2025
commit eb1a54214d52270251bff5d9e022af9b51ea8a0c
33 changes: 17 additions & 16 deletions tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function step_summary()
# ref. https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary
if [ -n "${GITHUB_STEP_SUMMARY-}" ]; then
{ echo "# $header"; echo '```console'; cat "$contents"; echo '```'; } \
>> $GITHUB_STEP_SUMMARY
>> "$GITHUB_STEP_SUMMARY"
else
echo "# $header"
cat "$contents"
Expand All @@ -55,7 +55,7 @@ function print_size_info_header()

function print_size_info()
{
local awk_script='
local awk_script=$'
/^\.data/ || /^\.rodata/ || /^\.bss/ || /^\.text/ || /^\.irom0\.text/{
size[$1] = $2
}
Expand All @@ -64,7 +64,7 @@ END {
total_ram = size[".data"] + size[".rodata"] + size[".bss"]
total_flash = size[".data"] + size[".rodata"] + size[".text"] + size[".irom0.text"]

printf "%-28s %-8d %-8d %-8d %-8d %-10d %-8d %-8d\n",
printf "%-28s %-8d %-8d %-8d %-8d %-10d %-8d %-8d\\n",
sketch_name,
size[".data"], size[".rodata"], size[".bss"], size[".text"], size[".irom0.text"],
total_ram, total_flash
Expand Down Expand Up @@ -110,9 +110,9 @@ function format_fqbn()
local flash_size=$2
local lwip=$3

echo "esp8266com:esp8266:${board_name}:"\
"eesz=${flash_size},"\
"ip=${lwip}"
echo $"esp8266com:esp8266:${board_name}:
eesz=${flash_size},
ip=${lwip}"
}

function build_sketches()
Expand All @@ -131,16 +131,17 @@ function build_sketches()
local build_out="$cache_dir"/out
mkdir -p "$build_out"

local fqbn=$(format_fqbn "generic" "4M1M" "$lwip")
local fqbn
fqbn=$(format_fqbn "generic" "4M1M" "$lwip")
echo "FQBN: $fqbn"

local build_cmd
build_cmd+=${cli_path}
build_cmd+=" compile"\
" --warnings=all"\
" --fqbn $fqbn"\
" --libraries $library_path"\
" --output-dir $build_out"
build_cmd=$''"${cli_path}"'
compile
--warnings=all
--fqbn '"$fqbn"'
--libraries '"$library_path"'
--output-dir '"$build_out"''

print_size_info_header >"$cache_dir"/size.log

Expand Down Expand Up @@ -300,9 +301,9 @@ function install_core()

local debug_flags=""
if [ "$debug" = "debug" ]; then
debug_flags="-DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM"\
" -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI"\
" -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM"
debug_flags=$'-DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM
-DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI
-DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM'
fi

# Set our custom warnings for all builds
Expand Down
37 changes: 25 additions & 12 deletions tests/test_mkbuildoptglobals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ function step_summary()

export ARDUINO_BUILD_CACHE_PATH="$cache_dir"

sketches="${cache_dir}/sketches/"
cores="${cache_dir}/cores/"

esp8266_dir="${ESP8266_ARDUINO_BUILD_DIR}"
commonfileh="${esp8266_dir}/cores/esp8266/CommonHFile.h"

tests_dir="$root/tests/test_mkbuildoptglobals"
tests=$(ls -1 "$tests_dir" | sed 's/.sh$//g')

cores_dir="${cache_dir}/cores/"
sketches_dir="${cache_dir}/sketches/"

function name_size_mtime()
{
stat --printf '%n:%s:%Y' "$1"
Expand All @@ -31,13 +31,21 @@ function most_recent_file()
{
local name="$1"
local location="$2"
echo $(readlink -f "${location}/"$(ls -t1 "${location}" | grep "$name" | head -1))

local file
file=$(ls -t1 "${location}" | grep "$name" | head -1)

readlink -f "${location}/${file}"
}

function most_recent_dir()
{
local location="$1"
echo $(readlink -f "${location}/"$(ls -t1 "$location" | head -1))

local file
file=$(ls -t1 "$location" | head -1)

readlink -f "${location}/${file}"
}

function assert_build()
Expand Down Expand Up @@ -80,20 +88,25 @@ function build_esp8266_example()

function make_commonh_stat()
{
local stat=$(name_size_mtime "$commonfileh")
test -n "$stat"
local stat
stat=$(name_size_mtime "$commonfileh")

test -n "$stat"
echo "$stat"
}

function make_core_stat()
{
local recent_core=$(most_recent_dir "$cores")
local recent_file=$(most_recent_file "core.a" "$recent_core")
local recent_core
recent_core=$(most_recent_dir "$cores_dir")

local stat=$(name_size_mtime "$recent_file")
test -n "$stat"
local recent_file
recent_file=$(most_recent_file "core.a" "$recent_core")

local stat
stat=$(name_size_mtime "$recent_file")

test -n "$stat"
echo "$stat"
}

Expand All @@ -105,7 +118,7 @@ case "${1:-}" in
"run")
for test in $tests ; do
printf "Checking \"%s\"\n" "$test"
/usr/bin/env bash $root/tests/test_mkbuildoptglobals.sh $test
/usr/bin/env bash "$root"/tests/test_mkbuildoptglobals.sh "$test"
done
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mkbuildoptglobals/buildopt_then_buildopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function buildopt_then_buildopt()
{
build_esp8266_example "GlobalBuildOptions"

local last_sketch=$(most_recent_dir "$sketches")
local last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "GlobalBuildOptions" "$last_sketch" 1
assert_core 1

Expand All @@ -11,7 +11,7 @@ function buildopt_then_buildopt()

build_esp8266_example "HwdtStackDump"

last_sketch=$(most_recent_dir "$sketches")
last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "HwdtStackDump" "$last_sketch" 1
assert_core 1

Expand Down
4 changes: 2 additions & 2 deletions tests/test_mkbuildoptglobals/buildopt_then_nobuildopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function buildopt_then_nobuildopt()
{
build_esp8266_example "GlobalBuildOptions"

local last_sketch=$(most_recent_dir "$sketches")
local last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "GlobalBuildOptions" "$last_sketch" 1
assert_core 1

Expand All @@ -11,7 +11,7 @@ function buildopt_then_nobuildopt()

build_esp8266_example "Blink"

last_sketch=$(most_recent_dir "$sketches")
last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "Blink" "$last_sketch" 0
assert_core 0

Expand Down
4 changes: 2 additions & 2 deletions tests/test_mkbuildoptglobals/nobuildopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function nobuildopt()
{
build_esp8266_example "Blink"

local last_sketch=$(most_recent_dir "$sketches")
local last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "Blink" "$last_sketch" 0
assert_core 0

Expand All @@ -11,7 +11,7 @@ function nobuildopt()

build_esp8266_example "TestEspApi"

last_sketch=$(most_recent_dir "$sketches")
last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "TestEspApi" "$last_sketch" 0
assert_core 0

Expand Down
4 changes: 2 additions & 2 deletions tests/test_mkbuildoptglobals/nobuildopt_then_buildopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function nobuildopt_then_buildopt()
{
build_esp8266_example "Blink"

local last_sketch=$(most_recent_dir "$sketches")
local last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "Blink" "$last_sketch" 0
assert_core 0

Expand All @@ -11,7 +11,7 @@ function nobuildopt_then_buildopt()

build_esp8266_example "HwdtStackDump"

last_sketch=$(most_recent_dir "$sketches")
last_sketch=$(most_recent_dir "$sketches_dir")
assert_build "HwdtStackDump" "$last_sketch" 1
assert_core 1

Expand Down
0