FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
testRun.c File Reference

Unit tests for scheduler. More...

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <CUnit/CUnit.h>
#include <CUnit/Automated.h>
#include <gio/gio.h>
#include <glib.h>
#include <libfossology.h>
#include <testRun.h>
#include <agent.h>
#include <database.h>
#include <event.h>
#include <host.h>
#include <interface.h>
#include <logging.h>
#include <scheduler.h>
Include dependency graph for testRun.c:

Go to the source code of this file.

Functions

int init_suite (void)
 
int clean_suite (void)
 
int main (int argc, char *argv[])
 

Variables

char * testdb = NULL
 
CU_SuiteInfo suites []
 all test suites for delagent More...
 

Detailed Description

Unit tests for scheduler.

Definition in file testRun.c.

Function Documentation

int clean_suite ( void  )

Since we changed the log file in the initializations, we need to close it and set the pointer to NULL so that the logging system can reset it to the correct value.

Returns
-1 of failure, 0 on success

Definition at line 76 of file testRun.c.

int init_suite ( void  )

Check if main log is not NULL, destroy it else create a new log on ./founit.log

Returns
-1 on failure, 0 of success

Definition at line 54 of file testRun.c.

Variable Documentation

CU_SuiteInfo suites[]
Initial value:
=
{
{"Host", init_suite, clean_suite, tests_host },
{"Interface", init_suite, clean_suite, tests_interface },
{"InterfaceThread", init_suite, clean_suite, tests_interface_thread },
{"Database",init_suite,clean_suite, tests_database },
{"Email",init_suite,clean_suite, tests_email },
{"Scheduler", init_suite,clean_suite, tests_scheduler },
{"MetaAgent", init_suite, clean_suite, tests_meta_agent },
{"Agent", init_suite, clean_suite, tests_agent },
{"Event",init_suite,clean_suite, tests_event },
CU_SUITE_INFO_NULL
}
int init_suite(void)
Definition: testRun.c:54
int clean_suite(void)
Definition: testRun.c:76

all test suites for delagent

array of every test suite. There should be at least one test suite for every library includes in libfossology.

Todo:
Fix fossscheduler_testcases

all test suites for delagent

Definition at line 107 of file testRun.c.