All of lore.kernel.org
 help / color / mirror / Atom feed
From: Toon Claes <toon@iotcl.com>
To: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Subject: Re: [PATCH 3/5] t/perf: fix benchmarks with out-of-tree builds
Date: Thu, 10 Apr 2025 13:34:35 +0200	[thread overview]
Message-ID: <87v7rcdzck.fsf@iotcl.com> (raw)
In-Reply-To: <20250331-pks-meson-benchmarks-v1-3-b2ace85616a3@pks.im>

Patrick Steinhardt <ps@pks.im> writes:

> The "perf-lib.sh" script is sourced by all of our benchmarking suites to
> make available common infrastructure. The script assumes that build and
> source directory are the same, which works for our Makefile. But the
> assumption breaks with both CMake and Meson, where the build directory
> can be located in an arbitrary place.
>
> Adapt the script so that it works with out-of-tree builds. This prepares
> us for wiring up benchmarks in Meson.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  t/perf/perf-lib.sh | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
> index 4173eee4def..5406557b7ca 100644
> --- a/t/perf/perf-lib.sh
> +++ b/t/perf/perf-lib.sh
> @@ -25,7 +25,29 @@ TEST_OUTPUT_DIRECTORY=$(pwd)
>  TEST_NO_CREATE_REPO=t
>  TEST_NO_MALLOC_CHECK=t
>  
> -. ../test-lib.sh
> +# While test-lib.sh computes the build directory for us, we also have to do the
> +# same thing in order to locate the script via GIT-BUILD-OPTIONS in the first
> +# place.
> +GIT_BUILD_DIR="${GIT_BUILD_DIR:-$TEST_DIRECTORY/..}"
> +if test -f "$GIT_BUILD_DIR/GIT-BUILD-DIR"
> +then
> +	GIT_BUILD_DIR="$(cat "$GIT_BUILD_DIR/GIT-BUILD-DIR")" || exit 1
> +	# On Windows, we must convert Windows paths lest they contain a colon
> +	case "$(uname -s)" in
> +	*MINGW*)
> +		GIT_BUILD_DIR="$(cygpath -au "$GIT_BUILD_DIR")"
> +		;;
> +	esac
> +fi
> +
> +if test ! -f "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
> +then
> +	echo >&2 'error: GIT-BUILD-OPTIONS missing (has Git been built?).'
> +	exit 1
> +fi
> +
> +. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
> +. "$GIT_SOURCE_DIR"/t/test-lib.sh
>  
>  unset GIT_CONFIG_NOSYSTEM
>  GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
> @@ -324,7 +346,7 @@ test_at_end_hook_ () {
>  	if test -z "$GIT_PERF_AGGREGATING_LATER"; then
>  		(
>  			cd "$TEST_DIRECTORY"/perf &&
> -			"$PERL_PATH" ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0")
> +			"$PERL_PATH" "$GIT_SOURCE_DIR"/t/perf/aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0")
>  		)
>  	fi
>  }
>
> -- 
> 2.49.0.604.gff1f9ca942.dirty

I'm not sure if it's related to this commit, but this patch series has
broken something:

    $ make && cd t/perf && ./run . master p0005-status.sh

    === Running 1 tests in this tree ===
    ok 1 - setup repo
    perf 2 - read-tree status br_ballast (4629): 1 ok
    # passed all 2 test(s)
    1..2
    === Unpacking 485f5f863615e670fd97ae40af744e14072cfe18 in build/485f5f863615e670fd97ae40af744e14072cfe18 ===
    === Building 485f5f863615e670fd97ae40af744e14072cfe18 (master) ===
    GIT_VERSION=2.49.GIT
        * new build flags
        CC daemon.o
        * new link flags
        CC common-main.o
        CC abspath.o
        CC add-interactive.o
        CC add-patch.o
        [snip]
        CC t/unit-tests/unit-test.o
        CC t/unit-tests/lib-oid.o
        LINK t/unit-tests/bin/unit-tests
        GEN gitweb/gitweb.cgi
        GEN gitweb/static/gitweb.js
    === Running 1 tests in /home/toon/devel/git/t/perf/build/485f5f863615e670fd97ae40af744e14072cfe18/bin-wrappers ===
    ok 1 - setup repo
    perf 2 - read-tree status br_ballast (4629): 1 ok
    # passed all 2 test(s)
    1..2
    cannot open test-results/p0005-status.subtests: No such file or directory at ./aggregate.perl line 159.

