summaryrefslogtreecommitdiff
path: root/lib/common_test/test
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearErlang/OTP2023-02-141-1/+1
|
* Replace size/1 with either tuple_size/1 or byte_size/1Björn Gustavsson2023-01-171-1/+1
| | | | | | | | | | | | | | | | | | The `size/1` BIF is not optimized by the JIT, and its use can result in worse types for Dialyzer. When one knows that the value being tested must be a tuple, `tuple_size/1` should always be preferred. When one knows that the value being tested must be a binary, `byte_size/1` should be preferred. However, `byte_size/1` also accepts a bitstring (rounding up size to a whole number of bytes), so one must make sure that the call to `byte_size/1` is preceded by a call to `is_binary/1` to ensure that bitstrings are rejected. Note that the compiler removes redundant calls to `is_binary/1`, so if one is not sure whether previous code had made sure that the argument is a binary, it does not harm to add an `is_binary/1` test immediately before the call to `byte_size/1`.
* Update copyright yearErlang/OTP2022-09-201-1/+1
|
* Merge branch 'deterministic-build' of https://github.com/TD5/otp into maintBjörn Gustavsson2022-06-291-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 'deterministic-build' of https://github.com/TD5/otp: make: Allow OTP to be built deterministically compiler: Make test_lib robust to +deterministic compiler: Make compiler forward +determinsitic flag to epp compiler: Make yecc respect +deterministic compiler: Make leex respect +deterministic compiler: Make asn1ct_gen respect +deterministic compiler: Make EPP respect +deterministic OTP-18165
| * make: Allow OTP to be built deterministicallyTom Davies2022-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a --enable-deterministic-build to the configure script, which sets ERL_DETERMINISTIC=yes throughout the relevant Makefiles, which then invoke the relevant build stages with the +deterministic option. This addresses absolute paths being included in generated .erl files and compiled .beam files that resulted in builds from different source directories generating different artefacts (which is a component of the issue in erlang#4482). I think it would make sense to make this the default at some stage, but I've put the change behind a flag for now to decouple making deterministic OTP builds possible from making them the default. Having +deterministic set results in compiler options being removed from the module info for modules where this options was used. This may have other implications for users of OTP. For tests themselves, +determinism is not set, since many test cases depend on accessing the test module's compilation options, or other features not available in deterministic mode, in order to configure themselves. For tests of the determinism feature specifically, +deterministic must be explicitly passed to the compiler within the relevant test cases.
* | 5719 - Adding Stacktrace to thrownBen Adams2022-06-012-6/+8
|/ | | | - For Common_tests: Added to Match Results for thrown and not hard coded to Content of stacktrace
* Update copyright yearErlang/OTP2022-02-153-3/+3
|
* stdlib: add quote, unquote functions in uri_stringJakub Witczak2022-02-111-2/+2
| | | | | - functions for percent encoding and decoding user data - intended as utility functions for preparing URI components
* otp: Fix `make TYPE=$TYPE` to work for all typesLukas Larsson2022-01-211-1/+1
|
* Merge pull request #5581 from ↵Lukas Larsson2022-01-212-11/+59
|\ | | | | | | | | garazdawi/lukas/ct/add-file-and-line-to-surefire/OTP-17881/OTP-17882 ct: Add correct file and line to surefire report
| * ct: Add tests for surefire file and lineLukas Larsson2022-01-212-11/+59
| |
* | Update copyright yearRickard Green2021-12-164-4/+4
| |
* | Merge branch 'maint'Rickard Green2021-12-1326-26/+26
|\ \ | |/ | | | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2021-12-1326-26/+26
| |
* | Fix typos in lib/common_testKian-Meng, Ang2021-12-059-11/+11
|/
* Merge pull request #5242 from ↵Jakub Witczak2021-09-292-20/+268
|\ | | | | | | | | | | | | acw224/acw224/common_test/group_parsing_modification Common_test : Updated grammar for tests specifications OTP-17664 Closes #5088
| * Update the CT test_spec grammar to accept group-path of group_specacw2242021-09-261-0/+49
| | | | | | | | | | | | | | | | | | | | Before there was a mismatch in the grammar. Groups = [[GroupNames]] | GroupSpec | [GroupSpec] | all where the [[GroupNames]] is a GroupPath This change makes the grammar more coherent with Groups = [[GroupSpec]] | GroupSpec | [GroupSpec] | all That is the groups in a group-path can now be GroupSpec
| * Update the doc CT test_spec grammar to match actual behavioracw2242021-08-032-20/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | The grammar in the doc doesn't match actual behavior Two problems: Groups = GroupPath, GroupPath = [GroupName] leads to think that [group1, group2] is the group path group1-group2 whereas it is understood as an array of GroupSpec. GroupSpec = [group, properties, GroupSpec] was not recognised, only [group, properties, [GroupSpec] An updated grammar is proposed, together with additional tests to validate the pertinence of the new grammar.
* | test suites: replace ?t: with test_server:Maxim Fedorov2021-09-0817-92/+91
| | | | | | | | | | | | Removing ?t retained for backward compatibility allows to search for test_server callsites easier. Replace ?t:fail and test_server:fail with ct:fail.
* | common_test: Remove unnecessary check as test do not use OpenSSHIngela Anderton Andin2021-08-302-71/+59
|/
* Merge branch 'anders/common_test/netconf/OTP-17506/OTP-17509' into maintAnders Svensson2021-07-011-15/+29
|\ | | | | | | | | | | | | | | * anders/common_test/netconf/OTP-17506/OTP-17509: Let a receiver of incoming NETCONF notifications be configured Simplify xmlns mechanics Remove misleading documentation Fix badarg on reception of unexpected NETCONF notification
| * Let a receiver of incoming NETCONF notifications be configuredAnders Svensson2021-06-281-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module ct_netconfc supports incoming notifications by way of the RFC 5277 create-subscription RPC, a process that calls create_subscription/* receiving any subsequent notifications in its message queue. However, create-subscription is no longer the only way to subscribe to notifications: RFC 8639 added the establish-subscription RPC based on RFC 7950, YANG 1.1. The possibility of defining new RPCs in YANG invalidates the assumption that notifications are received only a consequence of any fixed set of RPCs. To be able to receive notifications regardless of how they originate, add a 'receiver' option() to allow a destination for incoming notifications (and possibly more in the future) to be specified when a session is created; at session/*, open/*, or only_open/*. A destination is anything that can be banged, as documented by erlang:send/2. Multiple destinations can be specified and take precedence over the pid() of a create_subscription/* caller. The behaviour is unchanged if no receiver is specified. Configuration of a receiver on connect/* should arguably either provide a default or contribute additional receivers, but this is inconsistent with option() capability, so a receiver on connect/* is simply ignored. Otherwise, the option handling is a little inconsistent, with some unused options being ignored and others being rejected. Possibly worth fixing, but not in this commit. There is no specific support for establish-subscription. Few of the RPC-specific functions in ct_netconfc provide anything but simple encode/decode, and there's little point in adding more functions when the list of RPCs is potentially endless. Arbitrary RPCs can be sent with send_rpc/*.
* | Merge pull request #4767 from tomas-abrahamsson/floats-for-ct-multiply_timetrapsKuba Witczak2021-05-192-2/+161
|\ \ | | | | | | Floats for ct multiply timetraps (OTP-17413)
| * | common_test: Allow floats to -multiply_timetraps NTomas Abrahamsson2021-04-282-2/+161
| |/ | | | | | | | | | | For the ct_run option -multiply_timetraps N, allow N to be a float as well as previously an integer. This makes it possible to scale down timetraps. This applies also to the associated test spec option.
* | common_test: Fix Config leakage for nested groupsJakub Witczak2021-04-232-6/+160
|/ | | | | Before this change Config leaked between test groups in case of a subgroup was skipped (GH-3480).
* common_test: Add modern ssh host keys to ct_netconfc_SUITEHans Nilsson2020-03-206-0/+42
|
* Merge branch 'dgud/common_test/fix-test-timers'Dan Gudmundsson2020-03-202-4/+4
|\ | | | | | | | | | | * dgud/common_test/fix-test-timers: Reduce timer:sleep Fix error handling
| * Reduce timer:sleepDan Gudmundsson2020-02-252-4/+4
| | | | | | | | Causes test runs to take an unnecessary long time
* | Merge branch 'maint'Rickard Green2020-03-1324-24/+24
|\ \ | |/ |/| | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2020-03-1324-24/+24
| |
* | Merge branch 'maint'Hans Nilsson2020-02-041-1/+1
|\ \ | |/ | | | | | | * maint: common_test: Update Makefile with dir 'property_test'
| * common_test: Update Makefile with dir 'property_test'Hans Nilsson2020-02-031-1/+1
| |
* | Merge branch 'maint'Hans Nilsson2020-01-093-1/+44
|\ \ | |/ | | | | | | | | | | | | | | | | | | * maint: common_test: Comments from doc review common_test: Document property test reporting common_test: Add 'prop_tools' option to Config for ct_property_test common_test: ct_property_test test case common_test: Add .hrl for support macros and -include of proptest tool common_test: Remove warning for experimental code common_test: Presentation function
| * common_test: Add 'prop_tools' option to Config for ct_property_testHans Nilsson2020-01-071-14/+4
| |
| * common_test: ct_property_test test caseHans Nilsson2020-01-073-1/+54
| |
* | ct: Change cth_log_redirect to use default logger formatter and levelLukas Larsson2019-10-174-29/+395
|/ | | | | This makes it possible for the user to configure the logger in a greater extent and make it look more like the user wants.
* Merge branch 'dgud/test-fixups' into maintDan Gudmundsson2019-09-091-11/+2
|\ | | | | | | | | | | | | | | * dgud/test-fixups: ct: Remove windows temp-dir workarounds Fix debug printouts Don't fail if crypto is not available Avoid div zero in test_suite
| * ct: Remove windows temp-dir workaroundsDan Gudmundsson2019-06-271-11/+2
| | | | | | | | Was introduced to avoid long paths when erlang couldn't handle them on windows
* | [ct] Store correct paths with from-release in ct_release_testSiri Hansen2019-06-271-1/+3
| | | | | | | | | | | | In opaque data given to callback module, the paths to application lib dirs were faulty for the release to upgrade from. This is now corrected.
* | Merge branch ↵Siri Hansen2019-06-143-1/+173
|\ \ | |/ |/| | | | | | | | | 'siri/ct/fail-after-failed-init_per_testcase/ERIERL-350/OTP-15869' into maint * siri/ct/fail-after-failed-init_per_testcase/ERIERL-350/OTP-15869: [ct] Allow post_init_per_testcase to change skip to fail
| * [ct] Allow post_init_per_testcase to change skip to failSiri Hansen2019-05-213-1/+173
| |
* | Merge branch 'siri/ct/hook-terminated-not-initiated/ERIERL-370/OTP-15863' ↵Siri Hansen2019-06-101-2/+8
|\ \ | | | | | | | | | | | | | | | | | | into maint * siri/ct/hook-terminated-not-initiated/ERIERL-370/OTP-15863: [ct] Fix bug where Hook:terminate/1 was called before Hook:init/2
| * | [ct] Fix bug where Hook:terminate/1 was called before Hook:init/2Siri Hansen2019-06-041-2/+8
| |/ | | | | | | | | | | This problem was introduced with commit acd87425acf7705328b01aa8f0a804207ffe4790, when the new hook function post_groups/2 and post_all/3 were added.
| * Merge branch 'siri/ct/fuzzer_support/ERIERL-143/OTP-14746' into maint-20Erlang/OTP2019-04-169-3/+1155
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * siri/ct/fuzzer_support/ERIERL-143/OTP-14746: [ct] Fix bug with faulty suite name in end_per_suite config [ct] Add {testcase,TC,RepeatProps} syntax for repeating test cases [ct] Add post_groups/2 and post_all/3 hook functions # Conflicts: # lib/common_test/test/Makefile
* | \ Merge branch 'maint'Siri Hansen2019-04-169-3/+1155
|\ \ \
| * \ \ Merge branch 'siri/ct/fuzzer_support/ERIERL-143/OTP-14746' into maintSiri Hansen2019-04-169-3/+1155
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | * siri/ct/fuzzer_support/ERIERL-143/OTP-14746: [ct] Fix bug with faulty suite name in end_per_suite config [ct] Add {testcase,TC,RepeatProps} syntax for repeating test cases [ct] Add post_groups/2 and post_all/3 hook functions
| | * | [ct] Add {testcase,TC,RepeatProps} syntax for repeating test casesSiri Hansen2019-04-153-1/+525
| | | |
| | * | [ct] Add post_groups/2 and post_all/3 hook functionsPeter Andersson2019-04-156-2/+630
| | | |
* | | | Merge branch 'maint'Siri Hansen2019-04-165-22/+684
|\ \ \ \ | |/ / /
| * | | Merge branch 'siri/ct/reset_curr_tc/ERIERL-334/OTP-15717' into maintSiri Hansen2019-04-166-24/+686
| |\ \ \ | | | |/ | | |/| | | | | | | | | * siri/ct/reset_curr_tc/ERIERL-334/OTP-15717: [ct] Cleanup after timetrap timeout or kill during framework call or hook