File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
#
3
3
# Run Criterion Benchmarks
4
4
#
@@ -14,7 +14,7 @@ mv Cargo.toml.bak Cargo.toml
14
14
15
15
16
16
# store extra things for the benchmarking report
17
- if [ ! -z " $BENCHMARK_EXTRAS " ]; then
17
+ if [ -n " $BENCHMARK_EXTRAS " ]; then
18
18
cat << EOF > index.html
19
19
<!doctype html>
20
20
<head>
36
36
# Add svg plots to index html
37
37
find target/criterion -name ' pdf.svg' -type f -print0 |
38
38
sort -z |
39
- while read -d $' \0' svg_file
39
+ while read -r - d $' \0' svg_file
40
40
do
41
- name=$( echo $svg_file | cut -d ' /' -f 3)
41
+ name=$( echo " $svg_file " | cut -d ' /' -f 3)
42
42
43
43
sample_datafile=target/criterion/$name /new/sample.json
44
- if [ -f $sample_datafile ]; then
44
+ if [ -f " $sample_datafile " ]; then
45
45
echo " <p><a href='${sample_datafile} ' class='sample-json'>$name </a>" >> index.html
46
46
else
47
47
echo " <p>$name </p>" >> index.html
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ case "${CMD}" in
35
35
36
36
test)
37
37
enable_property_tests
38
- cargo test $@
38
+ cargo test " $@ "
39
39
restore_disabled_property_tests
40
40
;;
41
41
Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ function fetch_benchmark_bigdecimal_file() {
16
16
local FILENAME=" random-bigdecimals-$1 .txt"
17
17
local FILEPATH=$TEST_DATA_DIR /$FILENAME
18
18
19
- if [ -e $FILEPATH ]; then
19
+ if [ -e " $FILEPATH " ]; then
20
20
echo " exists: $FILEPATH "
21
21
else
22
22
local URL=${GITLAB_URL_PATTERN// <FILENAME>/ $FILENAME }
23
23
echo " fetching: $FILEPATH from $URL "
24
24
25
- if [ $CURL ]; then
26
- $CURL -s --fail -L $URL -o " $FILEPATH "
27
- elif [ $WGET ]; then
28
- $WGET --quiet $URL -O " $FILEPATH "
25
+ if [ " $CURL " ]; then
26
+ $CURL -s --fail -L " $URL " -o " $FILEPATH "
27
+ elif [ " $WGET " ]; then
28
+ " $WGET " --quiet " $URL " -O " $FILEPATH "
29
29
else
30
30
echo " No supported fetching program"
31
31
fi
You can’t perform that action at this time.
0 commit comments