diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-02-21 10:02:21 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2024-02-21 11:16:56 -0500 |
commit | 84388c942cb035fed546eda360ae6b40c6cfac09 (patch) | |
tree | a47151c919e6af4c274c2eee5be153e424e9b5b9 /ci | |
parent | 46d261631ddfb11c89aca603819e27a99d9ee0e2 (diff) | |
download | bitcoin-84388c942cb035fed546eda360ae6b40c6cfac09.tar.xz |
ci: avoid running git diff after patching
Drop `git diff` command so it is easier to run CI locally if git checkout is a
worktree. Currently it fails because the directory is not recognized as a git
repository.
The `git diff` command was added recently in #28359 commit
fa07ac48d804beac38a98d23be2167f78cadefae and can be avoided just by teeing the
patch to stdout
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/test/03_test_script.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index cdcd731528..786cb08bf6 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -36,8 +36,8 @@ export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} # CI, so as a temporary minimal fix to work around UB and CI failures, leave # bytes_written unmodified. # See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748 - echo 'diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc -index 65e31724bc..f61b471953 100644 + # Tee patch to stdout to make it clear CI is testing modified code. + tee >(patch -p1) <<'EOF' --- a/src/leveldb/db/db_impl.cc +++ b/src/leveldb/db/db_impl.cc @@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) { @@ -49,8 +49,8 @@ index 65e31724bc..f61b471953 100644 - } mutex_.Lock(); - stats_[compact->compaction->level() + 1].Add(stats);' | patch -p1 - git diff + stats_[compact->compaction->level() + 1].Add(stats); +EOF ) if [ "$RUN_FUZZ_TESTS" = "true" ]; then |