FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
testRun.h
1 /*********************************************************************
2 Copyright (C) 2011 Hewlett-Packard Development Company, L.P.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 version 2 as published by the Free Software Foundation.
7 
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 *********************************************************************/
17 #ifndef RUN_TESTS_H
18 #define RUN_TESTS_H
19 
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <assert.h>
23 #include "CUnit/CUnit.h"
24 #include "CUnit/Automated.h"
25 
26 #include "libfocunit.h"
27 #include "libfodbreposysconf.h"
28 
29 /* for util.c, start */
30 extern CU_TestInfo testcases_ListFolders[];
31 extern CU_TestInfo testcases_DeleteFolders[];
32 extern CU_TestInfo testcases_ReadParameter[];
33 
34 /* Database Init and Clean */
35 int DelagentDBInit();
36 int DelagentDBClean();
37 /* Database and RepositoryInit and Clean */
38 int DelagentInit();
39 int DelagentClean();
40 
41 /* for util.c, end */
42 
47 #if CU_VERSION_P == 213
48 CU_SuiteInfo suites[] = {
49  {"Testing the function ListFolders:", NULL, NULL, (CU_SetUpFunc)DelagentDBInit, (CU_TearDownFunc)DelagentClean, testcases_ListFolders},
50  {"Testing the function DeleteFolders:", NULL, NULL, (CU_SetUpFunc)DelagentInit, (CU_TearDownFunc)DelagentClean, testcases_DeleteFolders},
51  CU_SUITE_INFO_NULL
52 };
53 #else
54 CU_SuiteInfo suites[] = {
55  {"Testing the function ListFolders:", DelagentDBInit, DelagentClean, testcases_ListFolders},
56  {"Testing the function DeleteFolders:", DelagentInit, DelagentClean, testcases_DeleteFolders},
57  CU_SUITE_INFO_NULL
58 };
59 #endif
60 
61 #endif
int DelagentDBInit()
initialize db
Definition: testRun.c:68
CU_SuiteInfo suites[]
all test suites for delagent
Definition: testRun.h:54
int DelagentInit()
init db and repo
Definition: testRun.c:123
int DelagentClean()
clean db
Definition: testRun.c:113
CU_TestInfo testcases_ListFolders[]
testcases for function ListFolders
CU_TestInfo testcases_DeleteFolders[]
testcases for function Delete