Main function of the test
| 22 | |
| 23 | /// Main function of the test |
| 24 | int main(int argc, char** argv) |
| 25 | { |
| 26 | return hz::main_exception_wrapper([&argc, &argv]() |
| 27 | { |
| 28 | Gtk::Main m(argc, argv); |
| 29 | |
| 30 | // NOTE: Don't use long options (e.g. --info). Use short ones (e.g. -i), |
| 31 | // because long options may be unsupported on some platforms. |
| 32 | |
| 33 | // SmartctlExecutor ex("smartctl", "-i /dev/sda"); |
| 34 | // SmartctlExecutorGui ex("ls", "-l --color=no -R /dev"); |
| 35 | // SmartctlExecutorGui ex("lsa", "-1 --color=no /sys/block"); |
| 36 | // SmartctlExecutorGui ex("../../../0test_binary.sh", ""); |
| 37 | SmartctlExecutor ex("../../../0test_binary.sh", {}); |
| 38 | |
| 39 | ex.execute(); |
| 40 | |
| 41 | const std::string out_str = ex.get_stdout_str(); |
| 42 | // std::cout << "OUT:\n" << out_str << "\n\n"; |
| 43 | std::cerr << "OUT SIZE: " << out_str.size() << "\n"; |
| 44 | |
| 45 | std::cerr << "STDERR:\n" << ex.get_stderr_str() << "\n"; |
| 46 | |
| 47 | std::cerr << "ERROR MSG:\n"; |
| 48 | std::cerr << ex.get_error_msg(); |
| 49 | |
| 50 | // execute it second time |
| 51 | ex.execute(); |
| 52 | |
| 53 | // m.run(); |
| 54 | return EXIT_SUCCESS; |
| 55 | }); |
| 56 | } |
| 57 | |
| 58 | |
| 59 |
nothing calls this directly
no test coverage detected