9 #include "CUnit/CUnit.h"
25 char *pkg =
"./testdata/fossology-1.2.0-1.el5.i386.rpm";
33 rpmReadConfigFiles(NULL, NULL);
38 CU_ASSERT_STRING_EQUAL(pi->
pkgName,
"fossology");
39 CU_ASSERT_STRING_EQUAL(pi->
pkgArch,
"i386");
40 CU_ASSERT_STRING_EQUAL(pi->
version,
"1.2.0");
41 CU_ASSERT_STRING_EQUAL(pi->
license,
"GPLv2");
42 CU_ASSERT_STRING_EQUAL(pi->
group,
"Applications/Engineering");
43 CU_ASSERT_STRING_EQUAL(pi->
release,
"1.el5");
44 CU_ASSERT_STRING_EQUAL(pi->
buildDate,
"Mon Jul 12 03:30:32 2010");
45 CU_ASSERT_STRING_EQUAL(pi->
url,
"http://www.fossology.org");
46 CU_ASSERT_STRING_EQUAL(pi->
sourceRPM,
"fossology-1.2.0-1.el5.src.rpm");
57 CU_ASSERT_EQUAL(
Result, predictValue);
68 char *pkg =
"./testdata/fossology_1.4.1.dsc";
72 int predictValue = -1;
76 rpmReadConfigFiles(NULL, NULL);
85 CU_ASSERT_EQUAL(
Result, predictValue);
103 int predictValue = -1;
104 rpmReadConfigFiles(NULL, NULL);
117 CU_ASSERT_EQUAL(
Result, predictValue);
PGconn * fo_dbconnect(char *DBConfFile, char **ErrorBuf)
Connect to a database. The default is Db.conf.
int GetMetadata(char *pkg, struct rpmpkginfo *pi)
Get RPM package info.
PGconn * db_conn
The connection to Database.
Holds meta info of rpm packages.
char buildDate[128]
Package build date.
char group[128]
Package group.
char version[64]
Package version.
char pkgName[256]
RPM package name.
char license[512]
RPM licenses.
char pkgArch[64]
Package architecture.
char sourceRPM[256]
Package source.
int req_size
Package dependency list size.
char url[256]
Package link.
char release[64]
Package release.
char ** requires
Package dependency list.
static int Result
Result of calls.