Skip to content

Commit 2928c1b

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

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tests/common.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,23 @@ 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+
echo "orig:"; cat $build_dir/build.options.json
63+
head -8 $build_dir/build.options.json > $build_dir/../build.options.json
64+
echo ' "sketchLocation" : "'$sketch'",' >> $build_dir/../build.options.json
65+
tail -2 $build_dir/build.options.json >> $build_dir/../build.options.json
66+
echo "patched:"; cat $build_dir/../build.options.json
67+
mv $build_dir/core $build_dir/../savecore
68+
touch -t 203712310000 $cache_dir/core/*.a
69+
fi
70+
71+
rm -rf $build_dir/sketch
72+
73+
if [ -e $cache_dir/core/*.a ]; then
74+
mv $build_dir/../build.options.json $build_dir/build.options.json
75+
mv $build_dir/../savecore $build_dir/core
76+
fi
6277

63-
rm -rf $build_dir/*
6478
local sketchdir=$(dirname $sketch)
6579
local sketchdirname=$(basename $sketchdir)
6680
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)