diff options
author | Gabriele Santomaggio <G.santomaggio@gmail.com> | 2017-04-12 16:36:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 16:36:17 +0200 |
commit | af1f6ee6f3c911ea87c82b9e61ddf0a5ad9e5ed6 (patch) | |
tree | dae05bc8fa0855f745552b31f62c196357d15429 | |
parent | fcc0bd000c1396f14a9a40c2916bc673f46755ff (diff) | |
parent | 73cc735709e055490b11d83712aea5a639a100b3 (diff) | |
download | erlang-sd_notify-af1f6ee6f3c911ea87c82b9e61ddf0a5ad9e5ed6.tar.gz |
Merge pull request #25 from lemenkov/ci_tests_centos
Ci tests centos
-rw-r--r-- | .travis.yml | 21 | ||||
-rw-r--r-- | test/sd_notify_test.erl | 4 |
2 files changed, 8 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml index 7e37776..e72c806 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,14 @@ sudo: required -language: erlang - -otp_release: -- 18.0 -- 18.1 -- 18.2 -- 18.2.1 -- 18.3 -- 19.0 -- 19.1 - services: - docker before_install: -- kerl list installations -- docker build -t build_ubuntu https://raw.githubusercontent.com/systemd/erlang-sd_notify/master/docker/ubuntu_18_3/Dockerfile -- docker images +- docker build -t build_ubuntu_18_3 docker/ubuntu_18_3/ +- docker build -t build_centos_18_3 docker/centos_18_3/ +- docker build -t build_centos_19 docker/centos_19/ script: -- docker run -v $TRAVIS_BUILD_DIR:/home/sd/ build_ubuntu /bin/sh -c "cd /home/sd/; make all; make test" +- docker run -v $TRAVIS_BUILD_DIR:/home/sd/ build_ubuntu_18_3 /bin/sh -c "cd /home/sd/; make all; make test" +- docker run -v $TRAVIS_BUILD_DIR:/home/sd/ build_centos_18_3 /bin/sh -c "cd /home/sd/; make all; make test" +- docker run -v $TRAVIS_BUILD_DIR:/home/sd/ build_centos_19 /bin/sh -c "cd /home/sd/; make all; make test" diff --git a/test/sd_notify_test.erl b/test/sd_notify_test.erl index 32a8ac6..72a4d3f 100644 --- a/test/sd_notify_test.erl +++ b/test/sd_notify_test.erl @@ -9,7 +9,6 @@ sd_notify_test_() -> sd_notify_test_local("19") -> {ok, CWD} = file:get_cwd(), FakeNotifyUnixSockName = CWD ++ "/fake-notify-udp-sock-" ++ integer_to_list(erlang:phash2(make_ref())), - TestMessage = integer_to_list(erlang:phash2(make_ref())), {ok, FakeNotifyUnixSock} = gen_udp:open(0, [{ifaddr, {local, FakeNotifyUnixSockName}}, {active, false}, list]), os:putenv("NOTIFY_SOCKET", FakeNotifyUnixSockName), @@ -20,7 +19,8 @@ sd_notify_test_local("19") -> { "Try sending message", fun() -> - sd_notify:sd_pid_notify_with_fds(0, 0, TestMessage, [1, 2, 3]), + TestMessage = integer_to_list(erlang:phash2(make_ref())), + 1 = sd_notify:sd_pid_notify_with_fds(0, 0, TestMessage, []), {ok, {_Address, _Port, Packet}} = gen_udp:recv(FakeNotifyUnixSock, length(TestMessage), 1000), ?assertEqual(TestMessage, Packet) end |