if (config_pair.first == "sanity-checks") {
SanityChecksParser parser;
parser.parse(*srv_cfg, config_pair.second);
+ continue;
}
if (config_pair.first == "expired-leases-processing") {
noinst_EXTRA_DIST = configs-list.txt
noinst_PROGRAMS = $(TESTS)
+
+# Use this target if you want to rebuild the get-config unit-tests.
+#
+# TODO: We could also automate the replacement step with some variation
+# of this: https://stackoverflow.com/questions/6790631
+rebuild-tests:
+ rm -f x u get_config_unittest.cc
+ cp -f get_config_unittest.cc.skel get_config_unittest.cc
+ $(MAKE) CXXFLAGS=-DEXTRACT_CONFIG V=1
+ ./dhcp4_unittests --gtest_filter="Dhcp4Parser*" > /dev/null 2> x
+ echo "Please copy content of x file into EXTRACTED_CONFIGS in get_config_unittest.cc"
+ read -p "Press ENTER when ready"
+ $(MAKE) CXXFLAGS=-DGENERATE_ACTION V=1
+ ./dhcp4_unittests --gtest_filter="Dhcp4GetConfig*" > /dev/null 2> u
+ echo "Please copy content of u file into UNPARSED_CONFIGS in get_config_unittest.cc"
+ read -p "Press ENTER when ready"
+ touch get_config_unittest.cc
+ $(MAKE)
if (config_pair.first == "sanity-checks") {
SanityChecksParser parser;
parser.parse(*srv_config, config_pair.second);
+ continue;
}
if (config_pair.first == "expired-leases-processing") {
endif
noinst_PROGRAMS = $(TESTS)
+
+# Use this target if you want to rebuild the get-config unit-tests.
+#
+# TODO: We could also automate the replacement step with some variation
+# of this: https://stackoverflow.com/questions/6790631
+rebuild-tests:
+ rm -f x u get_config_unittest.cc
+ cp -f get_config_unittest.cc.skel get_config_unittest.cc
+ $(MAKE) CXXFLAGS=-DEXTRACT_CONFIG V=1
+ ./dhcp6_unittests --gtest_filter="Dhcp6Parser*" > /dev/null 2> x
+ echo "Please copy content of x file into EXTRACTED_CONFIGS in get_config_unittest.cc"
+ read -p "Press ENTER when ready"
+ $(MAKE) CXXFLAGS=-DGENERATE_ACTION V=1
+ ./dhcp6_unittests --gtest_filter="Dhcp6GetConfig*" > /dev/null 2> u
+ echo "Please copy content of u file into UNPARSED_CONFIGS in get_config_unittest.cc"
+ read -p "Press ENTER when ready"
+ touch get_config_unittest.cc
+ $(MAKE)