FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
api for db, sysconfig, repo. you can create/drop a DB/sysconfig/repo More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <libfossscheduler.h>
#include <libfossdb.h>
#include "libfodbreposysconf.h"
Go to the source code of this file.
Macros | |
#define | TESTDBDIR "../../../testing/db/" |
#define | CREATEDB TESTDBDIR "/createTestDB.php" |
Functions | |
fo_dbManager * | createTestEnvironment (const char *srcDirs, const char *doConnectAsAgent, int initDbTables) |
void | dropTestEnvironment (fo_dbManager *dbManager, const char *srcDir, const char *doConnectAsAgent) |
static void | command_output (char *command) |
get command output More... | |
int | create_db_repo_sysconf (int type, char *agent_name, char *sysconfdir) |
void | drop_db_repo_sysconf (char *DBName) |
drop db, sysconfig dir and repo More... | |
char * | get_test_name () |
get the test name just created by create_db_repo_sysconf() More... | |
char * | get_db_name () |
get the DB name just created by create_db_repo_sysconf() More... | |
char * | get_sysconfdir () |
get sysconfig dir path just created by create_db_repo_sysconf() More... | |
char * | get_dbconf () |
get Db.conf path just created by create_db_repo_sysconf() More... | |
char * | get_confFile () |
char * | get_repodir () |
get repo path just created by create_db_repo_sysconf() More... | |
char * | createTestConfDir (char *cwd, char *agentName) |
create a dummy sysConfDir for a given agent More... | |
Variables | |
static char * | Sysconf = NULL |
static char | DBName [ARRAY_LENGTH] |
static char | DBConf [ARRAY_LENGTH] |
static char | RepoDir [ARRAY_LENGTH] |
static char | confFile [ARRAY_LENGTH] |
api for db, sysconfig, repo. you can create/drop a DB/sysconfig/repo
Definition in file libfodbreposysconf.c.
|
static |
get command output
char | *command - the command will be executed |
Definition at line 121 of file libfodbreposysconf.c.
int create_db_repo_sysconf | ( | int | type, |
char * | agent_name, | ||
char * | sysconfdir | ||
) |
\biref create DB, the db name looks like fosstestxxxxx
int | type - 0 on create db, sysconf dir and repository, the db is empty 1 on create db, sysconf dir and repository, the db is initialized |
Definition at line 154 of file libfodbreposysconf.c.
char* createTestConfDir | ( | char * | cwd, |
char * | agentName | ||
) |
create a dummy sysConfDir for a given agent
char* | cwd - Current directory of the agent's Unit test |
char* | agentName - Name of the agent for which the directory is to be created |
Definition at line 338 of file libfodbreposysconf.c.
void drop_db_repo_sysconf | ( | char * | DBName | ) |
drop db, sysconfig dir and repo
char | *DBName - the db name, looks like fosstestxxxx |
Definition at line 227 of file libfodbreposysconf.c.
char* get_db_name | ( | ) |
get the DB name just created by create_db_repo_sysconf()
Definition at line 261 of file libfodbreposysconf.c.
char* get_dbconf | ( | ) |
get Db.conf path just created by create_db_repo_sysconf()
Definition at line 288 of file libfodbreposysconf.c.
char* get_repodir | ( | ) |
get repo path just created by create_db_repo_sysconf()
Definition at line 304 of file libfodbreposysconf.c.
char* get_sysconfdir | ( | ) |
get sysconfig dir path just created by create_db_repo_sysconf()
Definition at line 276 of file libfodbreposysconf.c.
char* get_test_name | ( | ) |
get the test name just created by create_db_repo_sysconf()
Definition at line 248 of file libfodbreposysconf.c.