blob: 67d97e9a3862ab3638821dea40f07e6f40d27885 [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001This folder contains information and scripts to run a new test configuration for nightly builds
2and reporting the results to freeDiameter dashboard at:
3 http://www.freediameter.net/CDash/index.php?project=freeDiameter
4
5The information gathered here mostly comes from the following pages:
6 http://www.itk.org/Wiki/CMake_Testing_With_CTest
7 http://www.itk.org/Wiki/CMake_Scripting_Of_CTest
8 http://www.itk.org/Wiki/CTest:Buildserver
9
10=============
11
12INSTRUCTIONS to setup a new build slave for the freeDiameter buildserver:
13-- note: the build slave should have cmake version 2.8 at least so that ctest will update the source tree properly.
14
151) Install all dependencies for freeDiameter as follow:
16 a) Debian / Ubuntu: See the "prereqs.ubuntu" file
17 $ sudo aptitude install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.ubuntu -O - | grep -v -e "^#"`
18
19 b) FreeBSD: See the "prereqs.freebsd" file
20 - install base system and ports
21 - install freediameter dependencies as follow:
22 # pkg_add -r -v wget
23 # pkg_add -r -v `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.freebsd -O - | grep -v -e "^#"`
24
25 c) OpenSUSE:
26 $ sudo zypper install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.opensuse -O - | grep -v -e "^#"`
27
28 d) Fedora:
29 $ sudo yum install wget
30 $ sudo yum install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.fedora -O - | grep -v -e "^#"`
31
32 You may also have issues with SELinux later, an easy workaround is to disable it (until better solution)
33 # setenforce Permissive
34
35
362) Create the "test" database for app_acct test (we assume the tests are run as user "test" here)
37 - check INSTALL.FreeBSD file for specific PostgreSQL pre-install instructions.
38 - These are the instructions for Debian/Ubuntu/OpenSUSE, adjust as needed:
39 # su - postgres
40 # createuser --interactive test
41 Shall the new role be a superuser? (y/n) n
42 Shall the new role be allowed to create databases? (y/n) y
43 Shall the new role be allowed to create more new roles? (y/n) n
44 # logout
45 $ whoami
46 test
47 $ createdb test
48 $ psql test
49 psql (8.4.4)
50 Type "help" for help.
51
52 test=>
53 CREATE TABLE incoming_test (
54 recorded_on timestamp with time zone NOT NULL,
55 "Accounting-Record-Type" integer,
56 "Session-Id" bytea,
57 "Accounting-Record-Number" integer,
58 "Route-Record1" bytea,
59 "Route-Record2" bytea,
60 "Route-Record3" bytea,
61 "Route-Record4" bytea );
62 \q
63
64
653) Create a directory ~/fDtests
66 $ cd
67 $ mkdir fDtests
68 $ cd fDtests
69
704) Retrieve the runtests.sh script and save in this directory
71 $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/runtests.sh
72 $ chmod +x runtests.sh
73
745) Create a file local.cmake defining the name of the build slave in this directory also.
75 $ echo "SET(CTEST_SITE \""`hostname`"\")" > local.cmake
76
77 For FreeBSD, in addition do:
78 $ echo "set(CTEST_BUILD_OPTIONS \"\${CTEST_BUILD_OPTIONS} -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex\")" >> local.cmake
79
806) Run the runtests.sh script once to check it works properly (freeBSD might require: ln -s /usr/local/bin/bash /bin/bash)
81
827) Set up a crontab to run the script
83 $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/cronjob.sh
84 $ chmod +x cronjob.sh
85 $ crontab -l
860 0 * * * /home/test/fDtests/cronjob.sh > /home/test/fDtests/cronjob.log 2>&1