From ea5920bda47b71e07149f42bf4f1d613a39b9bfc Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 1 Nov 2017 18:20:45 +0100 Subject: [PATCH] Fixed ut_runner - Implict macros were not disabled as they should - This revealed that DRC scripts could not run with -rx --- src/lay/lay/layMacroController.cc | 6 ++---- src/unit_tests/unit_test_main.cc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lay/lay/layMacroController.cc b/src/lay/lay/layMacroController.cc index f4b083a06..9b5e86fc0 100644 --- a/src/lay/lay/layMacroController.cc +++ b/src/lay/lay/layMacroController.cc @@ -85,10 +85,8 @@ MacroController::finish (bool load) // Scan built-in macros // These macros are always taken, even if there are no macros requested (they are required to // fully form the API). - if (load) { - lym::MacroCollection::root ().add_folder (tl::to_string (QObject::tr ("Built-In")), ":/built-in-macros", "macros", true); - lym::MacroCollection::root ().add_folder (tl::to_string (QObject::tr ("Built-In")), ":/built-in-pymacros", "pymacros", true); - } + lym::MacroCollection::root ().add_folder (tl::to_string (QObject::tr ("Built-In")), ":/built-in-macros", "macros", true); + lym::MacroCollection::root ().add_folder (tl::to_string (QObject::tr ("Built-In")), ":/built-in-pymacros", "pymacros", true); // TODO: consider adding "drc" dynamically and allow more dynamic categories // We can do so if we first load the macros with the initial interpreters, then do autorun (which creates DSL interpreters) and then diff --git a/src/unit_tests/unit_test_main.cc b/src/unit_tests/unit_test_main.cc index ef533762f..1d0bc6b79 100644 --- a/src/unit_tests/unit_test_main.cc +++ b/src/unit_tests/unit_test_main.cc @@ -368,12 +368,12 @@ main_cont (int argc, char **argv) // No side effects lay::set_klayout_path (std::vector ()); - int ac = 2; static char av0[] = "unit_test"; static char av1[] = "-z"; // don't show main window static char av2[] = "-nc"; // No configuration file static char av3[] = "-rx"; // No mplicit macros char *av[] = { av0, av1, av2, av3, 0 }; + int ac = sizeof (av) / sizeof (av[0]) - 1; lay::Application app (ac, av, false); app.ruby_interpreter ().push_console (&console);