18#ifndef _QTESTFIXTURE_HH_
19#define _QTESTFIXTURE_HH_
22#include <QtTest/QtTest>
25# include <boost/thread.hpp>
27# include "gazebo/physics/physics.hh"
28# include "gazebo/rendering/rendering.hh"
33#include "gazebo/gazebo_config.h"
34#include "test_config.h"
48 protected:
void Load(
const std::string &_worldFilename,
bool _paused =
false,
49 bool _serverScene =
true,
bool _clientScene =
false);
61 const unsigned int _repeat = 10,
const unsigned int _ms = 30);
66 protected:
void GetMemInfo(
double &_resident,
double &_share);
70 private slots:
void initTestCase();
73 private slots:
void init();
76 private slots:
void cleanup();
79 private slots:
void cleanupTestCase();
85 private:
void RunServer(
const std::string &_worldFilename,
bool _paused,
101 private:
double residentStart;
104 private:
double shareStart;
#define NULL
Definition CommonTypes.hh:31
Base class for all Gazebo GUI unit tests.
Definition QTestFixture.hh:38
boost::thread * serverThread
Thread to run the Gazebo server.
Definition QTestFixture.hh:92
void SetPause(bool _pause)
Pause or unpause the world.
void GetMemInfo(double &_resident, double &_share)
Get memory information about the current process.
gazebo::Server * server
The Gazebo server, which is run in a thread.
Definition QTestFixture.hh:89
double resMaxPercentChange
Maximum allowed percent change in resident memory usage.
Definition QTestFixture.hh:95
void ProcessEventsAndDraw(QMainWindow *_mainWindow=NULL, const unsigned int _repeat=10, const unsigned int _ms=30)
Give the GUI time to process events and trigger main window repaint.
void Load(const std::string &_worldFilename, bool _paused=false, bool _serverScene=true, bool _clientScene=false)
Load a world.
double shareMaxPercentChange
Maximum allowed percent change in shared memory usage.
Definition QTestFixture.hh:98