summaryrefslogtreecommitdiff
path: root/test/rebar_test_utils.erl
Commit message (Collapse)AuthorAgeFilesLines
* properly support top level app erl_opts from REBAR_CONFIG os var (#1889)Tristan Sloughter2018-09-211-1/+28
| | | | | | When REBAR_CONFIG was set it would not effect the top level app's configuration because app_discover was rereading the top level rebar.config which ignored REBAR_CONFIG. Instead this patch has it use the existing configuration from REBAR_CONFIG.
* add option to compiler provider to only build dependencies (#1888)Tristan Sloughter2018-09-191-0/+8
|
* support for hex v2, multiple repository fetching, private organizations (#1884)Tristan Sloughter2018-09-131-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update to hex_core for hex-v2 repo support (#1865) * update to hex_core for hex-v2 repo support This patch adds only single repo hex-v2 support through hex_core. Packages no longer filtered out by buildtool metadata and the package index is updated per-package instead of fetched as one large ets dump. * tell travis to also build hex_core branch * support list of repos for hex packages (#1866) * support list of repos for hex packages repos are defined under the hex key in rebar configs. They can be defined at the top level of a project or globally, but not in profiles and the repos configured in dependencies are also ignored. Searching for packages involves first checking for a match in the local repo index cache, in the order repos are defined. If not found each repo is checked through the hex api for any known versions of the package and the first repo with a version that fits the constraint is used. * add {repos, replace, []} for overriding the global & default repos * add hex auth handling for repos (#1874) auth token are kept in a hex.config file that is modified by the rebar3 hex plugin. Repo names that have a : separating a parent and child are considered organizations. The parent repo's auth will be included with the child. So an organization named hexpm:rebar3_test will include any hexpm auth tokens found in the rebar3_test organization's configuration. * move packages to top level of of hexpm cache dir (#1876) * move packages to top level of of hexpm cache dir * append organization name to parent's repo_url when parsing repos * only eval config scripts and apply overrides once per app (#1879) * only eval config scripts and apply overrides once per app * move new resource behaviour to rebar_resource_v2 and keep v1 * cleanup use of rebar_resource module and unused functions * cleanup error messages and unused code * when discovering apps support mix packages as unbuilt apps (#1882) * use hex_core tarball unpacking support in pkg resource (#1883) * use hex_core tarball unpacking support in pkg resource * ignore etag if package doesn't exist and delete if checksum fails * add back tests for bad package checksums * improve bad registry checksum error message
* fix code path when validating pluginsTristan Sloughter2017-12-031-4/+5
|
* OTP-21 readiness, Full Unicode supportFred Hebert2017-11-161-4/+4
| | | | | | | | | | | | This replaces all deprecated function usage by alternative ones based on a version switch enacted at compile time, preventing all warnings. This will likely introduce some possible runtime errors in using a Rebar3 compiled on OTP-20 or OTP-21 back in versions 19 and earlier, but we can't really work around that. A bunch of dependencies have been updated to support OTP-21 without warnings as well.
* Unicode support in all the placesFred Hebert2017-08-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* More fixes for bad calls to find_appsFred Hebert2017-02-261-2/+2
|
* Testing expected hash behaviour and errors in pkgsFred Hebert2016-05-251-4/+6
| | | | - also making sure unlocking works fine
* Test support for OTP-19Fred Hebert2016-05-241-6/+17
|
* Support package hashes in structure and lockfileFred Hebert2016-05-241-9/+9
| | | | | | | | | - the internal representation for package locks moves from `{Name, {pkg, PkgName, Vsn}, Lvl}` to `{Name, {pkg, PkgName, Vsn, Hash}, Lvl}` - the internal representation for packages moves from `{pkg, PkgName, Vsn}` to `{pkg, PkgName, Vsn, Hash}` - the hash can be `undefined`, meaning no check will be done - no checking is done yet.
* add test to verify only project_plugins override providersTristan Sloughter2016-02-221-1/+28
|
* Add test case for relx overlay varsLuis Rascao2016-02-051-6/+9
| | | | | Makes use of several var types: integers, strings, binaries, binary strings and tuples.
* refactor `rebar_erlc_compiler`alisdair sullivan2015-10-261-2/+5
| | | | | | | | | | | | | | | | | | | * modify compiler interface to work on either application objects or directories containing source files * compile all sources in `src_dirs` to the application `ebin` dir and all sources in `extra_src_dirs` to a directory mirroring it's position in the app's `_build` directory. for example, `apps/foo/more` would compile to `_build/default/lib/foo/more` for `extra_src_dirs` in the root of a project with multiple applications (so orphan directories that don't "belong" to an application) compile to `_build/default/extras/more` * copy directories specified in `extra_src_dirs` into the `_build` directory so tools like `ct` and `xref` that expect source to be in a particular location still work * clean compiled artifacts from all `extra_src_dirs` * alter `eunit`, `ct` and `cover` to work with the new directory structure * billions of new tests
* shiny and new test suite for eunit provideralisdair sullivan2015-09-291-1/+1
|
* Basic package aliasing testsFred Hebert2015-08-261-1/+24
|
* speed up tests a bit by setting global_rebar_dirpvmart2015-08-201-0/+2
|
* Add tests for mixed deps installsFred Hebert2015-08-161-19/+60
| | | | | Requires a rework of other test suites using the same dep-handling mechanism.
* do not install profile deps of depsTristan Sloughter2015-07-181-0/+8
|
* only look for top level apps and those directly under apps/ or lib/Tristan Sloughter2015-07-161-4/+4
|
* Failing case for unstable upgrade lock filesFred Hebert2015-07-081-3/+3
|
* wip: deps install refactorFred Hebert2015-07-021-4/+8
|
* Use same random seeding function for random_name and random_vsnViacheslav V. Kovalev2015-06-281-3/+8
|
* Fixed review commentsDaniel Widgren2015-06-261-19/+1
|
* Some fixes after reviewViacheslav V. Kovalev2015-06-261-1/+2
|
* Fixed so that release tests now pass. Got all green tests.Daniel Widgren2015-06-261-1/+19
|
* Fix multi_app_default_dirs test on windows.Viacheslav Kovalev2015-06-261-2/+2
| | | | | Seed random with erlang:now() because os:timestamp precision is not enough on windows.
* Adding erl_first_files testFred Hebert2015-06-261-1/+1
| | | | | | The test works by using a parse transform that stamps modules with an attribute as it runs them. It then compiles everything, loads the module, and makes sure the stamps respect the defined order.
* check format of config file and print the bad section in the errorTristan Sloughter2015-06-181-1/+1
|
* add test for plugin with transitive depsTristan Sloughter2015-05-271-3/+4
|
* update stable_lock test from Fred's branchTristan Sloughter2015-05-211-12/+12
|
* install plugins from the global config to ~/.cache/pluginsTristan Sloughter2015-05-171-1/+16
|
* don't load package registry unless there are pkg deps to solveTristan Sloughter2015-04-281-2/+2
|
* track and cleanup code paths for different contextsTristan Sloughter2015-04-211-1/+2
|
* test building of deps pluginsTristan Sloughter2015-04-041-0/+15
|
* add a more direct way to generate an `eunitized` test app toalisdair sullivan2015-03-241-5/+25
| | | | test utils and add better eunit tests
* Merge pull request #286 from tsloughter/checkoutsFred Hebert2015-03-231-1/+2
|\ | | | | treat _checkouts as deps that are always compiled
| * treat _checkouts as deps that are always compiledTristan Sloughter2015-03-211-1/+2
| |
* | Test cases to exercise the dev_mode release optionKelly McLaughlin2015-03-231-1/+10
|/ | | | | | | | | | Add one test case to verify the dev_mode option for a release and another to verify overriding the dev_mode option in a profile for a release. Verification of proper dev_mode functioning is done in the rebar_test_utils:check_results/2 function by checking if all the directories in the release lib dir are symlinks or not and comparing that result to the dev_mode expectation passed as input to the check_results function.
* Implement deps conflicts as errorsFred Hebert2015-03-151-9/+13
| | | | | | | | The option {deps_error_on_conflict, true} will make it so conflicts in deps being fetched interrupts the operation rather than just display a warning. Defaults to `false'.
* update erlydtl compiler to output to _build, add simple testTristan Sloughter2015-03-071-0/+3
|
* copy project apps to deps output dir for compilationTristan Sloughter2015-02-281-9/+10
|
* make base_dir for a run include the profiles in path, link to shared depsTristan Sloughter2015-02-281-3/+3
|
* Add tests and fixes for packages upgradesFred Hebert2015-02-231-0/+3
| | | | | | | | | | - Track level of packages properly, they're not level 0 anymore (this could yield an issue where a src dep takes precedence over a pkg dep) - Proper stable sort of vertices in the digraph module - PkgDeps no longer 'see themselves' when fetching and upgrading after locking themselves - Pkg Locks are added to pkg deps rather than source deps - Updating test cases to support pkg mocking on top of src mocking
* Reuse test code and drop duplicated stuffFred Hebert2015-02-231-1/+10
|
* basic profile deps testsTristan Sloughter2015-02-221-0/+32
|
* fix test, remove use of filelib:wildcard for R15 supportTristan Sloughter2015-02-221-2/+2
|
* release and tar testsTristan Sloughter2015-02-221-0/+24
|
* Support multiple app upgrade & lock testsFred Hebert2015-02-111-0/+14
| | | | | | - Many apps is supported through and through - Not mentioning any app upgrades all apps - Locks are refreshed on disk and tested as such after an upgrade
* Partial work + Failing testsFred Hebert2015-02-111-8/+0
| | | | | The problem with the current effort is handling of transitive dependency upgrades and possible values.
* WIPFred Hebert2015-02-111-1/+11
| | | | | | Test that all the correct locks are set for an upgrade run. Now to actually re-run the install deps and prove it works