8 #include <sys/socket.h>
55 std::cerr <<
"No such suite " <<
argv[1] << std::endl;
62 int t = strtol(
argv[2], &end, 0 );
63 if ( end ==
argv[2] && t == 0 ) {
66 std::cerr <<
"No such test " <<
argv[2]
67 <<
" in suite " <<
argv[1] << std::endl;
87 #pragma GCC diagnostic push
88 #pragma GCC diagnostic ignored "-Wold-style-cast"
97 std::cout <<
"--> FAILED: "<<
current;
99 std::cout <<
" (exit status " << WEXITSTATUS(
status_code ) <<
")";
101 std::cout <<
" (caught signal " << WTERMSIG(
status_code ) <<
")";
102 std::cout << std::endl;
108 #pragma GCC diagnostic pop
114 if ( line ==
"done" ) {
116 #pragma GCC diagnostic push
117 #pragma GCC diagnostic ignored "-Wold-style-cast"
124 #pragma GCC diagnostic pop
126 std::cout <<
"overall " <<
total_ok <<
"/"
128 <<
" ok" << std::endl;
135 std::cout <<
"." << std::flush;
141 if ( line[0] ==
's' ) {
142 if ( line[2] ==
'd' ) {
144 <<
" ok" << std::endl;
151 if ( line[2] ==
's' ) {
153 std::cout << std::string( line.begin() + 5, line.end() )
154 <<
": " << std::flush;
159 if ( line[0] ==
't' ) {
160 if ( line[2] ==
'd' ) {
164 if ( line[2] ==
's' ) {
166 current = std::string( line.begin() + 5, line.end() );
182 perror(
"waitpid failed" );
201 ::write(
status_fds[ 1 ], line.c_str(), line.length() );
208 std::string line(
"ack\n" );
210 ::write(
confirm_fds[ 1 ], line.c_str(), line.length() );
220 int main(
int _argc,
char **_argv )
236 if ( socketpair( PF_UNIX,SOCK_STREAM, 0,
status_fds ) )
238 if ( socketpair( PF_UNIX,SOCK_STREAM, 0,
confirm_fds ) )
257 int main(
int argc,
char **argv ) {