2 #Copyright (C) 2009-2010 :
3 # Gabes Jean, naparuba@gmail.com
4 # Gerhard Lausser, Gerhard.Lausser@consol.de
6 #This file is part of Shinken.
8 #Shinken is free software: you can redistribute it and/or modify
9 #it under the terms of the GNU Affero General Public License as published by
10 #the Free Software Foundation, either version 3 of the License, or
11 #(at your option) any later version.
13 #Shinken is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU Affero General Public License for more details.
18 #You should have received a copy of the GNU Affero General Public License
19 #along with Shinken. If not, see <http://www.gnu.org/licenses/>.
22 DIR
=$
(cd $
(dirname "$0"); pwd)
26 #delete the resul of nosetest, for coverage
31 function launch_and_assert
{
33 nosetests
-v -s --with-xunit --with-coverage .
/$SCRIPT
37 echo "Error : the test $SCRIPT failed"
42 #Launching only quick tests for quick regression check
43 #for ii in `ls -1 test_*py`; do echo "Launching Test $ii" && python $ii; done
44 launch_and_assert test_services.py
45 launch_and_assert test_hosts.py
46 launch_and_assert test_host_missing_adress.py
47 launch_and_assert test_not_hostname.py
48 launch_and_assert test_bad_contact_call.py
49 launch_and_assert test_action.py
50 launch_and_assert test_config.py
51 launch_and_assert test_dependencies.py
52 launch_and_assert test_npcdmod.py
53 launch_and_assert test_problem_impact.py
54 launch_and_assert test_timeperiods.py
55 launch_and_assert test_command.py
56 launch_and_assert test_module_simplelog.py
57 launch_and_assert test_module_service_perfdata.py
58 launch_and_assert test_module_host_perfdata.py
59 launch_and_assert test_module_pickle_retention.py
60 launch_and_assert test_service_tpl_on_host_tpl.py
61 launch_and_assert test_db.py
62 launch_and_assert test_macroresolver.py
63 launch_and_assert test_complex_hostgroups.py
64 launch_and_assert test_resultmodulation.py
65 launch_and_assert test_satellites.py
66 launch_and_assert test_illegal_names.py
67 launch_and_assert test_service_generators.py
68 launch_and_assert test_notifway.py
69 launch_and_assert test_eventids.py
70 launch_and_assert test_obsess.py
71 launch_and_assert test_commands_perfdata.py
72 launch_and_assert test_notification_warning.py
73 launch_and_assert test_timeperiod_inheritance.py
74 launch_and_assert test_bad_timeperiods.py
75 launch_and_assert test_maintenance_period.py
76 launch_and_assert test_external_commands.py
77 launch_and_assert test_on_demand_event_handlers.py
78 launch_and_assert test_business_correlator.py
79 launch_and_assert test_properties.py
80 launch_and_assert test_realms.py
81 launch_and_assert test_host_without_cmd.py
82 launch_and_assert test_escalations.py
83 launch_and_assert test_notifications.py
84 launch_and_assert test_contactdowntimes.py
85 launch_and_assert test_nullinheritance.py
87 #Live status is a bit longer than the previous, so we put it at the end.
88 launch_and_assert test_livestatus.py
90 # And create the coverage file
91 coverage xml
--omit=/usr
/lib
93 echo "All quick unit tests passed :)"
94 echo "But please launch a test.sh pass too for long tests too!"