--
Toon

  reply	other threads:[~2025-04-10 11:34 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  6:16 [PATCH 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-03-31  6:16 ` [PATCH 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-03-31  6:16 ` [PATCH 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-10 11:43   ` Toon Claes
2025-04-14  6:50     ` Patrick Steinhardt
2025-04-14 19:20       ` Junio C Hamano
2025-04-15 10:01         ` Patrick Steinhardt
2025-03-31  6:16 ` [PATCH 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-10 11:34   ` Toon Claes [this message]
2025-04-14  6:28     ` Toon Claes
2025-04-14  6:50       ` Patrick Steinhardt
2025-03-31  6:16 ` [PATCH 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-10 11:44   ` Toon Claes
2025-04-14  6:50     ` Patrick Steinhardt
2025-04-14  9:07       ` Toon Claes
2025-03-31  6:16 ` [PATCH 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-14  6:51 ` [PATCH v2 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-04-14  6:51   ` [PATCH v2 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-14  6:51   ` [PATCH v2 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-14  6:51   ` [PATCH v2 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-20 10:00     ` Christian Couder
2025-04-22  6:51       ` Patrick Steinhardt
2025-04-14  6:51   ` [PATCH v2 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-20 10:00     ` Christian Couder
2025-04-14  6:51   ` [PATCH v2 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-15 14:36   ` [PATCH v2 0/5] meson: wire up support for benchmarks Junio C Hamano
2025-04-15 18:18     ` Junio C Hamano
2025-04-16 11:00       ` Patrick Steinhardt
2025-04-18 23:02         ` Junio C Hamano
2025-04-22  6:50 ` [PATCH v3 " Patrick Steinhardt
2025-04-22  6:50   ` [PATCH v3 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-22  6:50   ` [PATCH v3 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-22  6:50   ` [PATCH v3 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-22  6:50   ` [PATCH v3 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-22  6:50   ` [PATCH v3 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-22  7:27   ` [PATCH v3 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-22  7:53     ` Patrick Steinhardt
2025-04-23 14:44       ` Christian Couder
2025-04-24  4:31         ` Patrick Steinhardt
2025-04-24  6:28           ` Christian Couder
2025-04-24 11:13           ` Junio C Hamano
2025-04-24 13:49             ` Patrick Steinhardt
2025-04-23 14:12   ` Toon Claes
2025-04-25  7:28 ` [PATCH v4 " Patrick Steinhardt
2025-04-25  7:28   ` [PATCH v4 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-25  7:28   ` [PATCH v4 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-25  7:28   ` [PATCH v4 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-25  7:28   ` [PATCH v4 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-25  7:57     ` Christian Couder
2025-04-25  8:01       ` Patrick Steinhardt
2025-04-25  8:09         ` Christian Couder
2025-04-25  8:27           ` Patrick Steinhardt
2025-04-25  7:28   ` [PATCH v4 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-25  8:06   ` [PATCH v4 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-25  8:26     ` Patrick Steinhardt
2025-04-25  8:33       ` Christian Couder
2025-04-28  7:30 ` [PATCH v5 " Patrick Steinhardt
2025-04-28  7:30   ` [PATCH v5 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-28  7:30   ` [PATCH v5 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-28  7:30   ` [PATCH v5 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-28  7:30   ` [PATCH v5 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-28  7:30   ` [PATCH v5 5/5] meson: wire up benchmarking options Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v7rcdzck.fsf@iotcl.com \
    --to=toon@iotcl.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.