aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/application_SUITE.erl
AgeCommit message (Collapse)Author
2019-03-04Error on duplicated config apps/keys in -configJosé Valim
Continuation of d92eb79322. Erlang/OTP 21.3 warned on those cases and now we will raise on Erlang/OTP 22.0.
2019-03-01Add application:set_env/1 and application:set_env/2José Valim
It is equivalent to calling application:set_env/4 on each application individually, except it is more efficient. When given duplicate apps or duplicate keys, set_env/1 and set_env/2 will warn. The warning will also be emitted during boot: $ erl -config dupkeys.config -s erlang halt 2019-02-27 11:16:02.653100 application: kernel; duplicate parameter: key1 =WARNING REPORT==== 27-Feb-2019::11:16:02.653100 === application: kernel; duplicate parameter: key1 $ erl -config dupapps.config -s erlang halt 2019-02-27 11:16:02.653100 duplicate application config: kernel =WARNING REPORT==== 27-Feb-2019::11:16:02.653100 === duplicate application config: kernel Prior to this patch, the behaviour was unspecified, and duplicate keys and duplicate apps would behave different depending on the amount of config, the name of the config files, and how those configs would be listed. The goal is to raise an error in the future.
2018-06-18Update copyright yearHenrik Nord
2018-06-15Merge pull request #1838 from crownedgrouse/masterSiri Hansen
Included config files relative to sys.config directory OTP-15137
2018-06-14Included config files relative to sys.config dircrownedgrouse
Change the way included config files are searched in sys.config. Search first relative to sys.config directory, then relative to current working directory, for backward compatibility. This permit same result when using a sys.config file in a release or starting manually a node with -config. Credit to Siri Hansen for test case.
2018-05-04Don't save included_applications as application environment variableSiri Hansen
During application load, the included_applications key from the .app file would earlier be duplicated as an application environment variable. Due to this, its value could be retrieved in any of the following ways: application:get_key(App,included_applications). application:get_env(App,included_applications). It would also be included in the resulting list from the following calls: application:get_all_key(App). application:get_all_env(App). This commit removes the duplication, and included_applications will no longer be returned by application:get_env/2 or application:get_all_env/1. The reason for this change is mainly to avoid confusion, but also to avoid the potensial inconsistency which would occur if the environment variable was changed during runtime by calls to application:put_env(App,included_applications,NewInclApps).
2018-04-26Test cuddle for loggerSiri Hansen
2017-05-04Update copyright yearRaimo Niskanen
2017-02-14Fixed typos in lib/kernelAndrew Dryga
2016-03-15update copyright-yearHenrik Nord
2016-03-10Fix commentsBjörn Gustavsson
Remove out-commented code. Make sure that comments that are not at the end of a line starts with two '%' characters and not just one. That will become important later when we'll remove all ?line macros and ask Emacs to re-indent the files.
2016-03-10Eliminate use of doc and suite clausesBjörn Gustavsson
Those clause are obsolete and never used by common_test.
2016-03-10Eliminate use test_server:format()Björn Gustavsson
Replace with io:format/2 or ct:pal/3.
2016-03-10Eliminate use of test_server:sleep/1Björn Gustavsson
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
?config is ugly and not recommended. Use proplists:get_value/2 instead.
2016-03-09Modernize timetrapsBjörn Gustavsson
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-26Eliminate use of erlang:now/0 for generating unique node namesBjörn Gustavsson
Use erlang:unique_integer([positive]) when generating unique node names.
2014-05-26application_SUITE: Clean up the code after the test is doneBjörn Gustavsson
2014-04-11Store expanded config in application_controller:change_application_dataSiri Hansen
If the Config given to application_controller:change_application_data included other config files, it was only expanded for already existing (loaded) applications. If an upgrade added a new application which had config data in an included config file, the new application did not get correct config data. This is now changed so config data will be expanded for all applications.
2014-02-21Unload 'deadlock' application in application_SUITE:shutdown_deadlockSiri Hansen
This is just to clean up properly after the test case. If not, code_SUITE:bit_boot_embedded might fail since it tries to include the 'deadlock' application in the boot file and fails when running systools:make_script.
2014-02-19kernel: Fix an application terminate deadlock possibilityDan Gudmundsson
Could happen if get_child was called during terminate. io (since it is a group_leader) also causes problems after get_child was called. Split up and do it async.
2014-02-11Allow persistent option on set_env/4 and unset_env/3José Valim
An environment key set with the persistent option will not be overridden by the ones configured in the application resource file on load. This means persistent values will stick after the application is loaded and also on application reload.
2013-07-11Add application:ensure_all_started/1-2Fred Hebert
This adds two new functions to the application module that will recursively look for missing dependencies to start the entire dependency chain of a given application, and then the application itself, if possible. Its entire behavior is based on the currently existing 'start/1-2' functions, which will report dependencies that have not yet been started and other problems encountered. 'ensure_all_started/1-2' will use this information the way any programmer would manually do it to automate the process. This kind of functionality, while not OTP-ish (releases do this start sequence for the user), is still useful for testing purposes, quick demonstrations, and programmers who do not wish or know how to use OTP releases. The function returns '{ok, StartedApps}' for all started or already started applications (already started are omitted from the list), and will return '{error, {AppName, Reason}}' on a failure to allow users to rapidly know why the function failed. Note that no specific check is made for direct or indirect circular dependencies between applications, and these will make the function go in an infinite loop.
2013-03-05tests: Refactor away ?line macro in test suiteBjörn-Egil Dahlberg
Refactor away ?line macro in application_SUITE
2013-03-05kernel: Tests for application:ensure_started/1,2Björn-Egil Dahlberg
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-14Removed obsolete ?line macroSerge Aleynikov
2013-01-14Add application:get_key/3serge
The new function provides a default value for a configuration parameter.
2011-11-16Add documentation and test for kernel env var shutdown_timeoutSiri Hansen
2011-08-31Improve and correct types and specifications in Kernel and STDLIBHans Bolinder
Running Dialyzer on the test suites revealed a few type errors.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for kernelLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update kernel tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP