17 #include <CUnit/CUnit.h>
18 #include <CUnit/Automated.h>
23 #include <libfocunit.h>
24 #include <libfodbreposysconf.h>
31 #include <interface.h>
33 #include <scheduler.h>
81 {
"InterfaceThread", NULL, NULL, (CU_SetUpFunc)
init_suite, (CU_TearDownFunc)
clean_suite, tests_interface_thread },
92 int main(
int argc,
char *argv[] )
94 #if !GLIB_CHECK_VERSION(2,35,0)
106 struct passwd* pw = getpwuid(getuid());
107 struct group* gr = getgrgid(getgid());
108 gchar* confpath = g_strdup_printf(
"%s/fossology.conf", testdb);
109 FILE* f = fopen(confpath,
"w");
113 "[FOSSOLOGY]\nport = 12354\naddress = localhost\ndepth = 0\npath = %s/repo\n"
114 "[REPOSITORY]\nlocalhost[] = * 00 ff\n"
115 "[SCHEDULER]\nagent_death_timer = 10\nagent_update_interval = 15\nagent_update_number = 1\n"
116 "[DIRECTORIES]\nMODDIR = %s\nLOGDIR = %s\nPROJECTGROUP = %s\nPROJECTUSER = %s\n",
117 testdb, testdb, testdb,
118 gr ? gr->gr_name : PROJECT_GROUP,
119 pw ? pw->pw_name : PROJECT_USER);
125 int result = focunit_main(argc, argv,
"scheduler_Tests",
suites);
127 dropTestEnvironment(
dbManager, AGENT_DIR, NULL);
Header file with agent related operations.
int main(int argc, char *argv[])
main test function
CU_SuiteInfo suites[]
all test suites for delagent
Event handling operations.
char * get_sysconfdir()
get sysconfig dir path just created by create_db_repo_sysconf()
The main FOSSology C library.
log_t * log_new(gchar *log_name, gchar *pro_name, pid_t pro_pid)
Creates a new log.
void log_destroy(log_t *log)
Free memory associated with the log file.
fo_dbManager * dbManager
fo_dbManager object