Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
|
M-A Ruel
2016/09/15 14:31:02
I'd like to have the test to be split up in a sepa
mithro
2016/09/20 12:41:44
This file is just to make it easy to run all the p
M-A Ruel
2016/09/20 16:37:27
Yes, we do not use bash unless it is expressively
| |
| 2 # Copyright 2016 The LUCI Authors. All rights reserved. | |
| 3 # Use of this source code is governed under the Apache License, Version 2.0 | |
| 4 # that can be found in the LICENSE file. | |
| 5 | |
| 6 TESTS=common/dirwalk/tests/*.json | |
| 7 | |
| 8 go install github.com/luci/luci-go/common/dirwalk/tests/tools/gendir | |
| 9 go install github.com/luci/luci-go/common/dirwalk/tests/tools/walkdir | |
| 10 | |
| 11 echo "Generating the test directories" | |
| 12 TMPDIR=/usr/local/google/tmp/luci-tests | |
| 13 mkdir -p $TMPDIR | |
| 14 for TESTFILE in $TESTS; do | |
| 15 TESTNAME="$(basename $TESTFILE .json)" | |
| 16 TESTDIR="$TMPDIR/$TESTNAME" | |
| 17 if ! [ -d $TESTDIR ]; then | |
| 18 echo "Generating test directory for $TESTNAME" | |
| 19 gendir -config $TESTFILE -outdir $TESTDIR | |
| 20 du -h $TESTDIR | |
| 21 fi | |
| 22 done | |
| 23 | |
| 24 for METHOD in simple nostat parallel; do | |
| 25 echo "Running $METHOD" | |
| 26 for TESTFILE in $TESTS; do | |
| 27 TESTNAME="$(basename $TESTFILE .json)" | |
| 28 TESTDIR="$TMPDIR/$TESTNAME" | |
| 29 OUTPUT=output.$METHOD.$TESTNAME | |
| 30 echo "Running $METHOD.$TESTNAME" | |
| 31 rm $OUTPUT | |
| 32 $(which time) --verbose --output=$OUTPUT --append walkdir --dir $TESTDIR --method $METHOD $@ 2> $OUTPUT | |
| 33 tail -n 20 $OUTPUT | |
| 34 echo | |
| 35 done | |
| 36 echo | |
| 37 echo | |
| 38 echo | |
| 39 done | |
| OLD | NEW |