@@ -9,10 +9,16 @@ BITCOIN_UPSTREAM="${BITCOIN_UPSTREAM_REMOTE}/master"
9
9
ELEMENTS_UPSTREAM_REMOTE=upstream
10
10
ELEMENTS_UPSTREAM=" ${ELEMENTS_UPSTREAM_REMOTE} /master"
11
11
12
+ # Replace this with the location where we should put the fuzz test corpus
13
+ BITCOIN_QA_ASSETS=" ${HOME} /.tmp/bitcoin/qa-assets"
14
+ FUZZ_CORPUS=" ${BITCOIN_QA_ASSETS} /fuzz_seed_corpus/"
15
+ mkdir -p " $( dirname ${BITCOIN_QA_ASSETS} ) "
16
+
12
17
# BEWARE: On some systems /tmp/ gets periodically cleaned, which may cause
13
18
# random files from this directory to disappear based on timestamp, and
14
19
# make git very confused
15
- WORKTREE=" /tmp/elements-merge-worktree"
20
+ WORKTREE=" ${HOME} /.tmp/elements-merge-worktree"
21
+ mkdir -p " ${HOME} /.tmp"
16
22
17
23
# These should be tuned to your machine; below values are for an 8-core
18
24
# 16-thread macbook pro
@@ -29,13 +35,23 @@ if [[ "$1" == "setup" ]]; then
29
35
echo
30
36
git config remote.upstream.url > /dev/null || remote add upstream " https://github.com/ElementsProject/elements.git"
31
37
git config remote.bitcoin.url > /dev/null || git remote add bitcoin " https://github.com/bitcoin/bitcoin.git"
38
+ if git worktree list --porcelain | grep --silent prunable; then
39
+ echo " You have stale git worktrees, please either fix them or run 'git worktree prune'."
40
+ exit 1
41
+ fi
32
42
git worktree list --porcelain | grep --silent " ${WORKTREE} " || git worktree add " ${WORKTREE} " --force --no-checkout --detach
33
43
echo
34
44
echo " Fetching all remotes..."
35
45
echo
36
46
git fetch --all
37
47
echo
38
- echo " Done!"
48
+ # echo "Cloning fuzz test corpus..."
49
+ # echo
50
+ # if [[ ! -d "${BITCOIN_QA_ASSETS}" ]]; then
51
+ # cd "$(dirname ${BITCOIN_QA_ASSETS})" && git clone https://github.com/bitcoin-core/qa-assets.git
52
+ # fi
53
+ # echo
54
+ echo " Done! Remember to also check out merged-master, and push it back up when finished."
39
55
exit 0
40
56
elif [[ " $1 " == " continue" ]]; then
41
57
SKIP_MERGE=1
171
187
quietly ./configure --with-incompatible-bdb --enable-fuzz --with-sanitizers=address,fuzzer,undefined CC=clang CXX=clang++
172
188
quietly make -j" $PARALLEL_BUILD " -k
173
189
echo " Fuzzing"
174
- quietly ./test/fuzz/test_runner.py -j" $PARALLEL_FUZZ " ~ /code/bitcoin/qa-assets/fuzz_seed_corpus/
190
+ quietly ./test/fuzz/test_runner.py -j" $PARALLEL_FUZZ " " ${FUZZ_CORPUS} "
175
191
fi
176
192
177
193
if [[ " $KEEP_GOING " == " 0" ]]; then
0 commit comments