From 4ee58064ace3194376426073c8a9e5edcfbb5a90 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 21 Dec 2021 10:55:51 +0100 Subject: otp: Make tests pass when run in source tree --- lib/sasl/Makefile | 1 + lib/sasl/test/Makefile | 1 + lib/sasl/test/sasl_SUITE.erl | 13 +++++++++++++ 3 files changed, 15 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/Makefile b/lib/sasl/Makefile index 4f32f0ec0c..4b04c1aee4 100644 --- a/lib/sasl/Makefile +++ b/lib/sasl/Makefile @@ -37,5 +37,6 @@ SPECIAL_TARGETS = include $(ERL_TOP)/make/otp_subdir.mk DIA_PLT_APPS=tools +TEST_NEEDS_RELEASE=true include $(ERL_TOP)/make/app_targets.mk diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 33b4bf1385..1ea70319bd 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -94,5 +94,6 @@ release_tests_spec: make_emakefile $(INSTALL_DATA) sasl.spec sasl.cover $(EMAKEFILE) "$(RELSYSDIR)" chmod -R u+w "$(RELSYSDIR)" @tar cfh - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -) + $(INSTALL_DATA) $(ERL_TOP)/make/otp_version_tickets "$(RELSYSDIR)/sasl_SUITE_data" release_docs_spec: diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index 429112d51b..bbebce83ae 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -60,6 +60,19 @@ end_per_group(_GroupName, Config) -> Config. +init_per_testcase(appup_test, Config) -> + %% We check if the test results were released using a version + %% of Erlang/OTP that was a tagged version or not. On a non-tagged + %% version this testcase most likely will fail. + case file:read_file( + filename:join( + proplists:get_value(data_dir,Config), "otp_version_tickets")) of + {ok,<<"DEVELOPMENT",_/binary>>} -> + {skip, "This is a development version, test might fail " + "because of incorrect version numbers"}; + {ok,S} -> + Config + end; init_per_testcase(_Case, Config) -> Config. end_per_testcase(_Case, _Config) -> -- cgit v1.2.1