FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
run_tests.c
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright (C) 2014, Siemens AG
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 *********************************************************************/
24 /* local includes */
25 #include <libfocunit.h>
26 
27 /* std library includes */
28 #include <stdio.h>
29 #include <assert.h>
30 
31 /* cunit includes */
32 #include <CUnit/CUnit.h>
33 #include <CUnit/Automated.h>
34 
35 #include "nomos.h"
36 #include "util.h"
37 #include "list.h"
38 #include "licenses.h"
39 #include "process.h"
40 #include "nomos_regex.h"
41 #include "_autodefs.h"
42 //nomos globals
43 extern licText_t licText[];
44 struct globals gl;
45 struct curScan cur;
46 
47 /* ************************************************************************** */
48 /* **** test case sets ****************************************************** */
49 /* ************************************************************************** */
50 
51 extern CU_TestInfo nomos_gap_testcases[];
52 extern CU_TestInfo doctorBuffer_testcases[];
53 /* ************************************************************************** */
54 /* **** create test suite *************************************************** */
55 /* ************************************************************************** */
56 
57 #if CU_VERSION_P == 213
58 CU_SuiteInfo suites[] =
59 {
60  {"Testing process:", NULL, NULL, NULL, NULL, nomos_gap_testcases},
61  {"Testing doctor Buffer:", NULL, NULL, NULL, NULL, doctorBuffer_testcases},
62  CU_SUITE_INFO_NULL
63 };
64 #else
65 CU_SuiteInfo suites[] =
66 {
67  {"Testing process:", NULL, NULL, nomos_gap_testcases},
68  {"Testing doctor Buffer:", NULL, NULL, doctorBuffer_testcases},
69  CU_SUITE_INFO_NULL
70 };
71 #endif
72 
73 /* ************************************************************************** */
74 /* **** main test functions ************************************************* */
75 /* ************************************************************************** */
76 
77 int main(int argc, char** argv)
78 {
79  return focunit_main(argc, argv, "nomos_Util_Tests", suites);
80 }
Structure holding data truly global in that it remains consistent for each file scanned.
Definition: nomos.h:357
CU_SuiteInfo suites[]
all test suites for delagent
Definition: run_tests.c:65
licText_t licText[]
Nomos header file.
Struct that tracks state related to current file being scanned.
Definition: nomos.h:404