aboutsummaryrefslogtreecommitdiffstats
path: root/test/core_app.mk
AgeCommit message (Collapse)Author
2023-05-09Autopatch: better handle COMPILE_FIRST/erl_first_filesLoïc Hoguin
This is still a bit hackish but it appears that some projects have wrong erl_first_files entries (module exists but not at the location configured) and so we have to do a bit of manipulation before we can find the module. We also need to be cautious about .yrl/.xrl because their corresponding .erl files may not exist in the repository before compilation yet can be listed in erl_first_files.
2023-04-03Fix core-app-yrl-header test for OTP-26Loïc Hoguin
2022-05-30Fix yecc test case failing with OTP-25.02022.05.31Loïc Hoguin
2020-06-22core/test.mk: Abort build if a test file fails to compileJean-Sébastien Pédron
In commit c55d0dcd6182983521d4ab34478cfe4b093edb12, the recipe was improved to only rebuild out-of-date test files (not everything as it was the case before). However in the process, the exit status of the Erlang compiler was not checked anymore, leading to build failures in the test directory to be ignored. This patch fixes this bug.
2020-04-21core/test.mk: Rebuild out-of-date test modules onlyJean-Sébastien Pédron
... instead of always rebuilding all of them each time a testsuite is executed. The only exception is when a Makefile was modified: like for main source files, test modules are all recompiled in this case.
2020-02-07Copy src/$(PROJECT).appup to ebin/ on build if anyLoïc Hoguin
2019-08-29Build symlinked source filesLars Kroll
2019-06-24Use cowlib master in testsLoïc Hoguin
The old Cowlib's Erlang.mk does not work on Windows.
2018-12-07Autopatch: allow configuring REBAR_GIT and REBAR_COMMITLoïc Hoguin
And use this in the tests to fetch Rebar only once and then clone from the local repository. This should speed up tests a little.
2018-11-30Validate the .app file after generating itLoïc Hoguin
2018-11-30Fix Dialyzer when a project has and uses parse transformsLoïc Hoguin
2018-11-28Fix asn1 compilation with the +maps optionLoïc Hoguin
When this option is used no include file is generated. Therefore don't error out if no include file can be found.
2018-11-26Fix badly written tests failing when LEGACY=1Loïc Hoguin
2018-11-25Build $(PROJECT).d in a separate $(MAKE) callLoïc Hoguin
This avoids the issue where clean will remove a file that was otherwise generated and won't be regenerated. This might also help with parallel building.
2018-11-24Test case for yecc, switching between test mode and normal modeHugo Mills
With a yecc grammar in the project, and this sequence of commands: $ make clean $ make check $ make $ make the "make check" succeeds. The first "make" fails because the .erl file built from the .yrl file doesn't exist. The second "make" succeeds. Add a test case for this situation. Signed-off-by: Hugo Mills <[email protected]>
2018-11-24Update the OTP-REG.mib file download locationLoïc Hoguin
2018-05-14Make some of the new tests more quietLoïc Hoguin
2018-05-14Don't list test cases manually anymoreLoïc Hoguin
2018-05-14Small tweaks to previous PRLoïc Hoguin
2018-05-14Add test with include loopStanislav Ovchar
2018-05-14Add tests include_lib tests for depsStanislav Ovchar
2018-05-14Add tests when .hrl files are in srcStanislav Ovchar
2018-05-14Add core-app-hlr test to verify recursive inculde_lib between appsStanislav Ovchar
2018-05-14Add core-app-hlr test to verify inlude_lib between appsStanislav Ovchar
2018-05-14Add core-app simple test for hlr with -include_libStanislav Ovchar
2017-04-27Use --gpg-no-sign in commits in testsLoïc Hoguin
2017-04-10Only makedep and build asn1/xrl/mib files when necessaryLoïc Hoguin
Because we were unconditionally including the makedep file, it would be built even if the target was unrelated (like "make help"), and it would also trigger building of xrl and other files that produce Erlang code. Instead the makedep file is now included as a wildcard: if it exists it gets included, if it doesn't it's not, and if it's created in the middle of execution it gets included only then. More details on the technique can be found at http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ A test has been added to make sure the behavior does not come back at a later time.
2017-01-12Set ASN.1 compilation options using ERLC_ASN1_OPTS2017.01.12Klas Johansson
`ERLC_ASN1_OPTS` can be used to pass compiler options when compiling ASN.1 files. By default, Erlang.mk will leave this empty, but it can be redefined in a Makefile.
2016-10-29Small tweak to make it easier for me to notice test failuresLoïc Hoguin
2016-10-28Use an intermediate timestamp file to know when to touch source filesJean-Sébastien Pédron
The previous approach spawned a shell for every single source files. As we disable parallel make jobs, this is very time consuming. The new approach uses an intermediate timestamp file in $(ERLANG_MK_TMP) to record the last modification of any of $(MAKEFILE_LIST) and touch all source files in one command. Then, the .app file depends on this timestamp file. We test the existence of this timestamp file: if if doesn't exist, don't touch source files, they will be built anyway. $(PROJECT).d now depends directly on $(MAKEFILE_LIST); before, this dependency was indirect through $(ERL_FILES). Also, once $(ERL_FILES) were touched, we do the same with $(PROJECT).d because there is no need to regen it because of this.
2016-10-23Support PROJECT_APP_EXTRA_KEYS to add keys to the .app fileJean-Sébastien Pédron
This allows to add standard keys which do not have a corresponding `PROJECT_` Makefile variable, as well as non-standard keys.
2016-10-19Escape % in app_file templatenevar
2016-10-19Add PROJECT_ENVnevar
Fix #587
2016-10-19Cosmetic changes to previous mergeLoïc Hoguin
2016-10-19Added test for defining yecc header file.Micah Warren
2016-06-08Add a test case for custom PROJECT_MODJared Flatow
2015-12-24Simplify cleaning in the test suiteLoïc Hoguin
Not only simpler but also faster, especially on Windows.
2015-12-15Make some rm -rf commands saferLoïc Hoguin
This way if for some unknown reason $(APP_TO_CLEAN) isn't defined, we don't delete the entire world.
2015-10-22Replace "if $(MAKE) then false" by "! $(MAKE)"Jean-Sébastien Pédron
2015-10-19Force rebuilds on Makefile/.app.src changesLoïc Hoguin
Everything will be rebuilt when the Makefile or any included Makefile (like Erlang.mk or plugins) change. Only the .app will be rebuilt when the .app.src file changes.
2015-09-27Fix "repetition-operator operand invalid" error in tests on OSXLoïc Hoguin
2015-09-27Replace sed -i with perl -ni in testsLoïc Hoguin
This fixes an issue on OSX where the OSX make 3.81 has a bug with multilines single quoted arguments to commands: it strips the backslash and newlines entirely. This makes it impossible to use sed -i properly. Since this is the test suite, we can instead use perl -ni, which can do the same and is available and work fine on all tested platforms.
2015-09-26Make tests work on more systemsLoïc Hoguin
Some systems do not have subsecond file modification detection capabilities. This is the case in OSX because the HFS+ file system has 1 second resolution. This is also the case in other OSes with particular file systems or even shells. For example, the "test" command in Bash does not support subsecond file times, while the ZSH one and the /usr/bin/test on my machine does. On those systems, with Bash, find -newer will work, but not test -nt. Tests were updated to reflect this. The test Makefile runs a series of commands to determine if subsecond resolution is available. When it is not, a sleep command will be executed before relevant operations in the tests. Because the Bash shell is often the default shell for Make, and because users of ZSH may want to avoid sleeping for no reasons, a new variable was introduced: ZSH=1. When provided when running tests, the shell will be switched to ZSH, and subsecond resolution will work as expected. Tests have been fixed to work with ZSH as well. All this only applies to tests, Erlang.mk itself is so far not affected by this issue.
2015-09-25Fix error messages appearing when using parse transformsLoïc Hoguin
The errors were happening in the rebar.config generation code. In addition to the fix, three tests were added: a project that uses a pt from its own code with -compile directives, a project that uses a pt from a dep with the pt set as ERLC_OPTS, and the inclusion of parse transform options in the generated rebar.config when compatibility is desired.
2015-09-18Fix test about auto adding an id key when LEGACY=1Loïc Hoguin
2015-09-18Add a test for the auto generation of id key in .app fileLoïc Hoguin
2015-09-18Test "no .app.src" by default, test legacy with LEGACY=1Loïc Hoguin
Also fixes two bugs with the new "no .app.src" method. All tests now pass with both methods. We can now test specific cases with make check c=$CASE.
2015-09-11Add a test for ERLC_EXCLUDELoïc Hoguin
2015-09-11Add another ERLC_OPTS test where we filter-out +debug_infoLoïc Hoguin
2015-09-11Add tests for ERLC_OPTSLoïc Hoguin