MCPcopy Create free account
hub / github.com/MegEngine/MegCC / main

Function main

compiler/test/kernel/test_main.cpp:11–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#endif
10
11int main(int argc, char** argv) {
12#if MEGCC_TEST_GEN
13 printf("arg1 must be gen dir\n");
14 mgb_assert(argc >= 1);
15 std::string gen_dir(argv[1]);
16 argc -= 1;
17 argv += 1;
18#endif
19 ::testing::InitGoogleTest(&argc, argv);
20 auto ret = RUN_ALL_TESTS();
21
22#if MEGCC_TEST_GEN
23 auto& c_module = megcc::test::TargetModule::get_global_target_module();
24 c_module.write_to_dir(gen_dir);
25 printf("generate finish %s\n", gen_dir.c_str());
26#endif
27 return ret;
28}

Callers

nothing calls this directly

Calls 1

write_to_dirMethod · 0.80

Tested by

no test coverage detected