aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/multi_load_SUITE.erl
AgeCommit message (Collapse)Author
2016-03-15update copyright-yearHenrik Nord
2016-03-11Merge branch 'bjorn/kernel/modernize-tests'Björn Gustavsson
* bjorn/kernel/modernize-tests: Remove ?line macros Fix comments gen_tcp_misc_SUITE: Use unique node names Eliminate use of the ?t macro Eliminate use of doc and suite clauses Replace use of test_server:capture*/0 with ct:capture*/0 Eliminate use test_server:format() Eliminate use of test_server:sleep/1 Eliminate use of test_server:fail/0,1 Eliminate use of ?config() macro Modernize timetraps disk_log_SUITE: Remove vestiges of VxWorks support Conflicts: lib/kernel/test/code_SUITE.erl
2016-03-09Modernize timetrapsBjörn Gustavsson
2016-03-07multi_load_SUITE: Clarify failure reasonsBjörn Gustavsson
The failure reasons remained from a previous draft of the API.
2016-03-07multi_load_SUITE: Don't fail on non-HiPE systemsBjörn Gustavsson
2016-02-25code: Add functions that can load multiple modulesBjörn Gustavsson
Add functions to 'code' to allow loading of multiple modules at once. code:atomic_load(Modules) will load all modules at once, or fail having loaded none of them. Since we cannot guarantee the atomicity if there are modules with -on_load functions, the list of modules must not contain any modules with an -on_load function. Also, to make it possible to put an application into an inactive state for as short time as possible, also add code:prepare_loading/1 and code:finish_loading/1. They are used like this: {ok,Prepared} = code:prepare_loading(Modules) . . . ok = code:finish_loading(Prepared) code:ensure_modules_loaded/1 is useful as a pure optimization to ensure that modules that will be needed soon have indeed been loaded. It will not reload modules that have already been loaded and it *will* accept modules that have an on_load function. Therefore, it does not make sense to give any atomicity guarantees. I did consider overloading the existing code:ensure_loaded/1 function, but rejected it because the return value is very different. Having different forms of return values depending on the types of arguments is confusing.