Skip to content
Snippets Groups Projects
Commit 672dbf558455 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

test: make the smoke-test uses "persistent" cache

This should avoid doing network exchange for each run. We now use a cache
directory in `/tmp/.scm-perf-test/` to cache repository we need to pull. The use
of this cache is automatically managed by the `share` extension.

The directory is also used to cache wheels used by pip.
parent ae97d60ca826
No related branches found
No related tags found
No related merge requests found
......@@ -40,9 +40,9 @@
> all: repos/smoke-test-A.benchrepo repos/smoke-test-B.benchrepo
>
> repos/smoke-test-A.benchrepo:
> (cd repos; tar xf \$(SOURCE)/smoke-test-A-reference.tar --warning=no-timestamp; hg -R smoke-test-A-reference update tip)
> (cd repos; tar xf \$(SOURCE)/smoke-test-A-reference.tar --warning=no-timestamp; hg -R smoke-test-A-reference update --quiet tip)
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-hundred.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-ten.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-thousand.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-same.tar --warning=no-timestamp )
> repos/smoke-test-B.benchrepo:
......@@ -44,9 +44,9 @@
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-hundred.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-ten.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-last-thousand.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-A-partial-same.tar --warning=no-timestamp )
> repos/smoke-test-B.benchrepo:
> (cd repos; tar xf \$(SOURCE)/smoke-test-B-reference.tar --warning=no-timestamp; hg -R smoke-test-B-reference update tip)
> (cd repos; tar xf \$(SOURCE)/smoke-test-B-reference.tar --warning=no-timestamp; hg -R smoke-test-B-reference update --quiet tip)
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-B-partial-last-hundred.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-B-partial-last-ten.tar --warning=no-timestamp )
> (cd repos/.cache/; tar xf \$(SOURCE)/smoke-test-B-partial-last-thousand.tar --warning=no-timestamp )
......@@ -55,9 +55,11 @@
setup appropriate virtual env
$ mkdir -p /tmp/.scm-perf-test/pip-cache
$ export XDG_CACHE_HOME=/tmp/.scm-perf-test/pip-cache
$ virtualenv $TESTTMP/venv 1>/dev/null 2>&1
$ export PATH=$TESTTMP/venv/bin:${PATH}
$ pip install --requirement requirements.txt --quiet
run
......@@ -58,9 +60,22 @@
$ virtualenv $TESTTMP/venv 1>/dev/null 2>&1
$ export PATH=$TESTTMP/venv/bin:${PATH}
$ pip install --requirement requirements.txt --quiet
run
$ mkdir -p /tmp/.scm-perf-test/repo-pool
$ cat << EOF >> test.hgrc
> [ui]
> quiet = yes
>
> [extensions]
> share=
>
> [share]
> pool = /tmp/.scm-perf-test/repo-pool
> poolnaming = remote
> EOF
$ export HGRCPATH="${TESTTMP}"/test-asv/test.hgrc
$ ASV_SKIP_SYSTEM_CHECK=1 ./launch.sh fe3ca1e6 -b track_commit
+ asv machine --yes
* (glob)
......@@ -88,15 +103,15 @@
(use ASV_SKIP_SYSTEM_CHECK=1 to skip it)
+ '[' -z 1 ']'
+ '[' '!' -d mercurial ']'
+ hg clone https://www.mercurial-scm.org/repo/hg mercurial
requesting all changes
adding changesets
adding manifests
adding file changes
added * (glob)
new changesets * (glob)
updating to bookmark @* (glob)
* files updated, 0 files merged, 0 files removed, 0 files unresolved (glob)
+ hg clone https://www.mercurial-scm.org/repo/hg mercurial (?)
requesting all changes (?)
adding changesets (?)
adding manifests (?)
adding file changes (?)
added * (glob) (?)
updating to bookmark @* (glob) (?)
new changesets * (glob) (?)
* files updated, 0 files merged, 0 files removed, 0 files unresolved (glob) (?)
+ mkdir -p repos/
+ mkdir -p repos/.cache
+ make MAKE_VERBOSE=1 -f repos.make
......@@ -100,9 +115,8 @@
+ mkdir -p repos/
+ mkdir -p repos/.cache
+ make MAKE_VERBOSE=1 -f repos.make
(cd repos; tar xf "$TESTTMP/references"/smoke-test-A-reference.tar --warning=no-timestamp; hg -R smoke-test-A-reference update tip)
2001 files updated, 0 files merged, 0 files removed, 0 files unresolved
(cd repos; tar xf "$TESTTMP/references"/smoke-test-A-reference.tar --warning=no-timestamp; hg -R smoke-test-A-reference update --quiet tip)
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-hundred.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-ten.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-thousand.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-same.tar --warning=no-timestamp )
......@@ -105,9 +119,8 @@
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-hundred.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-ten.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-last-thousand.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-A-partial-same.tar --warning=no-timestamp )
(cd repos; tar xf "$TESTTMP/references"/smoke-test-B-reference.tar --warning=no-timestamp; hg -R smoke-test-B-reference update tip)
2001 files updated, 0 files merged, 0 files removed, 0 files unresolved
(cd repos; tar xf "$TESTTMP/references"/smoke-test-B-reference.tar --warning=no-timestamp; hg -R smoke-test-B-reference update --quiet tip)
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-B-partial-last-hundred.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-B-partial-last-ten.tar --warning=no-timestamp )
(cd repos/.cache/; tar xf "$TESTTMP/references"/smoke-test-B-partial-last-thousand.tar --warning=no-timestamp )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment