From cbc740eeb1a6149cc84b501dec5a3daf5514cc4f Mon Sep 17 00:00:00 2001 From: Pawel Pikula Date: Mon, 3 Aug 2015 12:04:43 +0200 Subject: [PATCH 1/4] try to use new travis infrastructure --- .travis.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17bce81569c..6cd166a0730 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,15 @@ language: erlang +sudo: required +addons: + apt: + packages: + - libpam0g-dev + - libexpat1-dev + - odbc-postgresql + - libmyodbc + - slapd + - ldap-utils before_install: - - sudo apt-get update - - sudo apt-get install libpam0g-dev libexpat1-dev odbc-postgresql libmyodbc - - if [ $PRESET = 'ldap_mnesia' ]; then sudo apt-get install slapd ldap-utils; fi - tools/travis-generate-pass.sh install: - tools/travis-build.sh From cdcec911d9506d7930fa9a62b7cf496012a95336 Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Wed, 14 Oct 2015 11:28:14 +0200 Subject: [PATCH 2/4] update .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 35bdbde2932..8c2930eda6e 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,9 @@ ebin/ #idea .idea/ *.iml +dialyzer/ +site/ +etc/ +log/ +Mnesia.* +tags From 9af1cbd1a8e4a18151d61267d92efa95de654a50 Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Wed, 14 Oct 2015 12:06:18 +0200 Subject: [PATCH 3/4] dialyzer on travis --- .travis.yml | 3 +- tools/travis-test.sh | 93 ++++++++++++++++++++++++-------------------- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cd166a0730..fb49a374f64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,7 @@ env: - PRESET=ldap_mnesia DB=mnesia REL_CONFIG=minimal - PRESET=riak_mnesia DB=riak REL_CONFIG=with-riak - PRESET=external_mnesia DB=mnesia REL_CONFIG=minimal + - PRESET=dialyzer_only matrix: include: @@ -63,4 +64,4 @@ after_failure: notifications: webhooks: # trigger Buildtime Trend Service to parse Travis CI log - - https://buildtimetrend.herokuapp.com/travis \ No newline at end of file + - https://buildtimetrend.herokuapp.com/travis diff --git a/tools/travis-test.sh b/tools/travis-test.sh index 814fd206700..ddcc59dc005 100755 --- a/tools/travis-test.sh +++ b/tools/travis-test.sh @@ -4,58 +4,65 @@ source tools/travis-common-vars.sh echo ${BASE} -SUMMARIES_DIRS=${BASE}'/test/ejabberd_tests/ct_report/ct_run*' +if [ $PRESET = "dialyzer_only" ]; then + make dialyzer -echo "############################" -echo "Running embeded common tests" -echo "############################" +else -make ct -EMBEDED_CT_STATUS=$? + SUMMARIES_DIRS=${BASE}'/test/ejabberd_tests/ct_report/ct_run*' -echo "############################" -echo "Running ejabberd_tests" -echo "############################" + echo "############################" + echo "Running embeded common tests" + echo "############################" -echo -n "starting MongooseIM node 1: " -${EJD1CTL} start && echo ok || echo failed -echo -n "starting MongooseIM node 2: " -${EJD2CTL} start && echo ok || echo failed -sleep 1 -echo -n "pinging MongooseIM node 1: " -${EJD1CTL} ping -echo -n "pinging MongooseIM node 2: " -${EJD2CTL} ping + make ct + EMBEDED_CT_STATUS=$? -make cover_test_preset TESTSPEC=default.spec PRESET=$PRESET + echo "############################" + echo "Running ejabberd_tests" + echo "############################" -RAN_TESTS=`cat /tmp/ct_count` + echo -n "starting MongooseIM node 1: " + ${EJD1CTL} start && echo ok || echo failed + echo -n "starting MongooseIM node 2: " + ${EJD2CTL} start && echo ok || echo failed + sleep 1 + echo -n "pinging MongooseIM node 1: " + ${EJD1CTL} ping + echo -n "pinging MongooseIM node 2: " + ${EJD2CTL} ping -echo -n "stopping MongooseIM node 1: " -${EJD1CTL} stop -echo -n "stopping MongooseIM node 2: " -${EJD2CTL} stop + make cover_test_preset TESTSPEC=default.spec PRESET=$PRESET -if [ `uname` = "Darwin" ]; then - SUMMARIES_DIR=`ls -dt ${SUMMARIES_DIRS} | head -n ${RAN_TESTS}` -else - SUMMARIES_DIR=`eval ls -d ${SUMMARIES_DIRS} --sort time | head -n ${RAN_TESTS}` -fi + RAN_TESTS=`cat /tmp/ct_count` -${TOOLS}/summarise-ct-results ${SUMMARIES_DIR} -CT_STATUS=$? + echo -n "stopping MongooseIM node 1: " + ${EJD1CTL} stop + echo -n "stopping MongooseIM node 2: " + ${EJD2CTL} stop -echo -echo "All tests done." -TEST_STATUSES="${EMBEDED_CT_STATUS}${CT_STATUS}" + if [ `uname` = "Darwin" ]; then + SUMMARIES_DIR=`ls -dt ${SUMMARIES_DIRS} | head -n ${RAN_TESTS}` + else + SUMMARIES_DIR=`eval ls -d ${SUMMARIES_DIRS} --sort time | head -n ${RAN_TESTS}` + fi -if [ ${TEST_STATUSES} = "00" ] -then - RESULT=0 - echo "Build succeeded" -else - RESULT=1 - echo "Build failed - ${TEST_STATUSES}" -fi + ${TOOLS}/summarise-ct-results ${SUMMARIES_DIR} + CT_STATUS=$? -exit ${RESULT} + echo + echo "All tests done." + TEST_STATUSES="${EMBEDED_CT_STATUS}${CT_STATUS}" + + if [ ${TEST_STATUSES} = "00" ] + then + RESULT=0 + echo "Build succeeded" + else + RESULT=1 + echo "Build failed - ${TEST_STATUSES}" + fi + + exit ${RESULT} + +fi From 629c3f718adea3b29983152e37e74b532e727eba Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Wed, 17 Feb 2016 15:15:29 +0100 Subject: [PATCH 4/4] add dialyzer output cacheing to travis --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index fb49a374f64..4c8cbc070a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,3 +65,11 @@ notifications: webhooks: # trigger Buildtime Trend Service to parse Travis CI log - https://buildtimetrend.herokuapp.com/travis + +cache: + directories: + - dialyzer + +before_cache: + - rm -f dialyzer/apps.* +