Skip to content

Commit ca545a2

Browse files
Try and keep build.options.json
1 parent 23085a3 commit ca545a2

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/common.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,19 @@ function build_sketches()
5858
# the git version header is rewritten after each compile, so the
5959
# builder sees it is new and says "rebuild the whole thing!"
6060

61-
if [ -e $cache_dir/core/*.a ]; then touch -t 203712310000 $cache_dir/core/*.a; fi
61+
if [ -e $cache_dir/core/*.a ]; then
62+
head -8 $build_dir/build.options.json > $build_dir/../build.options.json
63+
echo ' "sketchLocation" : "'$sketch'",' >> $build_dir/../build.options.json
64+
tail -2 $build_dir/build.options.json >> $build_dir/../build.options.json
65+
fi
66+
67+
rm -rf $build_dir/sketch
68+
69+
if [ -e $cache_dir/core/*.a ]; then
70+
mv $build_dir/../build.options.json $build_dir/build.options.json
71+
touch -t 203712310000 $cache_dir/core/*.a
72+
fi
6273

63-
rm -rf $build_dir/*
6474
local sketchdir=$(dirname $sketch)
6575
local sketchdirname=$(basename $sketchdir)
6676
local sketchname=$(basename $sketch)

tools/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
5757
cmd += 'dbg={debug_port},lvl={debug_level}'.format(**vars(args))
5858
cmd += ' '
5959
cmd += '-ide-version=10607 '
60+
cmd += '-debug-level=10 '
6061
cmd += '-warnings={warnings} '.format(**vars(args))
6162
if args.verbose:
6263
cmd += '-verbose '

0 commit comments

Comments
 (0)