Commit graph

102 commits

Author SHA1 Message Date
Tuncer Ayaz
6127f528b9 Fix whitespace errors 2015-04-02 16:10:31 +02:00
Brian H. Ward
f19c7d0785 Add 'cover_export_json' option 2015-03-11 06:09:07 -04:00
Luis Rascao
2ebd804e1e Fix OTP .appup.src processing on empty lists
Expand test cases to handle .appup.src with
empty upgrade from and downgrade to lists, lift
larger .appup.src file from OTP's
lib/dialyzer/test/r9c_SUITE_data/src/asn1/asn1.appup.src
2015-03-02 11:47:36 +00:00
Fred Hebert
7f73b8d365 Merge pull request #449 from lrascao/feature/support_appup_src_files
Support .appup.src files
2015-02-05 08:12:43 -05:00
Luis Rascao
53fbb7cf8e Support .appup.src[.script] files
Similar to how .app.src are being handled, all files in directory
.src ending with .appup.src are processed, checked for
correctness and copied to ebin without the .src extension.

By way of using rebar_config:consult_file/1, .appup.src.script
files are automatically supported in exactly the same manner
as in .app.src.script.
2015-02-04 22:33:16 +00:00
Fred Hebert
c051530b3c Merge pull request #445 from norton/norton-erlc-order
rebar doesn't respect the order of erl_first_files given in the rebar.conf file
2015-02-02 11:06:12 -05:00
Luis Rascao
bf2b3e2468 Support custom protobuf directory
proto_opts config option contains the compiler directive
that defines which proto compiler to use, also contains a
src_dirs entry that defines a list of locations for the
.proto files to be processed.

