diff options
author | Loïc Hoguin <[email protected]> | 2019-06-22 21:45:48 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-06-22 21:45:48 +0200 |
commit | abaa729b46ed941aa1cbe84f74dbd15ae45823c3 (patch) | |
tree | 84dbba87ef0b9442864fa0dca0f7251d6a6367dc /test | |
parent | 3fb065e609dd4821618ab91f2b4987b8d3a55d9b (diff) | |
download | erlang.mk-abaa729b46ed941aa1cbe84f74dbd15ae45823c3.tar.gz erlang.mk-abaa729b46ed941aa1cbe84f74dbd15ae45823c3.tar.bz2 erlang.mk-abaa729b46ed941aa1cbe84f74dbd15ae45823c3.zip |
Fix the eunit-test-dir test on Windows
It was using os:cmd("echo ...") which on Windows preserves
spaces. One possible fix would have been to remove the space,
but I instead removed the use of os:cmd("echo ...") to avoid
similar issues in the future.
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_eunit.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/plugin_eunit.mk b/test/plugin_eunit.mk index e5fc197..8fa7b59 100644 --- a/test/plugin_eunit.mk +++ b/test/plugin_eunit.mk @@ -312,7 +312,7 @@ eunit-test-dir: init "-module($(APP))." \ "-ifdef(TEST)." \ "-include_lib(\"eunit/include/eunit.hrl\")." \ - "log_test() -> os:cmd(\"echo $(APP) >> eunit.log\")." \ + "log_test() -> file:write_file(\"eunit.log\", \"$(APP)\n\", [append])." \ "-endif." > $(APP)/src/$(APP).erl $i "Generate a module containing EUnit tests in TEST_DIR" @@ -320,7 +320,7 @@ eunit-test-dir: init $t printf "%s\n" \ "-module($(APP)_tests)." \ "-include_lib(\"eunit/include/eunit.hrl\")." \ - "log_test() -> os:cmd(\"echo $(APP)_tests >> eunit.log\")." > $(APP)/test/$(APP)_tests.erl + "log_test() -> file:write_file(\"eunit.log\", \"$(APP)_tests\n\", [append])." > $(APP)/test/$(APP)_tests.erl $i "Check that EUnit runs both tests" $t $(MAKE) -C $(APP) eunit | grep -c "2 tests passed." | grep -q 1 |