Index: chrome_elf/run_all_unittests.cc |
diff --git a/chrome_elf/run_all_unittests.cc b/chrome_elf/run_all_unittests.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..df7368de55a0e6165cefbcd3a89aa909f221704f |
--- /dev/null |
+++ b/chrome_elf/run_all_unittests.cc |
@@ -0,0 +1,23 @@ |
+// Copyright 2016 The Chromium 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 "base/bind.h" |
+#include "base/command_line.h" |
+#include "base/test/launcher/unit_test_launcher.h" |
+#include "base/test/test_suite.h" |
+#include "build/build_config.h" |
+ |
+int main(int argc, char** argv) { |
+ // Ensure that the CommandLine instance honors the command line passed in |
+ // instead of the default behavior on Windows which is to use the shell32 |
+ // CommandLineToArgV API. The chrome_elf_unittests test suite should not |
scottmg
2016/06/18 17:36:57
CommandLineToArgvW
ananta
2016/06/20 19:08:03
Done.
|
+ // depend on user32 directly or indirectly (For the curious shell32 depends |
+ // on user32) |
+ base::CommandLine::set_honor_command_line_args_for_testing(true); |
+ int ret = base::LaunchUnitTests( |
+ argc, argv, |
+ base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
robertshield
2016/06/20 16:59:54
test_suite is undefined here
ananta
2016/06/20 19:08:03
Done.
|
+ base::CommandLine::set_honor_command_line_args_for_testing(false); |
+ return ret; |
+} |