aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test
AgeCommit message (Collapse)Author
2015-09-10Add test for "Fix cover output file"Siri Hansen
If a module includes eunit.hrl, a parse transform adds the function test/0 on line 0 in the module. A bug in OTP-18.0 caused cover:analyse_to_file/1 to fail to insert cover data in the output file when line 0 existed in the cover data table. The bug is corrected by the commit "Fix cover output file". This commit adds a test which checks that the bug is not introduced again.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-10cover: handle undefined module when analysing to filePéter Gömöri
It is possible that not just the source but even the beam of a module is not available when calling analyse_to_file. For example when coverdata is imported from an old file and since then a module was removed. Before this fix cover:analyse_to_file/3 could possibly never return because of a helper process crashed with error:undef and never reply to the caller. At the same time link the helper process to cover_server so any further error won't let the caller waiting indefinitely.
2015-05-21tools: Relax lcnt test timeBjörn-Egil Dahlberg
2015-02-20[cover] Improve performanceSiri Hansen
Add functions for cover compilation and analysis on multiple files. This allows for more parallelisation. All functions for cover compilation can now take a list of modules/files. cover:analyse/analyze and cover:analyse_to_file/analyze_to_file can be called without the Modules arguement in order to analyse all cover compiled and imported modules, or with a list of modules. Also, the number of lookups in ets tables is reduced, which has also improved the performance when analysing and resetting cover data.
2014-11-08Fix cover bug on last expressions with empty clausesJosé Valim
OTP-8188 introduced a fix for handling last expressions in expressions like case, try and friends. However the fix did not account that some of those expressions like receive may have no clauses (only an after clause), leading to a function clause error when cover compiling code with such expressions.
2014-07-14tools: Add lcnt tests for new serializingBjörn-Egil Dahlberg
2014-06-05Replace erlang:binary_to_term() Erlang wrappersRickard Green
Replace the 'erlang:binary_to_term/1' and 'erlang:binary_to_term/2' Erlang wrappers taking care of failure after yield with management of this in the hidden yield BIF.
2014-04-01tools: Refactor testcaseBjörn-Egil Dahlberg
2014-03-06cover_SUITE:reconnect/1: Let the other side initiate the disconnectBjörn Gustavsson
The reconnect/1 test starts another node and takes down the connection to it for a while. However, it has been in observed in our daily builds that sometimes a "spontaneous" re-connection occurs. I think that it because of the call to rpc:cast/3 which internally will set the group leader for the remote process to a process on the test_server node. It seems that sometimes the group_leader/2 call will re-establish the connection. Unfortunately, I have not been able to force this to happen by inserting delays in the rpc module, so it it still just an hypothesis. However, letting the other node do the disconnection does seem to fix the problem and intuitively that should be safer way to do it because the group_leader/2 call and the disconnection will be executed sequentially on the same node instead of concurrently from two different nodes.
2014-02-28Attempt to provide more information if a test case failsBjörn Gustavsson
2014-02-24Merge branch 'schlagert/fix_basic_appups'Siri Hansen
* schlagert/fix_basic_appups: Dynamically configure typer_SUITE according to environment Disable hipe_SUITE when environment doesn't support it Make hipe non-upgradable by setting appup file empty Fix missing module on hipe app file template Add test suites performing app and appup file checks Introduce appup test utility Fix library application appup files Fix non-library appup files according to issue #240 OTP-11744
2014-02-24Add test suites performing app and appup file checksTobias Schlager
Add the mentioned test suites for *all* library and touched non-library applications.
2014-02-20With --enable-native-libs, skip eprof_SUITE:basic_option/1Björn Gustavsson
eprof does not work on native-compiled code. Since eprof_SUITE:basic_option/1 does profiling on the lists modules, the test case will fail if --enable-native-libs is used.
2014-02-13cover_SUITE: Run part of the test suite when cover is runningBjörn Gustavsson
We used to skip the entire test suite if the cover server had already been started by common_test, but that means that we will get bad coverage for the cover module. Modify the test suite to to run all tests case that don't explicitly start or stop the cover server to increase the coverage. In addition, add a special coverage_analysis/1 test case that only runs when the cover server is already running.
2013-12-17Merge tag 'OTP_R16B03_yielding_binary_to_term'Sverker Eriksson
Yielding binary_to_term. OTP-11535 * tag 'OTP_R16B03_yielding_binary_to_term': Increase versions for OTP_R16B03_yielding_binary_to_term erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/vsn.mk lib/kernel/vsn.mk lib/stdlib/vsn.mk
2013-12-12Test named funsAnthony Ramine
2013-12-12Merge branch 'sverk/trapping-bin2term' into OTP_R16B03Sverker Eriksson
* sverk/trapping-bin2term: erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Parallel check_process_code when code_server purge a module Functionality for disabling garbage collection Use asynchronous check_process_code in code_parallel_SUITE Execution of system tasks in context of another process Conflicts: erts/emulator/beam/external.c erts/emulator/beam/sys.h erts/emulator/test/binary_SUITE.erl erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2013-11-18erts: Add erlang wrappers to binary_to_termSverker Eriksson
to not expose the trapping BIF in the stacktrace when it throws badarg.
2013-10-31Merge branch 'maint'Fredrik Gustafsson
2013-10-30tools: Fix compile_beam_opts testcaseFredrik Gustafsson
2013-10-30Take compiler options from beam in cover:compile_beamPéter Gömöri
Similarly to cover compiling from source (in this case some user specified compiler options are allowed) when cover compiling from existing beam take a filtered list of compiler options from the beamfile. This way e.g. export_all can be preserved. See use case in eb02beb1c3
2013-10-14Merge branch 'maint'Fredrik Gustafsson
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-06-12Merge branch 'maint'Björn-Egil Dahlberg
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-05Merge branch 'maint'Björn-Egil Dahlberg
2013-05-03tools: Add testcase to eprof_SUITEBjörn-Egil Dahlberg
Test disabling of set_on_spawn
2013-05-03tools: Refactor away ?line macro in eprof_SUITEBjörn-Egil Dahlberg
2013-04-19Remove the "coding: utf-8" comment from all Erlang source filesHans Bolinder
2013-03-26[cover] Ensure no process leak when stopping cover on dead nodeSiri Hansen
When cover:stop(Node) was called on a non-existing node, a process waiting for cover data from the node would hang forever. This has been corrected.
2013-02-05Merge branch 'jv/cover-patches/OTP-10778'Fredrik Gustafsson
* jv/cover-patches/OTP-10778: Fix a bug in cover when used with no_auto_import Ensure cover keeps the proper file source cover now relies on the compile info to find file sources
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Fix a bug in cover when used with no_auto_importJosé Valim
Cover was rewriting guard clauses as non-remote calls. That said, if a guard contains erlang:is_binary(Binary), Cover was incorrectly removing the erlang prefix which lead to errors if is_binary is not auto imported. This commit keeps the abstract format as it is.
2013-01-25Ensure cover keeps the proper file sourceJosé Valim
Whenever a module is compiled via compile:forms/2, the source is set to current directory unless a source option is passed to compile. This commit ensures that cover passes the source information to compile:forms/2 to ensure the source won't be modified after the module is cover compiled.
2013-01-25cover now relies on the compile info to find file sourcesJosé Valim
Prior to this commit, cover relied on a simple heuristic that traverses directory from the beam file to find a source file. The heuristic was maintained with this patch but, if it fails, it fallbacks to the source value in the module compile info. In order to illustrate how it works, one of the tests that could not find its source now passes successfully (showing the source lookup is more robust).
2013-01-25Merge branch 'lukas/tools/emacs_add_error_bif/OTP-10774'Lukas Larsson
* lukas/tools/emacs_add_error_bif/OTP-10774: Update all bif highlighting for emacs
2013-01-23Revert "Merge branch 'nox/rm-reverse-eta-conversion/OTP-10682'"Fredrik Gustafsson
This reverts commit 750ecdea08fa5fa7e32b7f3019eed96c1699427e, reversing changes made to 2cfa0466c3b3c7bd5e3621aff0f3e2ca30addb68.
2013-01-21Update all bif highlighting for emacsLukas Larsson
All bifs should now be highlighted correctly. Also added a testcase which will check for any future bif additions and deletions.
2013-01-18Merge branch 'bjorn/remove-parameterized-modules/OTP-10616'Björn Gustavsson
* bjorn/remove-parameterized-modules/OTP-10616: Remove support for parameterized modules xref_SUITE: Don't test parameterized modules shell_SUITE: Don't test parameterized modules erl_expand_records_SUITE: Don't test parameterized modules erl_eval: Don't test parameterized modules
2013-01-18Merge branch 'nox/rm-reverse-eta-conversion/OTP-10682'Fredrik Gustafsson
* nox/rm-reverse-eta-conversion/OTP-10682: Don't use fun references in cprof_SUITE Make trace_local_SUITE work without the reverse eta conversion Remove the reverse eta-conversion from v3_kernel
2013-01-15Don't use fun references in cprof_SUITEAnthony Ramine
Using fun references make a less complicated cprof use case now that the eta abstraction is gone from v3_kernel.
2013-01-10xref_SUITE: Don't test parameterized modulesBjörn Gustavsson
2013-01-09Prepare OTP files for Unicode as default encodingHans Bolinder
2012-12-21[cover] Cleanup by stopping cover between testsSiri Hansen
If one test failed, the next would sometimes also fail since cover was not stopped.
2012-12-19[cover] Fix timing dependent bug in cover_SUITE:reconnectSiri Hansen
Adding a timer:sleep between these two lines: net_kernel:disconnect(N1), [] = cover:which_nodes(), This is to make sure the disconnect is detected by cover before checking that the node is gone.
2012-12-19[cover] Remove stopped node also from lost_nodes listSiri Hansen
A nodes that was stopped with cover:stop/1 while marked as lost would not be removed from the list of lost nodes. Therefore, if a nodeup was later received for a node with the same name, it would be reconnected. This has been corrected.
2012-12-19[cover] Don't mark stopped node as lostSiri Hansen
Nodes that were stopped with cover:stop/1 were marked as lost and would be reconnected if a nodeup was later received for a node with the same name. This has been corrected.
2012-10-30[cover] Allow reconnection if node has been disconnected or downSiri Hansen
OTP-10523 Earlier, if the connection to a remote cover node was lost, all cover data was lost and the cover_server on the remote node would die. This would cause problems if there were cover compiled modules that would still be executed since they would attempt to write to the no longer existing ets tables belonging to the cover_server. This commit changes this behavior so that the cover_server on the remote node will survive connection loss and continue collecting cover data. If the connection is re-established then the main node will sync with the remote node again and cover data will not be lost (unless the node was down).
2012-10-30[cover] Add support for test_serverSiri Hansen
OTP-10523 * Added cover:flush(Nodes), which will fetch data from remote nodes without stopping cover on those nodes. * Added cover:get_main_node(), which returns the node name of the main node. This is used by test_server to avoid {error,not_main_node} when a slave starts another slave (e.g. in test_server's own tests).