blob: 5df77558ccc5bb065a4d77ebb6805a1f7d485c71 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/developer/debug/zxdb/main_e2e_test.h"
#include <stdio.h>
#include <gtest/gtest.h>
#include "src/lib/fxl/test/test_settings.h"
namespace zxdb {
std::string e2e_init_command;
} // namespace zxdb
int main(int argc, char* argv[]) {
if (!fxl::SetTestSettings(argc, argv)) {
return EXIT_FAILURE;
}
testing::InitGoogleTest(&argc, argv);
for (int i = 0; i < argc; i++) {
if (std::string(argv[i]) != "--cmd") {
continue;
}
i++;
if (i < argc) {
zxdb::e2e_init_command = argv[i];
}
break;
}
if (zxdb::e2e_init_command.empty()) {
fprintf(stderr,
"No initialization command specified.\n"
"Use --cmd \"<command>\" to specify a zxdb connection command for "
"the client we are testing on.\n");
return 1;
}
return RUN_ALL_TESTS();
}