this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove unused stuff from tests/

-769
-30
tests/CMakeLists.txt
··· 1 - project(runtest) 2 - 3 - cmake_minimum_required(VERSION 2.4.0) 4 - if(COMMAND cmake_policy) 5 - cmake_policy(SET CMP0003 NEW) 6 - endif(COMMAND cmake_policy) 7 - 8 - #if (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 9 - # message(FATAL_ERROR "Clang is the only supported compiler.") 10 - #endif (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 11 - 12 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") 13 - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC") 14 - 15 - set(runtest_SRCS 16 - runtest.cpp 17 - termcolor.cpp 18 - pstream.cpp 19 - boostxml.cpp 20 - timer.cpp 21 - ) 22 - 23 - add_executable(runtest ${runtest_SRCS}) 24 - target_link_libraries(runtest sshcxx) 25 - 26 - add_subdirectory(libsshcxx) 27 - add_dependencies(runtest sshcxx) 28 - 29 - #install(TARGETS runtest DESTINATION "lib${SUFFIX}/darling") 30 -
-41
tests/boostxml.cpp
··· 1 - #include "boostxml.h" 2 - 3 - boostxml::boostxml() 4 - { 5 - m_xml << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 6 - m_xml << "<TestLog>\n"; 7 - m_xml << "\t<TestSuite name=\"Darling\">\n"; 8 - } 9 - 10 - void boostxml::addOK(const std::string& path, int time) 11 - { 12 - m_xml << "\t\t<TestCase name=\"" << extractName(path) << "\">\n"; 13 - m_xml << "\t\t\t<TestingTime>" << time << "</TestingTime>\n"; 14 - m_xml << "\t\t</TestCase>\n"; 15 - } 16 - 17 - void boostxml::addFailure(const std::string& path, int time, const std::string& error) 18 - { 19 - m_xml << "\t\t<TestCase name=\"" << extractName(path) << "\">\n"; 20 - m_xml << "\t\t\t<Error file=\"" << path << "\" line=\"0\">\n"; 21 - m_xml << "<![CDATA[" << error << "]]>\n"; 22 - m_xml << "\t\t\t</Error>\n"; 23 - m_xml << "\t\t\t<TestingTime>" << time << "</TestingTime>\n"; 24 - m_xml << "\t\t</TestCase>\n"; 25 - } 26 - 27 - std::string boostxml::str() 28 - { 29 - m_xml << "\t</TestSuite>\n</TestLog>\n"; 30 - return m_xml.str(); 31 - } 32 - 33 - std::string boostxml::extractName(const std::string& path) 34 - { 35 - size_t pos = path.rfind('/'); 36 - if (pos == std::string::npos) 37 - return path; 38 - else 39 - return path.substr(pos+1); 40 - } 41 -
-21
tests/boostxml.h
··· 1 - #ifndef BOOSTXML_H 2 - #define BOOSTXML_H 3 - #include <sstream> 4 - #include <string> 5 - 6 - class boostxml 7 - { 8 - public: 9 - boostxml(); 10 - std::string str(); 11 - 12 - void addOK(const std::string& path, int time); 13 - void addFailure(const std::string& path, int time, const std::string& error); 14 - private: 15 - static std::string extractName(const std::string& path); 16 - private: 17 - std::stringstream m_xml; 18 - }; 19 - 20 - #endif 21 -
-64
tests/exceptions.h
··· 1 - #ifndef __EXCEPTIONS_H 2 - #define __EXCEPTIONS_H 3 - #include <stdexcept> 4 - #include <sstream> 5 - 6 - class compile_error : public std::runtime_error 7 - { 8 - public: 9 - compile_error(const std::string& err) 10 - : std::runtime_error(err) 11 - { 12 - } 13 - }; 14 - 15 - class different_output_error : public std::exception 16 - { 17 - public: 18 - different_output_error(const std::string& remote, const std::string& local) 19 - : m_remote(remote), m_local(local) 20 - { 21 - } 22 - 23 - virtual const char* what() const throw() override 24 - { 25 - return "different_output_error"; 26 - } 27 - 28 - const std::string& local() const { return m_local; } 29 - const std::string& remote() const { return m_remote; } 30 - private: 31 - std::string m_local, m_remote; 32 - }; 33 - 34 - class nonzero_exit_error : public std::exception 35 - { 36 - public: 37 - nonzero_exit_error(bool remote, const std::string& output) 38 - : m_remote(remote), m_output(output) 39 - { 40 - std::stringstream ss; 41 - ss << "Non-zero exit status from "; 42 - if (m_remote) 43 - ss << "remotely"; 44 - else 45 - ss << "locally"; 46 - ss << " run binary"; 47 - m_msg = ss.str(); 48 - } 49 - 50 - bool remote() const { return m_remote; } 51 - const std::string& output() const { return m_output; } 52 - 53 - virtual const char* what() const throw() override 54 - { 55 - return m_msg.c_str(); 56 - } 57 - private: 58 - bool m_remote; 59 - std::string m_output, m_msg; 60 - }; 61 - 62 - #endif 63 - 64 -
-39
tests/pstream.cpp
··· 1 - #include "pstream.h" 2 - #include <cstdio> 3 - 4 - 5 - pstream::pstream(FILE* pipe) 6 - : m_pipe(pipe) 7 - { 8 - } 9 - 10 - pstream::~pstream() 11 - { 12 - if (m_pipe) 13 - wait(); 14 - } 15 - 16 - pstream* pstream::popen(const std::string& cmd) 17 - { 18 - FILE* pipe = ::popen(cmd.c_str(), "r"); 19 - if (!pipe) 20 - return nullptr; 21 - return new pstream(pipe); 22 - } 23 - 24 - std::istream* pstream::in() 25 - { 26 - return new std::istream(this); 27 - } 28 - 29 - int pstream::wait() 30 - { 31 - int rv = pclose(m_pipe); 32 - m_pipe = nullptr; 33 - return rv; 34 - } 35 - 36 - std::streamsize pstream::xsgetn(char* s, std::streamsize n) 37 - { 38 - return fread(s, 1, n, m_pipe); 39 - }
-20
tests/pstream.h
··· 1 - #include "libsshcxx/ssh_streambuf.h" 2 - #include <cstdio> 3 - #include <istream> 4 - #include <string> 5 - 6 - class pstream : public ssh_streambuf 7 - { 8 - public: 9 - pstream(FILE* pipe); 10 - ~pstream(); 11 - 12 - static pstream* popen(const std::string& cmd); 13 - 14 - std::istream* in(); 15 - int wait(); 16 - protected: 17 - virtual std::streamsize xsgetn(char* s, std::streamsize n) override; 18 - private: 19 - FILE* m_pipe; 20 - };
-118
tests/runtest
··· 1 - #!/bin/bash 2 - 3 - BUILDSERVER="osx" 4 - CPPFLAGS="" 5 - DYLD="dyld" 6 - 7 - set -e 8 - 9 - failure() { 10 - tput setaf 1 11 - tput bold 12 - echo "Test failure - the last command failed to execute" 13 - tput sgr0 14 - } 15 - 16 - runtest() { 17 - trap failure ERR 18 - 19 - source="$1" 20 - extension="${source##*.}" 21 - source_fn=$(echo "$source" | sed 's/\//_/g') 22 - 23 - cflags="$(grep '// CFLAGS' "$source" || true)" 24 - cflags="$CPPFLAGS -w $(echo "$cflags" | cut -b 12-)" 25 - 26 - case "$extension" in 27 - "cpp") 28 - darwin_tool="g++" 29 - native_tool="clang++" 30 - ;; 31 - "c") 32 - darwin_tool="gcc" 33 - native_tool="clang" 34 - ;; 35 - "m") 36 - darwin_tool="gcc" 37 - native_tool="clang" 38 - cflags_native="-l:libobjc.so.4 -lgnustep-base" 39 - cflags_darwin="-lobjc -framework foundation" 40 - ;; 41 - *) 42 - echo "Unsupported file type: $extension" 43 - exit 1 44 - esac 45 - 46 - tput bold 47 - echo "=====" 48 - echo "Running test '$source'" 49 - echo "=====" 50 - tput sgr0 51 - 52 - cflags="$(grep '// CFLAGS' "$source" || true)" 53 - cflags="$CPPFLAGS -w $(echo "$cflags" | cut -b 12-)" 54 - 55 - echo "Copying the source code to Darwin..." 56 - scp "$source" "$BUILDSERVER:/tmp/$$.$source_fn" >/dev/null 57 - echo "Building the source code for Darwin..." 58 - ssh "$BUILDSERVER" "$darwin_tool $cflags $cflags_darwin '/tmp/$$.$source_fn' -o '/tmp/$$.$source_fn.bin'" 59 - echo "Copying the binary over..." 60 - scp "$BUILDSERVER:/tmp/$$.$source_fn.bin" "/tmp" >/dev/null 61 - ssh "$BUILDSERVER" "rm -f /tmp/$$.$source_fn*" 62 - 63 - echo "Running Darwin binary locally..." 64 - out_darwin=$($DYLD "/tmp/$$.$source_fn.bin") 65 - rm -f "/tmp/$$.$source_fn.bin" 66 - 67 - echo "Compiling native..." 68 - $native_tool $cflags $cflags_native "$source" -o "/tmp/$$.$source_fn.bin" 69 - echo "Running native binary..." 70 - out_native=$("/tmp/$$.$source_fn.bin") 71 - 72 - if [ "$out_darwin" != "$out_native" ]; then 73 - tput setaf 1 74 - tput bold 75 - echo "*** ERROR: Outputs do not match!" 76 - tput sgr0 77 - echo "---" 78 - tput setaf 3 79 - echo "Darwin build:" 80 - tput sgr0 81 - echo "---" 82 - echo "$out_darwin" 83 - echo "---" 84 - tput setaf 3 85 - echo "Native build:" 86 - tput sgr0 87 - echo "---" 88 - echo "$out_native" 89 - exit 1 90 - fi 91 - rm -f "/tmp/$$.$source_fn.bin" 92 - 93 - tput setaf 2 94 - echo "Everything OK, outputs match" 95 - tput sgr0 96 - } 97 - 98 - if [[ "$0" == *runtest32 ]]; then 99 - CPPFLAGS="-m32" 100 - DYLD="dyld32" 101 - echo "32-bit mode" 102 - fi 103 - if [[ "$0" == *runtest64 ]]; then 104 - DYLD="dyld64" 105 - echo "64-bit mode" 106 - fi 107 - 108 - for test in "$@"; do 109 - runtest "$test" 110 - done 111 - 112 - tput bold 113 - tput setaf 2 114 - echo '=====' 115 - echo 'ALL GOOD' 116 - echo '=====' 117 - tput sgr0 118 -
-362
tests/runtest.cpp
··· 1 - #include <iostream> 2 - #include "libsshcxx/SSH.h" 3 - #include "libsshcxx/SFTP.h" 4 - #include "libsshcxx/SSHChannel.h" 5 - #include "termcolor.h" 6 - #include "pstream.h" 7 - #include "exceptions.h" 8 - #include "boostxml.h" 9 - #include "timer.h" 10 - #include <memory> 11 - #include <stdexcept> 12 - #include <sstream> 13 - #include <cstring> 14 - #include <fstream> 15 - #include <unistd.h> 16 - #include <sys/stat.h> 17 - 18 - const char* DYLD_COMMAND = "dyld"; 19 - const char* OSX_HOST = "osx"; 20 - std::unique_ptr<SSH> g_ssh; 21 - std::unique_ptr<SFTP> g_sftp; 22 - std::unique_ptr<SSHChannel> g_shell; 23 - 24 - void bits(const char* progname); 25 - void runTest(const char* path); 26 - std::string uniqueName(const std::string& path); 27 - std::string cflags(const char* path); 28 - const char* compiler(const char* path); 29 - std::string stripext(std::string file); 30 - 31 - int main(int argc, char** argv) 32 - { 33 - if (argc < 2) 34 - { 35 - std::cerr << "Specify the tests to run\n"; 36 - return 1; 37 - } 38 - 39 - bits(argv[0]); 40 - if (const char* cmd = getenv("DYLD")) 41 - DYLD_COMMAND = cmd; 42 - 43 - try 44 - { 45 - std::cout << "Opening SSH connection...\n"; 46 - g_ssh.reset(new SSH); 47 - g_ssh->setHost(OSX_HOST); 48 - g_ssh->connect(); 49 - g_ssh->login(); 50 - g_shell.reset(g_ssh->newChannel()); 51 - g_shell->openNonInteractive(); 52 - g_shell->startShell(); 53 - g_sftp.reset(g_ssh->sftpChannel()); 54 - 55 - int failures = 0; 56 - int offset = 0; 57 - timer tm; 58 - std::ofstream xml; 59 - boostxml bxml; 60 - 61 - if (argc >= 2 && strncmp(argv[1], "--xml=", 6) == 0) 62 - { 63 - xml.open(argv[1] + 6, std::ofstream::out); 64 - offset++; 65 - } 66 - 67 - for (int i = offset+1; i < argc; i++) 68 - { 69 - time_t timeStart, timeEnd; 70 - try 71 - { 72 - termcolor::set(termcolor::WHITE, termcolor::BLACK, termcolor::BRIGHT); 73 - std::cout << "=======\n"; 74 - std::cout << "Running test (" << i-offset << '/' << argc-1 << "): " << argv[i] << std::endl; 75 - std::cout << "=======\n"; 76 - termcolor::reset(); 77 - 78 - tm.start(); 79 - 80 - runTest(argv[i]); 81 - bxml.addOK(argv[i], tm.stop()); 82 - 83 - termcolor::set(termcolor::GREEN, termcolor::BLACK, termcolor::BRIGHT); 84 - std::cout << "*** Test OK!\n"; 85 - termcolor::reset(); 86 - } 87 - catch (const std::runtime_error& e) 88 - { 89 - termcolor::setBright(termcolor::RED); 90 - std::cerr << "*** Test failure!\n"; 91 - termcolor::reset(); 92 - 93 - std::cerr << e.what() << std::endl; 94 - bxml.addFailure(argv[i], tm.stop(), e.what()); 95 - 96 - failures++; 97 - } 98 - catch (const different_output_error& e) 99 - { 100 - termcolor::setBright(termcolor::RED); 101 - std::cerr << "*** Test failure!\n"; 102 - termcolor::reset(); 103 - 104 - termcolor::setBright(termcolor::WHITE); 105 - std::cerr << "Remote output:\n"; 106 - termcolor::reset(); 107 - std::cerr << e.remote(); 108 - 109 - termcolor::setBright(termcolor::WHITE); 110 - std::cerr << "Local output:\n"; 111 - termcolor::reset(); 112 - std::cerr << e.local(); 113 - 114 - std::stringstream ss; 115 - ss << "Test outputs differ!\n\n"; 116 - ss << "Remote output:\n"; 117 - ss << e.remote() << "\n\n"; 118 - ss << "Local output:\n"; 119 - ss << e.local(); 120 - bxml.addFailure(argv[i], tm.stop(), ss.str()); 121 - 122 - failures++; 123 - } 124 - catch (const nonzero_exit_error& e) 125 - { 126 - termcolor::setBright(termcolor::RED); 127 - std::cerr << "*** Non-zero exit status!\n"; 128 - termcolor::reset(); 129 - 130 - termcolor::setBright(termcolor::WHITE); 131 - std::cerr << ((e.remote()) ? "remote" : "local" ); 132 - std::cerr << " test output leading to the error:\n"; 133 - termcolor::reset(); 134 - std::cerr << e.output(); 135 - 136 - std::stringstream ss; 137 - ss << "Non-zero exit status (" << ((e.remote() ? "remote" : "local")) << ")\n"; 138 - ss << e.output(); 139 - 140 - bxml.addFailure(argv[i], tm.stop(), ss.str()); 141 - 142 - failures++; 143 - } 144 - } 145 - 146 - if (!failures) 147 - { 148 - termcolor::setBright(termcolor::GREEN); 149 - std::cout << "ALL OK!\n"; 150 - } 151 - else 152 - { 153 - termcolor::setBright(termcolor::YELLOW); 154 - std::cerr << failures << " test failures\n"; 155 - } 156 - 157 - termcolor::reset(); 158 - xml << bxml.str(); 159 - } 160 - catch (const compile_error& e) 161 - { 162 - termcolor::setBright(termcolor::RED); 163 - std::cerr << "*** Error compiling:\n" << e.what(); 164 - termcolor::reset(); 165 - return 1; 166 - } 167 - catch (const std::exception& e) 168 - { 169 - termcolor::setBright(termcolor::RED); 170 - std::cerr << e.what() << std::endl; 171 - termcolor::reset(); 172 - return 1; 173 - } 174 - 175 - return 0; 176 - } 177 - 178 - void runTest(const char* path) 179 - { 180 - /* 181 - std::string line; 182 - g_shell->out() << "echo Hello world\n" << std::flush; 183 - std::getline(g_shell->in(), line); 184 - 185 - termcolor::set(termcolor::RED); 186 - std::cout << line << std::endl; 187 - termcolor::reset(); 188 - */ 189 - 190 - std::stringstream cmd; 191 - std::string binary; 192 - std::string out, err; 193 - std::string dirname, filename = "/tmp/darlingtest-"; 194 - int rv; 195 - 196 - filename += getenv("USER"); 197 - filename += '/'; 198 - dirname = filename; 199 - filename += uniqueName(path); 200 - 201 - mkdir(dirname.c_str(), 0700); 202 - 203 - binary = stripext(filename); 204 - 205 - termcolor::set(termcolor::WHITE, termcolor::BLACK, termcolor::DIM); 206 - 207 - std::cout << "Uploading " << path << "...\n"; 208 - try 209 - { 210 - g_sftp->mkdir(dirname.c_str(), 0700); 211 - } catch (...) {} 212 - // upload the source code 213 - g_sftp->upload(path, filename); 214 - 215 - try 216 - { 217 - std::cout << "Compiling...\n"; 218 - // compile the code remotely 219 - cmd << compiler(path) << ' ' << cflags(path) << filename << " -o " << binary; 220 - rv = g_ssh->runCommand(cmd.str(), out, err); 221 - 222 - if (rv) 223 - throw compile_error(err); 224 - 225 - std::cout << "Running remotely...\n"; 226 - // run the program remotely 227 - rv = g_ssh->runCommand(binary, out, err); 228 - 229 - if (rv) 230 - throw nonzero_exit_error(true, out); 231 - 232 - std::cout << "Downloading...\n"; 233 - // download the Mach-O executable 234 - g_sftp->download(binary, binary); 235 - 236 - std::cout << "Running locally...\n"; 237 - // run the executable via dyld 238 - std::stringstream locOut; 239 - pstream* loc = pstream::popen(std::string(DYLD_COMMAND) + " " + binary); 240 - 241 - locOut << loc; 242 - 243 - rv = loc->wait(); 244 - 245 - if (rv) 246 - throw nonzero_exit_error(false, locOut.str()); 247 - 248 - if (locOut.str() != out) 249 - throw different_output_error(out, locOut.str()); 250 - 251 - // clean up locally 252 - unlink(binary.c_str()); 253 - 254 - try 255 - { 256 - // clean up remotely 257 - g_sftp->unlink(binary); 258 - g_sftp->unlink(filename); 259 - } 260 - catch (...) {} 261 - 262 - } 263 - catch (...) 264 - { 265 - // clean up locally 266 - unlink(binary.c_str()); 267 - 268 - try 269 - { 270 - // clean up remotely 271 - g_sftp->unlink(binary); 272 - g_sftp->unlink(filename); 273 - } 274 - catch (...) {} 275 - 276 - throw; 277 - } 278 - } 279 - 280 - std::string cflags(const char* path) 281 - { 282 - std::string cflags; 283 - const char* suffix = strrchr(path, '.'); 284 - if (!suffix) 285 - throw std::runtime_error("Unsupported file name"); 286 - 287 - if (!strcmp(DYLD_COMMAND, "dyld32") || sizeof(void*) == 4) 288 - cflags += "-m32 "; 289 - 290 - if (!strcmp(suffix, ".m") || !strcmp(suffix, ".mm")) 291 - cflags += "-lobjc "; 292 - 293 - std::ifstream f(path); 294 - std::string first; 295 - 296 - std::getline(f, first); 297 - if (first.compare(0, 11, "// CFLAGS: ") == 0) 298 - { 299 - cflags += first.substr(11); 300 - cflags += ' '; 301 - } 302 - 303 - return cflags; 304 - } 305 - 306 - const char* compiler(const char* path) 307 - { 308 - const char* suffix = strrchr(path, '.'); 309 - if (!suffix) 310 - throw std::runtime_error("Unsupported file name"); 311 - 312 - if (!strcmp(suffix, ".c") || !strcmp(suffix, ".m")) 313 - return "clang"; 314 - else if (!strcmp(suffix, ".cpp") || !strcmp(suffix, ".mm")) 315 - return "clang++"; 316 - else 317 - throw std::runtime_error("Unsupported file name"); 318 - } 319 - 320 - 321 - std::string uniqueName(const std::string& path) 322 - { 323 - char* name = new char[path.size()+1]; 324 - strcpy(name, path.c_str()); 325 - 326 - std::stringstream out; 327 - out << getpid() << '.'; 328 - out << basename(name); 329 - 330 - delete [] name; 331 - return out.str(); 332 - } 333 - 334 - void bits(const char* progname) 335 - { 336 - char* arg0 = strdup(progname); 337 - char* cmd = basename(arg0); 338 - 339 - termcolor::set(termcolor::WHITE, termcolor::BLACK, termcolor::DIM); 340 - if (!strcmp(cmd, "runtest64")) 341 - { 342 - std::cout << "Running in 64-bit mode.\n"; 343 - DYLD_COMMAND = "dyld64"; 344 - } 345 - else if (!strcmp(cmd, "runtest32")) 346 - { 347 - std::cout << "Running in 32-bit mode.\n"; 348 - DYLD_COMMAND = "dyld32"; 349 - } 350 - termcolor::reset(); 351 - 352 - free(arg0); 353 - } 354 - 355 - std::string stripext(std::string file) 356 - { 357 - size_t pos = file.rfind('.'); 358 - if (pos == std::string::npos) 359 - return file; 360 - return file.substr(0, pos); 361 - } 362 -
-1
tests/runtest32
··· 1 - runtest
-1
tests/runtest64
··· 1 - runtest
-14
tests/termcolor.cpp
··· 1 - #include "termcolor.h" 2 - #include <unistd.h> 3 - #include <iostream> 4 - 5 - const bool isTty = isatty(1) != 0; 6 - 7 - void termcolor::set(int text, int bg, int attrib) 8 - { 9 - if (!isTty) 10 - return; 11 - 12 - std::cout << "\x1b[" << attrib << ';' << (text + 30) << ';' << (bg + 40) << 'm' << std::flush; 13 - } 14 -
-31
tests/termcolor.h
··· 1 - #ifndef TERMCOLOR_H 2 - #define TERMCOLOR_H 3 - 4 - namespace termcolor 5 - { 6 - 7 - const int RESET = 0; 8 - const int BRIGHT = 1; 9 - const int DIM = 2; 10 - const int UNDERLINE = 3; 11 - const int BLINK = 4; 12 - const int REVERSE = 7; 13 - const int HIDDEN = 8; 14 - 15 - const int BLACK = 0; 16 - const int RED = 1; 17 - const int GREEN = 2; 18 - const int YELLOW = 3; 19 - const int BLUE = 4; 20 - const int MAGENTA = 5; 21 - const int CYAN = 6; 22 - const int WHITE = 7; 23 - 24 - void set(int text, int bg = BLACK, int attrib = RESET); 25 - inline void setBright(int text, int bg = BLACK) { set(text, bg, BRIGHT); } 26 - inline void reset() { set(WHITE); } 27 - 28 - } 29 - 30 - #endif 31 -
-12
tests/timer.cpp
··· 1 - #include "timer.h" 2 - 3 - void timer::start() 4 - { 5 - m_start = ::time(nullptr); 6 - } 7 - 8 - int timer::stop() 9 - { 10 - return ::time(nullptr) - m_start; 11 - } 12 -
-15
tests/timer.h
··· 1 - #ifndef TIMER_H 2 - #define TIMER_H 3 - #include <ctime> 4 - 5 - class timer 6 - { 7 - public: 8 - void start(); 9 - int stop(); 10 - private: 11 - time_t m_start; 12 - }; 13 - 14 - #endif 15 -