diff options
author | Jakob Unterwurzacher | 2017-01-03 14:17:19 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-01-03 14:17:42 +0100 |
commit | 53555fec1c1db206e02d3a32bf65c43db56e04cc (patch) | |
tree | 633c8c7361c415a7d8f67c364c063b00ae7e4f03 /tests/canonical-benchmarks.bash | |
parent | 53aedc378345f7dba5cdd0544b4aa60733505623 (diff) |
tests: factor out dl-linux-tarball.bash
This will be also used by the reverse benchmarks.
Diffstat (limited to 'tests/canonical-benchmarks.bash')
-rwxr-xr-x | tests/canonical-benchmarks.bash | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/canonical-benchmarks.bash b/tests/canonical-benchmarks.bash index cdde33d..b7c2d38 100755 --- a/tests/canonical-benchmarks.bash +++ b/tests/canonical-benchmarks.bash @@ -6,24 +6,20 @@ # # This is called by the top-level script "benchmark.bash". +cd "$(dirname "$0")" +MYNAME=$(basename "$0") + if [ $# -ne 1 ]; then - MYNAME=$(basename $0) echo "usage: $MYNAME TESTDIR" exit 1 fi +# Download /tmp/linux-3.0.tar.gz +./dl-linux-tarball.bash + # cd to TESTDIR cd "$1" -TGZ=/tmp/linux-3.0.tar.gz - -if [ "$(md5sum /tmp/linux-3.0.tar.gz | cut -f1 -d' ')" != \ - "f7e6591d86a9dbe123dfd1a0be054e7f" ]; then - echo "Downloading linux-3.0.tar.gz" - wget -nv --show-progress -c -O $TGZ \ - https://cdn.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz -fi - function etime { LC_ALL=C /usr/bin/time -f %e 2>&1 $@ > /dev/null } @@ -33,7 +29,7 @@ dd if=/dev/zero of=zero bs=131072 count=2000 2>&1 | tail -n 1 rm zero sleep 1 echo -n "UNTAR: " -etime tar xzf $TGZ +etime tar xzf /tmp/linux-3.0.tar.gz sleep 1 echo -n "LS: " etime ls -lR linux-3.0 |