[m-rev.] for review: Don't compress failed test executables.
Peter Wang
novalazy at gmail.com
Tue Jul 31 13:05:28 AEST 2018
Anyone think this still helps?
---
Disk space isn't the concern that it used to be so compressing
failed test executables is mostly just a waste of time.
tests/run_one_test:
Don't compress failed test executables.
tests/Mmake.common:
Delete clean_zip target.
diff --git a/tests/Mmake.common b/tests/Mmake.common
index 739b5e272..974a8868c 100644
--- a/tests/Mmake.common
+++ b/tests/Mmake.common
@@ -175,21 +175,21 @@ $(TESTS_DIR)/Mmake.params: ;
exit 1; }
#-----------------------------------------------------------------------------#
MERCURY_MAIN_MODULES = $(PROGS)
ERROR_OUTPUT_FILE = runtests.errs
realclean_local: clean_logs clean_errors clean_mdbrc
-clean_local: clean_out clean_res clean_zip clean_trace_counts clean_mdbrc_in
+clean_local: clean_out clean_res clean_trace_counts clean_mdbrc_in
clean_mdbrc:
-rm -f mdbrc
clean_mdbrc_in:
-rm -f mdbrc.in
# XXX what is this target for??
clean_mc: clean_c clean_o clean_out clean_res
@@ -201,31 +201,20 @@ clean_res:
clean_logs:
rm -f *.log
clean_errors:
rm -f $(ERROR_OUTPUT_FILE) FAILED_TESTS
clean_trace_counts:
rm -f *.pass1 *.pass2 *.pass3 *.fail
-# Remove gzipped executables for tests which have failed.
-ifeq ($(TESTS),)
-clean_zip: ;
-else
-clean_zip:
- for test in $(TESTS); do \
- prog=`basename $$test -nodepend`; \
- rm -f $$prog.gz $$prog.exe.gz; \
- done
-endif
-
# The `foo' targets make recursively make `foo' in all subdirectories.
# before making `foo_local' in the current directory.
.PHONY: runtests runtests_local runtests_subdirs
.PHONY: check check_local check_subdirs
.PHONY: realclean_subdirs clean_subdirs
realclean: realclean_subdirs
clean: clean_subdirs
all: runtests
@@ -310,21 +299,21 @@ start_runtests_local:
mmake $(RM_JFACTOR) realclean_local > /dev/null 2>&1; \
rm -f *.d *.dep *.int *.int2 *.int3 > /dev/null 2>&1; \
rm -f *.date *.date3 *.opt *.optdate > /dev/null 2>&1; \
rm -f *.trans_opt *.trans_opt_date > /dev/null 2>&1; \
rm -f .mercury_trace_counts* > /dev/null 2>&1; \
rm -f .date* > /dev/null 2>&1; \
fi
@> FAILED_TESTS
# Run a single test, cleaning up if it succeeds, or producing a log file
-# and gzipping the executable if the test fails.
+# if the test fails.
.PHONY: %.log
%.log: start_runtests_local
+ at test_full=$*; \
test=$(*:%-nodepend=%); \
params_msg="$(PARAMS_MSG)"; \
this_dir="$(THIS_DIR)"; \
tests_dir="$(TESTS_DIR)"; \
export test_full; \
export test; \
diff --git a/tests/run_one_test b/tests/run_one_test
index 768cec545..770d2abfd 100755
--- a/tests/run_one_test
+++ b/tests/run_one_test
@@ -30,31 +30,20 @@ then
echo "${test_full}" >> FAILED_TESTS
echo "${this_dir}/${test_full}" "${params_msg}" >> \
"${tests_dir}/FAILED_TESTS_SUMMARY"
exitstatus=1
else
( mmake "${test}.runtest" 2>&1 || touch "${test_full}.failed" ) \
>> "${test_full}.log"
if test -f "${test_full}.failed"
then
rm -f "${test_full}.failed"
- case "${GRADE}" in
- csharp*|java*|erlang*)
- ;;
- *)
- if test -f "${test}"
- then
- rm -f "${test}.gz" "${test}.exe.gz"
- gzip "${test}" || gzip "${test}.exe"
- fi
- ;;
- esac
echo FAILED TEST "${this_dir}/${test_full}" "${params_msg}"
echo "LOG OF THE FAILED TEST"
cat "${test_full}.log"
echo "END OF THE LOG OF THE FAILED TEST"
echo "${test_full}" >> FAILED_TESTS
echo "${this_dir}/${test_full}" "${params_msg}" \
>> "${tests_dir}/FAILED_TESTS_SUMMARY"
tcdir=FAILED_TC_DIR
exitstatus=1
else
--
2.18.0
More information about the reviews
mailing list