From 1df205b6433e3e3ca3df2aba16998f566416096e Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Tue, 11 Dec 2018 09:09:02 +0100 Subject: [PATCH] tests/make_graph: fix a couple of cache handling issues Co-authored-by: Martin Evgeniev --- tests/make_graph | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/make_graph b/tests/make_graph index 669f96a52..ae7517940 100755 --- a/tests/make_graph +++ b/tests/make_graph @@ -26,7 +26,12 @@ fi dir="$1" metric="$2" -if [ ! -z "$(find "$dir" -name '*pb.gz' -newer /tmp/data)" ]; then +if [ ! -d "$dir" ]; then + echo "ERROR: results_dir: ‘$dir’ is not readable!" + echo "Usage: $0 results_dir" +fi + +if [ ! -f /tmp/data -o ! -z "$(find "$dir" -name '*pb.gz' -newer /tmp/data)" ]; then echo -n 'Refreshing /tmp/data...' for prof in $(find $dir -type f -name "*.pb.gz" | sort) do