File 6573-Tweak-test-Makefile.patch of Package erlang
From e3543404fda83d78b02a80517b64a040d4996128 Mon Sep 17 00:00:00 2001
From: Anders Svensson <anders@erlang.org>
Date: Fri, 18 Mar 2022 12:38:42 +0100
Subject: [PATCH 3/3] Tweak test/Makefile
One target for running suites without common_test (run), one with (ct):
ignoring errors is better done on the command line with make -i. Disable
crash dumps.
---
lib/diameter/test/Makefile | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/diameter/test/Makefile b/lib/diameter/test/Makefile
index 04d8a54bc0..53b5fd4618 100644
--- a/lib/diameter/test/Makefile
+++ b/lib/diameter/test/Makefile
@@ -69,12 +69,9 @@ all $(TYPES): $(TARGET_FILES)
strict:
$(MAKE) opt STRICT_FLAGS=-Werror
-# Require success ...
-run: $(SUITES)
-
-# ... or not.
-any: opt
- $(MAKE) -i $(SUITES)
+# Run all suites, without/with common_test.
+run: $(SUITES:%=_%)
+ct: $(SUITES)
clean:
rm -f $(TARGET_FILES)
@@ -95,7 +92,7 @@ info:
@echo
@echo erl = $(shell which erl)
@erl -noinput \
- -eval 'io:format("diameter = ~s~n", [code:lib_dir(diameter)])' \
+ -eval 'io:format("diameter = ~ts~n", [code:lib_dir(diameter)])' \
-s init stop
@echo ========================================
@@ -107,10 +104,10 @@ help:
@echo " Compile all test suites."
@echo
@echo " run:"
- @echo " Compile and run all test suites, stop on failure."
+ @echo " Compile and run all test suites without common_test."
@echo
- @echo " any:"
- @echo " Compile and run all test suites, ignore any failures."
+ @echo " ct:"
+ @echo " Compile and run all test suites with common_test."
@echo
@echo " $(SUITES):"
@echo " Compile and run a specific test suite."
@@ -123,7 +120,10 @@ help:
@echo " Echo some relevant variables."
@echo ========================================
-.PHONY: all any run clean debug docs help info opt realclean strict
+.PHONY: all ct run clean debug docs help info opt realclean strict
+
+# Disable crash dumps.
+export ERL_CRASH_DUMP_BYTES=0
# ----------------------------------------------------
# Special Targets
--
2.34.1