Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

batch.sh now deletes output files that match the expected output files

This is to save disk space when running many measurements in a row,
e.g. with run-all.sh
  • Loading branch information...
commit ef8c8fbdabf21bdcb8d47536ce50ac277e01104a 1 parent 05a3f15
@jafingerhut authored
View
2  binarytrees/batch.sh
@@ -94,6 +94,6 @@ do
( time ${CMD} ${N} ${EXTRA_LANG_ARGS} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
12 env-batch.sh
@@ -315,3 +315,15 @@ DIFF="diff -c"
# others produces \n only. Ignore trailing carriage returns on input.
CMP="diff --strip-trailing-cr --brief"
#CMP="cmp"
+
+cmp_and_rm_2nd_if_correct()
+{
+ local F1="$1"
+ local F2="$2"
+ ${CMP} "${F1}" "${F2}"
+ local cmp_exit_status=$?
+ if [ $cmp_exit_status == 0 ]
+ then
+ ${RM} "${F2}"
+ fi
+}
View
12 env.sh
@@ -315,3 +315,15 @@ DIFF="diff -c"
# others produces \n only. Ignore trailing carriage returns on input.
CMP="diff --strip-trailing-cr --brief"
#CMP="cmp"
+
+cmp_and_rm_2nd_if_correct()
+{
+ local F1="$1"
+ local F2="$2"
+ ${CMP} "${F1}" "${F2}"
+ local cmp_exit_status=$?
+ if [ $cmp_exit_status == 0 ]
+ then
+ ${RM} "${F2}"
+ fi
+}
View
2  fannkuch/batch.sh
@@ -98,6 +98,6 @@ do
( time ${CMD} ${N} ${EXTRA_LANG_ARGS} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
6 fannkuchredux/batch.sh
@@ -21,7 +21,7 @@ do
case $1 in
sbcl|perl|ghc|java|clj*) LANGUAGES="$LANGUAGES $1"
;;
- quick|medium|long) TESTS="$TESTS $1"
+ quick|medium*|long) TESTS="$TESTS $1"
;;
*)
1>&2 echo "Unrecognized command line parameter: $1"
@@ -54,6 +54,8 @@ do
;;
medium) N=10
;;
+ medium2) N=11
+ ;;
long) N=12
;;
esac
@@ -93,6 +95,6 @@ do
( time ${CMD} ${N} ${EXTRA_LANG_ARGS} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  fasta/batch.sh
@@ -94,6 +94,6 @@ do
( time ${CMD} ${N} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
4 knucleotide/batch.sh
@@ -69,7 +69,7 @@ do
# threads in parallel. With an empty string, the default
# is 2 more threads than the number of available
# processors.
- clj*) EXTRA_LANG_ARGS=""
+ clj*) EXTRA_LANG_ARGS="1"
;;
esac
@@ -88,6 +88,6 @@ do
( time ${CMD} ${EXTRA_LANG_ARGS} < ${IN} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  mandelbrot/batch.sh
@@ -101,6 +101,6 @@ do
( time ${CMD} ${N} ${EXTRA_LANG_ARGS} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  nbody/batch.sh
@@ -92,6 +92,6 @@ do
( time ${CMD} ${N} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  pidigits/batch.sh
@@ -97,6 +97,6 @@ do
( time ${CMD} ${N} ${EXTRA_LANG_ARGS} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  regexdna/batch.sh
@@ -85,6 +85,6 @@ do
( time ${CMD} < ${IN} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  revcomp/batch.sh
@@ -83,6 +83,6 @@ do
( time ${CMD} < ${IN} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  revlines/batch.sh
@@ -79,6 +79,6 @@ do
( time ${CMD} < ${IN} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
View
2  spectralnorm/batch.sh
@@ -97,6 +97,6 @@ do
( time ${CMD} ${N} > ${OUT} ) 2>&1 | tee ${CONSOLE}
;;
esac
- $CMP ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
+ cmp_and_rm_2nd_if_correct ${OUTPUT_DIR}/${T}-expected-output.txt ${OUT} 2>&1 | tee -a ${CONSOLE}
done
done
Please sign in to comment.
Something went wrong with that request. Please try again.