diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-10 18:06:25 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-11 13:06:42 +0300 |
commit | b8232e40e605b60234dae7ef92f257bab5c47723 (patch) | |
tree | 10325ce36b124a7cff8c46af27129806548517aa /unit-tests/bootstrap-manifest/driver.cxx | |
parent | 463e3454bd8553c8ee26c813a83386beeecb9837 (diff) |
Add machine manifest unit test
Diffstat (limited to 'unit-tests/bootstrap-manifest/driver.cxx')
-rw-r--r-- | unit-tests/bootstrap-manifest/driver.cxx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/unit-tests/bootstrap-manifest/driver.cxx b/unit-tests/bootstrap-manifest/driver.cxx index f08cbca..a89d516 100644 --- a/unit-tests/bootstrap-manifest/driver.cxx +++ b/unit-tests/bootstrap-manifest/driver.cxx @@ -12,43 +12,26 @@ #include <bbot/utility.hxx> #include <bbot/bootstrap-manifest.hxx> -#include <bbot/machine-manifest.hxx> using namespace std; using namespace butl; using namespace bbot; -// Usage: argv[0] (-t|-b|-bm) +// Usage: argv[0] // -// Read and parse manifest from STDIN and serialize it to STDOUT. The -// following options specify the manifest type. -// -// -t parse toolchain manifest -// -b parse bootstrap manifest -// -bm parse bootstrapped machine manifest +// Read and parse bootstrap manifest from STDIN and serialize it to STDOUT. // int -main (int argc, char* argv[]) +main () try { - assert (argc == 2); - string opt (argv[1]); - cin.exceptions (ios_base::failbit | ios_base::badbit); cout.exceptions (ios_base::failbit | ios_base::badbit); manifest_parser p (cin, "stdin"); manifest_serializer s (cout, "stdout"); - if (opt == "-t") - toolchain_manifest (p).serialize (s); - else if (opt == "-b") - bootstrap_manifest (p).serialize (s); - else if (opt == "-bm") - bootstrapped_machine_manifest (p).serialize (s); - else - assert (false); - + bootstrap_manifest (p).serialize (s); return 0; } catch (const manifest_parsing& e) |