| 129 | } |
| 130 | |
| 131 | int main(int argc, char *argv[]) |
| 132 | { |
| 133 | if (argc < 4) |
| 134 | printf("Usage : test_satdump configuration.json source_files_directory output_directory\n"); |
| 135 | |
| 136 | nlohmann::ordered_json config = loadJsonFile(argv[1]); |
| 137 | nlohmann::ordered_json final_report; |
| 138 | |
| 139 | std::string input_folder = argv[2]; |
| 140 | std::string output_folder = argv[3]; |
| 141 | |
| 142 | // Standalone tests |
| 143 | if (config["run"]["standalone_offline"].get<bool>()) |
| 144 | final_report["standalone_offline"] = run_standalone_tests_offline(config, input_folder, output_folder + "/standalone_offline"); |
| 145 | |
| 146 | initLogger(); |
| 147 | satdump::initSatdump(); |
| 148 | completeLoggerInit(); |
| 149 | |
| 150 | // Single-Instance tests |
| 151 | if (config["run"]["singleinstance_offline"].get<bool>()) |
| 152 | final_report["singleinstance_offline"] = run_singleinstance_tests_offline(config, input_folder, output_folder + "/singleinstance_offline"); |
| 153 | |
| 154 | std::ofstream output_file(std::string(argv[3]) + "/tests_results.json"); |
| 155 | output_file << final_report.dump(4); |
| 156 | output_file.close(); |
| 157 | } |
nothing calls this directly
no test coverage detected