Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(992)

Side by Side Diff: common/dirwalk/test.sh

Issue 2054763004: luci-go/common/dirwalk: Code for walking a directory tree efficiently Base URL: https://github.com/luci/luci-go@master
Patch Set: Small updates. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698