Add integration test that compiles .proto files from src
and from proto directory specified in separate rebar
config files
2015-01-31 19:47:59 +00:00
Joseph Wayne Norton
27cd98ef1d Test order for erl_first_files 2015-01-26 20:41:38 -06:00
Fred Hebert
b488179030 Merge pull request #424 from tomas-abrahamsson/gpb-recompilation-detection-2
Gpb recompilation detection (using base compiler)
2015-01-26 18:54:19 -05:00
Luis Rascao
9b1f807f0c gpb: add inttest for recompilation with no changes 2015-01-24 22:11:05 +01:00
Tomas Abrahamsson
1ce7059adb Recompile .proto files with gpb also with prefix/suffix
For protocol buffer files, when there were gpb options to alter the
module name with prefix or suffix, recompilation was not properly
detected. This is now fixed. (Issue #384).

Use the rebar_base_compiler's ability to specify both source and
target file names, to be able to also support prefixes.

This also introduces a call to gpb_compile:format_error, so the xref
recipe needs to be updated to ignore it, to avoid false errors.
2015-01-24 22:11:04 +01:00
Vlad Dumitrescu
5f0ab0268e Fix .app.src.script bug introduced in b44b4f4
Handle the case when both .app.src and .app.src.script exist;
the script takes precedence.
2015-01-20 17:09:11 +01:00
Tuncer Ayaz
7520ad62ba inttest/ct3: fix overlong line 2015-01-14 23:19:16 +01:00
Tomas Abrahamsson
5182ded01c Remove a git url in gpb and protobuffs inttest configs
In the rebar.config files for the gpb and protobuffs inttests, use the
{Name, Version} dependency form instead of {Name, Version, Source},
since the Source is not really applicable; the mocks are copied into
place by the proto_gpb_rt:files/0 and proto_protobuffs_rt:files/0.
Idea and suggestion by Tuncer Ayaz.
2015-01-13 00:11:47 +01:00
Tomas Abrahamsson
a8ffba6da5 Copy instead of rsync gpb and protobuffs inttest mocks
Installation of the gpb and protobuffs mocks, in inttest, is now done
using copy in proto_{gpb,protobuffs}_rt:files/0.  Previously, rebar
prepare-deps was used, the dependencies had an rsync source with a
relative path back to the inttest directory.  This eliminates a
dependency in inttest to rsync, instead relying on retest's
functionality to copy files and directories.  Also, it eliminates
hidden knowledge about the directory layout that retest chooses.
Idea and suggestion by Tuncer Ayaz.

Since the dependency sources in the inttest rebar.config files are no
longer used, they are now changed back from rsync paths to git urls,
to serve as examples.
2015-01-10 23:18:49 +01:00
Tomas Abrahamsson
2af51af986 Replace inttest external dep to protobuffs with a mock
In inttest/proto_protobuffs, replace the external dependency to
erlang_protobuffs, a protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.
2015-01-07 18:27:40 +01:00
Tomas Abrahamsson
2a0dd5bacf Bugfix comment in inttest/proto_protobuffs/rebar.config 2015-01-07 18:27:40 +01:00
Tomas Abrahamsson
c82bf703ae Replace inttest external dependency to gpb with a mock
In inttest/proto_gpb, replace the external dependency to gpb, a
protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.

As a result, the increased timeout for the proto_gpb inttest should no
longer be needed (inttest/proto_gpb/retest.config), both since the
mock is now much faster to compile, and since any network bandwidth or
connectivity issues have now been eliminated.
2015-01-07 18:27:40 +01:00
Fred Hebert
b8e0018782 Merge pull request #413 from tomas-abrahamsson/undo-386-merge
Revert "Merge pull request #386 ... gpb-recompilation...detection"
2014-12-30 13:27:02 -05:00
Tomas Abrahamsson
a7b7205d07 Revert "Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection"
This reverts commit 81063d33f0, reversing
changes made to 6584defdda.

This was reverted because it changed the gpb compiler to
not use rebar_base_compiler.  That change was to add support for
target name prefixes, but it is better to add that support to
rebar_base_compiler.
2014-12-23 16:28:23 +01:00
Igor Savchuk
d5d691d7f7 Fix app.config argument passing when using ct_run (take 2)
ct_run has changed its config key from -ct_config to -config,
thus, -config key, used to specify app.config now must be
placed after -erl_args
2014-12-22 21:36:41 +03:00
Fred Hebert
ae7a7aae18 Revert "Merge branch 'kittee-ct_appconfig_fix'"
This reverts commit 3c0f420c2a, reversing
changes made to 8f64e13184.
2014-12-21 15:25:00 -05:00
Fred Hebert
440d73825b Merge branch 'ct_appconfig_fix' of https://github.com/kittee/rebar into kittee-ct_appconfig_fix
Conflicts:
	THANKS
2014-12-21 15:17:03 -05:00
Fred Hebert
81063d33f0 Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection
Recompile .proto files with gpb also with prefix/suffix
2014-12-21 15:03:05 -05:00
Fred Hebert
6584defdda Merge pull request #406 from stwind/master
Fix deps path check in rebar_ct:collect_glob/3
2014-12-21 15:02:39 -05:00
stwind
a83c80d4c0 Fix deps path check in rebar_ct:collect_glob/3
Since rebar_deps:get_deps_dir/1 returns an absolute path,
lists:member(Deps, Parts2) will always return false, thus .test.spec
files in deps/ will not be ignored.
2014-12-11 11:59:40 +08:00
Tuncer Ayaz
39ab4e13fb Generate cachegrind file if erlgrind is available 2014-12-08 23:09:20 +01:00
Fred Hebert
d6f4fd1c28 Merge pull request #338 from vladdu/app_src_script
Processing .app.src.script expects a single value to be returned.
2014-12-04 10:26:26 -05:00
Vlad Dumitrescu
d17b254662 add tests for processing .app.src{.script} files 2014-12-03 18:39:29 +01:00
Vlad Dumitrescu
aa5b8ac772 add Emacs/vi header to non-dummy test modules 2014-12-02 10:52:45 +01:00
Tristan Sloughter
47dba1bbc3 Merge pull request #399 from tomas-abrahamsson/gpb-inttest-timeout
Increase the timeout for the inttest/proto_gpb
2014-12-01 20:14:23 -06:00
Tomas Abrahamsson
f1ef90b9df Increase the timeout for the inttest/proto_gpb
On my slow old netbook with a 1.6GHz CPU, this inttest
takes about 40 seconds to run, of which network activity
is about 3s, the default timeout of retest is 30s.
Add a generous margin to avoid unnecessary timeouts.
2014-12-01 23:47:45 +01:00
Igor Savchuk
bc46b501d0 Fix app.config argument passing when using ct_run
ct_run has changed its config key from -ct_config to -config,
thus, -config key, used to specify app.config now must be
placed after -erl_args
2014-11-28 16:48:47 +03:00
Fred Hebert
d42ed46835 Normalize log level as WARN to ERROR in new patch 2014-11-27 15:34:52 -05:00
Tuncer Ayaz
a4c5f3357f Treat vsn mismatch as warning if -k/--keep-going
Fixes #319.
2014-11-25 18:44:21 +01:00
Fred Hebert
4ba8f74787 Revert "Merge branch 'platinumthinker-color_in_logs'"
This reverts commit 49930fe566, reversing
changes made to 6e6b0fd43f.
2014-11-21 09:57:49 -05:00
Fred Hebert
733d3771fa Merge branch 'color_in_logs' of https://github.com/platinumthinker/rebar into platinumthinker-color_in_logs
Conflicts:
	THANKS
2014-11-21 09:46:10 -05:00
Andrey Teplyashin
c01cf5902b Add colored logs 2014-11-19 23:44:55 +06:00
Tomas Abrahamsson
51b34a6e52 Recompile .proto files with gpb also with prefix/suffix
For protocol buffer files, when there were gpb options to alter the
module name with prefix or suffix, recompilation was not properly
detected. This is now fixed. (Issue #384).

Properly detecting change meant moving from rebar_base_compiler, so it
also meant processing protocol buffer files in sequence instead of in
parallel.
2014-11-05 00:31:52 +01:00
Fred Hebert
17e0b14d1d Merge pull request #203 from tomas-abrahamsson/pluggable-proto-compilers-gpb
Pluggable proto compilers gpb
2014-10-31 09:32:13 -04:00
Tomas Abrahamsson
9f057f29c5 Add inttest for default proto compiler (protobuffs)
This borrows heavily from the inttest for gpb, many thanks
to Luis Rascão for providing a most useful example.
2014-10-29 23:46:01 +01:00
Luis Rascão
144cb8c156 Add proto compiler gpb inttest
exercises rebar/gpb integration

The bulk of these tests are written by Luis Rascão, hence he is the
author of this commit. As the committer, I have cherry-picked his two
commits 4c87bcd and ebb8182, from the feature/support_gpb_protobuf
branch in the git://github.com/lrascao/rebar repo, and have slightly
adapted it to fit this pluggable-proto-compilers-gpb branch.

Update the THANKS file
2014-10-29 23:46:01 +01:00
Tuncer Ayaz
631d74c00f Implement eflame -p/--profile support
When -p/--profile is enabled, you can select the profiler as follows:

generate flame graph (eflame.svg) from trace (eflame.trace)
$ rebar -p compile profiler=eflame

generate fprof.analysis
$ rebar -p compile

generate fprof.analysis
$ rebar -p compile profiler=fprof
2014-10-29 19:24:58 +01:00
Tuncer Ayaz
009b50ec3b inttest/logging: fix log level 2014-10-29 19:11:10 +01:00
Tuncer Ayaz
173f5b82d6 inttest: add missing headers and fix a typo 2014-10-29 19:11:10 +01:00
Tuncer Ayaz
c2afc7d98b Minor follow-up fixes for #293 2014-09-11 19:06:04 +02:00
Fred Hebert
d5e3b4329c Merge pull request #293 from liskin/port-deps
Check C source dependencies in needs_compile
2014-09-11 09:53:30 -07:00
Tuncer Ayaz
3fb4a7c540 Fix OS X resource fork handling (Reported-by: Richard O'Keefe)
If you happen to fetch a zip archive of the git repo and try to build
from that, you may, for example, ask erlc to build src/._rebar.erl.
._* are OS X resource forks and not real .erl files. This may also
happen with network filesystems on OS X. To fix that, limit the
files compiled by rebar to include only those which start with
a letter or a digit.
2014-07-25 20:52:30 +02:00
Fred Hebert
dcfa6daf30 Merge branch 'erl-args-to-end' of https://github.com/NineFX/rebar into NineFX-erl-args-to-end
Conflicts:
	THANKS
2014-07-15 08:20:29 -04:00
varnerac-ubnt
35ee457176 Fix bug 271
Moves ct_extra_params to the end of the generated ct_run command.
This allows users to pass commands to the underlying emulator
using -erl_args. The included rt test demonstrates that it is
possible to pass an addtional option to ct_run and -erl_args at
the same time. Finally, the test executes in regular and verbose
modes because rebar constructs the ct_run command differently in
verbose mode.
2014-06-27 15:35:56 -05:00