mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 21:08:10 +02:00
cairo-perf-diff: rsync only git-managed files from boilerplate/perf
Previously, we were using rsync to recursively copy all files from boilerplate and perf when doing the performance tests. This had the fatal flaw that pre-built binaries would be hard coded to link against the cairo library from $CAIRO_DIR with an absolute path, (due to libtool rpath stuff). By only copying git-managed files, we only get source and the compiled binaries (or libtool wrappers) will now be hard-coded to link against the library under test.
This commit is contained in:
parent
26b74049e7
commit
74f5fe241e
1 changed files with 13 additions and 3 deletions
|
|
@ -116,20 +116,30 @@ run_cairo_perf_if_not_cached() {
|
|||
echo "Creating new perf cache in $CAIRO_PERF_DIR"
|
||||
mkdir $CAIRO_PERF_DIR
|
||||
fi
|
||||
|
||||
boilerplate_files=$(git ls-tree --name-only HEAD boilerplate/*)
|
||||
perf_files=$(git ls-tree --name-only HEAD perf/*)
|
||||
cd $CAIRO_PERF_DIR
|
||||
|
||||
if [ ! -d $build_dir ]; then
|
||||
git clone -s $CAIRO_DIR $build_dir
|
||||
(cd $build_dir; git checkout -b tmp-cairo-perf-diff $sha; CFLAGS="-O2" ./autogen.sh)
|
||||
(cd $build_dir; git checkout -b tmp-cairo-perf-diff $sha)
|
||||
fi
|
||||
cd $build_dir
|
||||
|
||||
git checkout tmp-cairo-perf-diff
|
||||
git reset --hard $sha
|
||||
if [ ! -e Makefile ]; then
|
||||
CFLAGS="-O2" ./autogen.sh
|
||||
fi
|
||||
make CFLAGS="-O2" || (rm config.cache && make CFLAGS="-O2")
|
||||
rsync -rl $CAIRO_DIR/boilerplate .
|
||||
for file in $boilerplate_files; do
|
||||
rsync $CAIRO_DIR/$file boilerplate
|
||||
done
|
||||
(cd boilerplate; make)
|
||||
rsync -rl $CAIRO_DIR/perf .
|
||||
for file in $perf_files; do
|
||||
rsync $CAIRO_DIR/$file perf
|
||||
done
|
||||
cd perf;
|
||||
make || exit 1
|
||||
echo "Running \"cairo-perf $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue