Fix test driver return value & disable nodeinfotest on non-linux (John Levon)

This commit is contained in:
Daniel P. Berrange 2008-12-18 12:08:05 +00:00
parent ca05a72db6
commit 6313259ada
3 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,9 @@
Thu Dec 18 12:07:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/test.c: Fix error return value
* tests/nodeinfotest.c: Disable code compile completely on
non-linux (John Levon)
Thu Dec 18 11:59:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* qemud/remote.c: Fix unused variable compile warning when polkit

View File

@ -1299,7 +1299,7 @@ static char *testGetOSType(virDomainPtr dom) {
static unsigned long testGetMaxMemory(virDomainPtr domain) {
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
unsigned long ret = -1;
unsigned long ret = 0;
testDriverLock(privconn);
privdom = virDomainFindByName(&privconn->domains,

View File

@ -10,6 +10,16 @@
#include "nodeinfo.h"
#include "util.h"
#ifndef __linux__
static int
mymain(int argc, char **argv)
{
exit (77); /* means 'test skipped' for automake */
}
#else
static char *progname;
static char *abs_srcdir;
@ -78,9 +88,6 @@ mymain(int argc, char **argv)
"nodeinfo-6",
};
char cwd[PATH_MAX];
#ifndef __linux__
exit (77); /* means 'test skipped' for automake */
#endif
abs_srcdir = getenv("abs_srcdir");
if (!abs_srcdir)
@ -102,4 +109,7 @@ mymain(int argc, char **argv)
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
#endif /* __linux__ */
VIRT_TEST_MAIN(mymain)