test_util.cpp File Reference

Useful functions for testers. Created on: Jul 27, 2010. More...

#include <iostream>
#include <stdexcept>
#include <sstream>
#include <cstdio>
#include <sys/wait.h>
#include <iomanip>
#include "Makefile.h"
#include "test_util.h"
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/code_converter.hpp>

Include dependency graph for test_util.cpp:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  makefile
namespace  makefile::tester

Functions

int exec_make (std::stringbuf &makeoutbuf, std::stringbuf &makeerrbuf)
 Executes make with capturing stderr and stdout and feeding the makefile via stdin.


Detailed Description

Useful functions for testers. Created on: Jul 27, 2010.

Author:
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>

Definition in file test_util.cpp.


Function Documentation

int makefile::tester::exec_make std::stringbuf &  makeoutbuf,
std::stringbuf &  makeerrbuf
 

Executes make with capturing stderr and stdout and feeding the makefile via stdin.

Parameters:
argv as required by execvp (execvp takes a NULL-terminated array of null-terminated strings.) See manpage.
makeoutbuf stdout of make goes here.
makeerrbuf stderr of make goes here.
Returns:
return value of make. Uses macros to extract the value from wait(). See man wait.

Definition at line 50 of file test_util.cpp.

Referenced by createfiles_make(), and makefile::tester::Test::run().


Generated on Thu Aug 28 01:25:42 2014 for Hugintrunk by  doxygen 1.3.9.1