summaryrefslogtreecommitdiff
path: root/fake/run.sh
blob: a6c8a912543b0666f85fadb0e0a9b8a455255c83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

naptime=
while getopts s: flag; do
  case "${flag}" in
    s) naptime="${OPTARG}";;
    *)
       echo "Bad arg" 1>&2
       exit 1
    ;;
  esac
done
if test x"${naptime:-}" != x; then
  if test -w /dev/console; then
    console=/dev/console
  fi
  echo "fakebench sleeping for ${naptime} seconds" | tee /dev/stdout ${console}
  sleep ${naptime}
fi
echo "Ran a benchmark"
echo "Some stderr" 1>&2
mkdir -p fakeresults
touch fakeresults/fake1
touch fakeresults/fake2
touch extralog