the default is to assume that '-r file' means "read file".
Instead, it means "destroy that file", which is unfriendly.
INFO(" -h Print help text.");
INFO(" -M Show talloc memory report.");
INFO(" -p Allow xlat_purify");
- INFO(" -r <receipt_file> Create the <receipt_file> as a 'success' exit.");
+ INFO(" -o <receipt_file> Create the <receipt_file> as a 'success' exit.");
INFO(" -w <output_file> Write 'corrected' output to <output_file>.");
INFO("Where <filename> is a file containing one or more commands and '-' indicates commands should be read from stdin.");
INFO("Ranges of <lines> may be specified in the format <start>[-[<end>]][,]");
default_log.fd = STDOUT_FILENO;
default_log.print_level = false;
- while ((c = getopt(argc, argv, "cd:D:F:fxMhpr:S:w:")) != -1) switch (c) {
+ while ((c = getopt(argc, argv, "cd:D:F:fxMhpo:S:w:")) != -1) switch (c) {
case 'c':
do_commands = true;
break;
talloc_enable_leak_report();
break;
- case 'r':
+ case 'o':
p = strrchr(optarg, '/');
if (!p || p[1]) {
receipt_file = optarg;
@cp $< $@
@cp src/tests/dict/base.txt $@.txt
@echo "load-dictionary $(top_srcdir)/$<" >> $@.txt
- ${Q}if ! $(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -r "$@" "$@.txt" > "$@.log" 2>&1 || ! test -f "$@"; then \
+ ${Q}if ! $(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -o "$@" "$@.txt" > "$@.log" 2>&1 || ! test -f "$@"; then \
rm -f $@; \
cat "$@.log"; \
echo "# $@.log"; \
- echo "$(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -r "$@" -xx '$@.txt'"; \
+ echo "$(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -o "$@" -xx '$@.txt'"; \
exit 1; \
fi
@cp $< $@
@cp src/tests/dict/base.txt $@.txt
@echo "load-dictionary $(top_srcdir)/$<" >> $@.txt
- ${Q}if ! $(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -r "$@" "$@.txt" > "$@.log" 2>&1 || ! test -f "$@"; then \
+ ${Q}if ! $(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -o "$@" "$@.txt" > "$@.log" 2>&1 || ! test -f "$@"; then \
rm -f $@; \
cat "$@.log"; \
echo "# $@.log"; \
- echo "$(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -r "$@" -xx '$@.txt'"; \
+ echo "$(TEST_BIN)/unit_test_attribute -D $(top_srcdir)/share/dictionary -o "$@" -xx '$@.txt'"; \
exit 1; \
fi
#
$(OUTPUT)/%: $(DIR)/% $(TEST_BIN_DIR)/unit_test_attribute
$(eval DIR:=${top_srcdir}/src/tests/unit)
- $(eval export UNIT_TEST_ATTRIBUTE:=TZ=GMT $(TEST_BIN_NO_TIMEOUT)/unit_test_attribute $(PURIFY) -F ./src/tests/fuzzer-corpus -D ./share/dictionary -d $(DIR) -r \"$@\" $<)
- ${Q}$(TEST_BIN)/unit_test_attribute $(PURIFY) $(REWRITE_FLAGS) -F ./src/tests/fuzzer-corpus -D ./share/dictionary -d $(DIR) -r "$@" $<
+ $(eval export UNIT_TEST_ATTRIBUTE:=TZ=GMT $(TEST_BIN_NO_TIMEOUT)/unit_test_attribute $(PURIFY) -F ./src/tests/fuzzer-corpus -D ./share/dictionary -d $(DIR) -o \"$@\" $<)
+ ${Q}$(TEST_BIN)/unit_test_attribute $(PURIFY) $(REWRITE_FLAGS) -F ./src/tests/fuzzer-corpus -D ./share/dictionary -d $(DIR) -o "$@" $<
$(TEST):
@touch $(BUILD_DIR)/tests/$@