aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test
AgeCommit message (Collapse)Author
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).
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-22Allow non-ASCII characters in Xref filanmesHans Bolinder
Xref now accepts filenames with character codes greater than 126. (Thanks to Emile Joubert for reporting the issue.)
2012-06-08Merge branch 'lukas/otp/install_with_whitespace/OTP-10107' into maintLukas Larsson
* lukas/otp/install_with_whitespace/OTP-10107: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-05-10Remove workarounds for hybrid and shared heaps in test suitesBjörn Gustavsson
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-01Remove loops from the graph created by digraph_utils:condensation/1Hans Bolinder
The function digraph_utils:condensation/1 used to create a digraph containing loops contradicting the documentation which states that the created digraph is free of cycles. Thanks to Kostis Sagonas for finding the bug.
2012-02-06fprof_SUITE: Skip create_file_slow/1 if libraries are nativeBjörn Gustavsson
2011-12-02lcnt_SUITE: Be kind to slow machinesBjörn Gustavsson
Bump the value for timetrap timeout, and also call lcnt:stop/0 in end_per_testcase/2 so that failure in one test case will not cause all the following to fail.
2011-12-02eprof_SUITE: Cope with fast computers and bad time measurementsBjörn Gustavsson
2011-12-02cover_SUITE: Cope with missing/broken crypto applicationBjörn Gustavsson
2011-11-07Merge branch 'bjorn/fun-improvements/OTP-9667'Björn Gustavsson
* bjorn/fun-improvements/OTP-9667: sys_pre_expand: Remove incorrect comment compiler: Eliminate use of deprecated erlang:hash/2 beam_asm: Fix broken NewIndex in fun entries beam_asm: Strenghten the calculation of Uniq for funs
2011-11-07beam_asm: Strenghten the calculation of Uniq for funsBjörn Gustavsson
Funs are identified by a triple, <Module,Uniq,Index>, where Module is the module name, Uniq is a 27 bit hash value of some intermediate representation of the code for the fun, and index is a small integer. When a fun is loaded, the triple for the fun will be compared to previously loaded funs. If all elements in the triple in the newly loaded fun are the same, the newly loaded fun will replace the previous fun. The idea is that if Uniq are the same, the code for the fun is also the same. The problem is that Uniq is only based on the intermediate representation of the fun itself. If the fun calls local functions in the same module, Uniq may remain the same even if the behavior of the fun has been changed. See http://erlang.org/pipermail/erlang-bugs/2007-June/000368.htlm for an example. As a long-term plan to fix this problem, the NewIndex and NewUniq fields was added to each fun in the R8 release (where NewUniq is the MD5 of the BEAM code for the module). Unfortunately, it turns out that the compiler does not assign unique value to NewIndex (if it isn't tested, it doesn't work), so we cannot use the <Module,NewUniq,NewIndex> triple as identification. It would be possible to use <Module,NewUniq,Index>, but that seems ugly. Therefore, fix the problem by making Uniq more unique by taking 27 bits from the MD5 for the BEAM code. That only requires a change to the compiler. Also update a test case for cover, which now fails because of the stronger Uniq calculation. (The comment in test case about why the Pid2 process survived is not correct.)
2011-11-07EEP-23: Allow variables in fun M:F/ABjörn Gustavsson
Currently, the external fun syntax "fun M:F/A" only supports literals. That is, "fun lists:reverse/1" is allowed but not "fun M:F/A". In many real-life situations, some or all of M, F, A are not known until run-time, and one is forced to either use the undocumented erlang:make_fun/3 BIF or to use a "tuple fun" (which is deprecated). EEP-23 suggests that the parser (erl_parse) should immediately transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have not followed that approach in this implementation, because we want the abstract code to mirror the source code as closely as possible, and we also consider erlang:make_fun/3 to be an implementation detail that we might want to remove in the future. Instead, we will change the abstract format for "fun M:F/A" (in a way that is not backwards compatible), and while we are at it, we will move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)" from sys_pre_expand down to the v3_core pass. We will also update the debugger and xref to use the new format. We did consider making the abstract format backward compatible if no variables were used in the fun, but decided against it. Keeping it backward compatible would mean that there would be different abstract formats for the no-variable and variable case, and tools would have to handle both formats, probably forever. Reference: http://www.erlang.org/eeps/eep-0023.html
2011-10-27tools test suite: Eliminate compilation warnings for the eed moduleBjörn Gustavsson
2011-10-27tools test suite: Eliminate use of deprecated regexp moduleBjörn Gustavsson
Also extend the test suite so that the changed code will be executed.
2011-05-06Add a check logic to prevent file descriptor leakShunichi Shinohara
cover module handle files as raw in export and import. Assert counts of ports are the same at the beginning and at the end of the test case.
2011-03-30Merge branch 'hw/call-chmod-without-f' into devHenrik Nord
* hw/call-chmod-without-f: Call chmod without the "-f" flag Conflicts: erts/emulator/test/Makefile lib/asn1/test/Makefile lib/crypto/test/Makefile lib/debugger/test/Makefile lib/docbuilder/test/Makefile lib/edoc/test/Makefile lib/erl_interface/test/Makefile lib/inviso/test/Makefile lib/parsetools/test/Makefile lib/percept/test/Makefile lib/ssl/test/Makefile lib/syntax_tools/test/Makefile lib/test_server/test/Makefile lib/tools/test/Makefile OTP-9170
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-08Merge branch 'lukas/tools/cover_mem_footprint/OTP-9043' into devLukas Larsson
* lukas/tools/cover_mem_footprint/OTP-9043: Fix spelling on analyse Add short sleep to prevent timing issues on slow machines Update cover tests which depend on compiled files to be skipped if the compile testcase is skipped Conflicts: lib/tools/test/cover_SUITE.erl
2011-03-08Fix spelling on analyseLukas Larsson