Skip to content

Commit 16b4d60

Browse files
committed
fuzz/generate-files: support jujutsu
Generally we try not to add special-case logic for weird tools, but this is a a really simple change and I think that jujutsu is going to become pretty popular among rust-bitcoin developers. This is some repeated code which looks like it should be factored out into a utility function, but we can't really do that because we need to figure out the workspace root before we can even locate utility functions.
1 parent e000146 commit 16b4d60

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

fuzz/cycle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md
77

88
set -e
9-
REPO_DIR=$(git rev-parse --show-toplevel)
9+
REPO_DIR=$(git rev-parse --show-toplevel || jj workspace root)
1010
# can't find the file because of the ENV var
1111
# shellcheck source=/dev/null
1212
source "$REPO_DIR/fuzz/fuzz-util.sh"

fuzz/fuzz-util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
REPO_DIR=$(git rev-parse --show-toplevel)
3+
REPO_DIR=$(git rev-parse --show-toplevel || jj workspace root)
44

55
# Sort order is effected by locale. See `man sort`.
66
# > Set LC_ALL=C to get the traditional sort order that uses native byte values.

fuzz/fuzz.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
REPO_DIR=$(git rev-parse --show-toplevel)
4+
REPO_DIR=$(git rev-parse --show-toplevel || jj workspace show)
55

66
# can't find the file because of the ENV var
77
# shellcheck source=/dev/null

fuzz/generate-files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
REPO_DIR=$(git rev-parse --show-toplevel)
5+
REPO_DIR=$(git rev-parse --show-toplevel || jj workspace root)
66

77
# can't find the file because of the ENV var
88
# shellcheck source=/dev/null

0 commit comments

Comments
 (0)