Mercurial > hg > freeDiameter
annotate contrib/nightly_tests/README @ 464:e16866e190a4
Updated tests documentation
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 30 Jul 2010 16:30:03 +0900 |
parents | 195096819152 |
children | 7a2c3e233449 |
rev | line source |
---|---|
344 | 1 This folder contains information and scripts to run a new test configuration for nightly builds |
408
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
2 and reporting the results to freeDiameter dashboard at: |
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
3 http://www.freediameter.net/CDash/index.php?project=freeDiameter |
344 | 4 |
408
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
5 The information gathered here mostly comes from the following pages: |
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
6 http://www.itk.org/Wiki/CMake_Testing_With_CTest |
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
7 http://www.itk.org/Wiki/CMake_Scripting_Of_CTest |
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
8 http://www.itk.org/Wiki/CTest:Buildserver |
344 | 9 |
408
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
10 ============= |
344 | 11 |
408
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
12 INSTRUCTIONS to setup a new build slave for the freeDiameter buildserver: |
344 | 13 |
464
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
14 1) Install all dependencies for freeDiameter as follow: |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
15 a) Debian / Ubuntu: See the "prereqs" file |
410
3ed2c84d9e23
Couple of fixes and improvements
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
408
diff
changeset
|
16 $ sudo aptitude install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs -O - | grep -v -e "^#"` |
464
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
17 |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
18 b) FreeBSD: |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
19 - install base system and ports |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
20 - install freediameter dependencies as follow: |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
21 # pkg_add -r -v wget bash cmake mercurial flex bison gnutls postgresql84-client postgresql84-server mysql50-client |
344 | 22 |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
23 2) Create the "test" database for app_acct test (we assume the tests are run as user "test" here) |
464
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
24 - check INSTALL.FreeBSD file for specific PostgreSQL pre-install instructions. |
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
25 - These are the instructions for Ubuntu, adjust as needed: |
353 | 26 # su - postgres |
27 # createuser test | |
28 Shall the new role be a superuser? (y/n) n | |
29 Shall the new role be allowed to create databases? (y/n) y | |
30 Shall the new role be allowed to create more new roles? (y/n) n | |
31 # logout | |
32 $ whoami | |
33 test | |
34 $ createdb test | |
35 $ psql test | |
36 psql (8.4.4) | |
37 Type "help" for help. | |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
38 |
353 | 39 test=> |
40 CREATE TABLE incoming_test ( | |
41 recorded_on timestamp with time zone NOT NULL, | |
42 "Accounting-Record-Type" integer, | |
43 "Session-Id" bytea, | |
44 "Accounting-Record-Number" integer, | |
45 "Route-Record1" bytea, | |
46 "Route-Record2" bytea, | |
47 "Route-Record3" bytea, | |
48 "Route-Record4" bytea ); | |
49 \q | |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
50 |
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
51 3) Create a directory ~/fDtests |
353 | 52 $ cd |
53 $ mkdir fDtests | |
54 $ cd fDtests | |
344 | 55 |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
56 4) Retrieve the runtests.sh script and save in this directory |
353 | 57 $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/runtests.sh |
58 $ chmod +x runtests.sh | |
344 | 59 |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
60 5) Create a file local.cmake defining the name of the build slave in this directory also. |
353 | 61 $ echo "SET(CTEST_SITE \""`hostname`"\")" > local.cmake |
417
195096819152
Cleanups in documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
410
diff
changeset
|
62 |
195096819152
Cleanups in documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
410
diff
changeset
|
63 For FreeBSD: |
195096819152
Cleanups in documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
410
diff
changeset
|
64 $ echo "set(CTEST_BUILD_OPTIONS \"\${CTEST_BUILD_OPTIONS} -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex\")" >> local.cmake |
344 | 65 |
464
e16866e190a4
Updated tests documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
417
diff
changeset
|
66 6) Run the script once to check it works properly (freeBSD might require: ln -s /usr/local/bin/bash /bin/bash) |
345 | 67 |
352
2521e4d91dac
Added the allext test
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
347
diff
changeset
|
68 7) Set up a crontab to run the script |
410
3ed2c84d9e23
Couple of fixes and improvements
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
408
diff
changeset
|
69 $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/cronjob.sh |
3ed2c84d9e23
Couple of fixes and improvements
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
408
diff
changeset
|
70 $ chmod +x cronjob.sh |
408
9a9a9e1ed4cb
Added cron job information
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
353
diff
changeset
|
71 $ crontab -l |
417
195096819152
Cleanups in documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
410
diff
changeset
|
72 0 0 * * * /home/test/fDtests/cronjob.sh > /home/test/fDtests/cronjob.log 2>&1 |