From cc5624592f69aa4181dea55cc4a79a1b1684a511 Mon Sep 17 00:00:00 2001 From: Thomas Nilefalk Date: Thu, 20 Jun 2024 13:58:42 +0200 Subject: [PATCH] [tests] Move 'clean' target to Makefile.boilerplate --- tests/Makefile | 4 +++- tests/Makefile.boilerplate | 3 +++ tests/c-xref/Makefile | 3 --- tests/ffmpeg/Makefile | 3 --- tests/systemd/Makefile | 3 --- tests/test_add_parameter/Makefile | 5 +---- tests/test_add_parameter_after_void/Makefile | 5 +---- tests/test_add_parameter_outside_range/Makefile | 5 +---- tests/test_add_parameter_to_empty/Makefile | 5 +---- tests/test_add_parameter_to_void/Makefile | 5 +---- tests/test_bracketed_include/Makefile | 3 --- tests/test_c_extract_with_argument/Makefile | 3 --- tests/test_c_parsing/Makefile | 5 +---- tests/test_c_simple_extract_function/Makefile | 5 +---- tests/test_c_simple_extract_macro/Makefile | 5 +---- tests/test_cexercise_browsing/Makefile | 3 --- tests/test_cexercise_completions/Makefile | 3 --- tests/test_cexercise_completions_with_parenthesis/Makefile | 3 --- tests/test_cexercise_extract_function/Makefile | 3 --- tests/test_cexercise_extract_macro/Makefile | 3 --- tests/test_cexercise_parameters_1_add/Makefile | 3 --- tests/test_cexercise_parameters_2_delete/Makefile | 3 --- tests/test_cexercise_parameters_3_remove_used/Makefile | 3 --- tests/test_cexercise_parameters_4_add_with_clash/Makefile | 3 --- tests/test_cexercise_rename_1_local_variable/Makefile | 3 --- tests/test_cexercise_rename_2_function/Makefile | 3 --- tests/test_cexercise_rename_3_inside_macro/Makefile | 3 --- tests/test_cexercise_rename_4_macro_parameter/Makefile | 3 --- tests/test_cexercise_rename_5_name_collision/Makefile | 3 --- .../Makefile | 3 --- tests/test_create_references_in_subdir/Makefile | 3 --- tests/test_delete_last_macro_argument/Makefile | 3 --- tests/test_delete_no_parameter/Makefile | 3 --- tests/test_delete_void_parameter/Makefile | 3 --- tests/test_edit_server_test_example/Makefile | 3 --- tests/test_extract_out_argument/Makefile | 5 +---- .../test_extract_with_complicated_comments_around/Makefile | 5 +---- tests/test_extract_with_return/Makefile | 5 +---- tests/test_fileunused/Makefile | 5 +---- tests/test_for_with_declaration/Makefile | 5 +---- tests/test_full_update/Makefile | 3 --- .../test_get_available_refactorings_without_mark/Makefile | 3 --- tests/test_get_environment_value/Makefile | 3 --- tests/test_get_project/Makefile | 3 --- tests/test_get_project_new/Makefile | 5 +---- tests/test_globalunused/Makefile | 7 +------ tests/test_include_brackets/Makefile | 3 --- tests/test_include_macro/Makefile | 3 --- tests/test_include_next/Makefile | 3 --- tests/test_initializer_parsing/Makefile | 3 --- tests/test_java_not_supported/Makefile | 5 +---- tests/test_move_c_function/Makefile | 6 ------ tests/test_move_parameter_with_void_pointer/Makefile | 5 +---- tests/test_multiline_string_lexing/Makefile | 5 +---- tests/test_no_errors_on_communication_channel/Makefile | 3 --- tests/test_old_style_func/Makefile | 4 ---- tests/test_orig.c-xref/Makefile | 3 --- tests/test_prune_option/Makefile | 3 --- tests/test_rename/Makefile | 3 --- tests/test_rename_with_update/Makefile | 3 --- tests/test_show_available_refactorings/Makefile | 3 --- tests/test_show_refactorings_for_macro/Makefile | 3 --- tests/test_simple_block/Makefile | 3 --- tests/test_simple_complete/Makefile | 3 --- tests/test_simple_push/Makefile | 3 --- tests/test_simple_tagsearch/Makefile | 3 --- tests/test_single_reference_file/Makefile | 3 --- tests/test_uint32_t/Makefile | 3 --- tests/test_update/Makefile | 3 --- tests/test_yacc_completions/Makefile | 3 --- 70 files changed, 24 insertions(+), 229 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index daae410d..db64adeb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -66,7 +66,9 @@ list: .PHONY: clean clean: - rm -rf *.info */.coverage coverage + $(foreach dir,$(TESTS),\ + $(MAKE) -C $(dir) clean ; \ + ) coverage: GCOV_PREFIX=$PWD/test_simple_push/.coverage/ GCOV_PREFIX_STRIP=7 lcov -v -c --build-directory ../src/.objects/ -d $PWD/test_simple_push/.coverage/ -b ../src -o test_simple_push.info diff --git a/tests/Makefile.boilerplate b/tests/Makefile.boilerplate index 093c2ce3..1cd92260 100644 --- a/tests/Makefile.boilerplate +++ b/tests/Makefile.boilerplate @@ -62,6 +62,9 @@ VERIFY = cmp output expected ; \ .c-xrefrc: ../c-xrefrc.tpl @sed -e "s+CURDIR+$(CURDIR)+g" -e "s+TEST+$(TEST)+g" ../c-xrefrc.tpl > .c-xrefrc +clean: + @-rm -rf CXrefs .c-xrefrc out* log *.log + coverage: cd ../../src ; make clean-coverage @echo "Doing coverage in this directory only" diff --git a/tests/c-xref/Makefile b/tests/c-xref/Makefile index 185fbe4e..f0e25718 100644 --- a/tests/c-xref/Makefile +++ b/tests/c-xref/Makefile @@ -16,6 +16,3 @@ $(TEST): .c-xrefrc trace: TRACE=-trace trace: $(TEST) - -clean: - rm -rf CXrefs c-xref.log out .c-xrefrc diff --git a/tests/ffmpeg/Makefile b/tests/ffmpeg/Makefile index 48719e59..771fc87a 100644 --- a/tests/ffmpeg/Makefile +++ b/tests/ffmpeg/Makefile @@ -34,6 +34,3 @@ ffmpeg: .c-xrefrc: c-xrefrc.tpl @sed -e "s+PWD+$(CURDIR)+g" c-xrefrc.tpl > .c-xrefrc - -clean: - rm -rf CXrefs c-xref .c-xrefrc ffmpeg ffmpeg.log diff --git a/tests/systemd/Makefile b/tests/systemd/Makefile index 2ae523d4..5c7b91fa 100644 --- a/tests/systemd/Makefile +++ b/tests/systemd/Makefile @@ -35,6 +35,3 @@ systemd: .c-xrefrc: c-xrefrc.tpl @sed -e "s+PWD+$$PWD+g" c-xrefrc.tpl > .c-xrefrc - -clean: - rm -rf CXrefs .c-xrefrc systemd systemd.log diff --git a/tests/test_add_parameter/Makefile b/tests/test_add_parameter/Makefile index 43a8673f..3ce91109 100644 --- a/tests/test_add_parameter/Makefile +++ b/tests/test_add_parameter/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=2 -rfct-param1=int\ arg -rfct-param2=42 -olcursor=17 $(CURDIR)/source.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_add_parameter_after_void/Makefile b/tests/test_add_parameter_after_void/Makefile index a6bc4ff0..629c11a6 100644 --- a/tests/test_add_parameter_after_void/Makefile +++ b/tests/test_add_parameter_after_void/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=2 -rfct-param1="int arg" -rfct-param2=42 -olcursor=16 $(CURDIR)/hello.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_add_parameter_outside_range/Makefile b/tests/test_add_parameter_outside_range/Makefile index c22d6500..fac15ca7 100644 --- a/tests/test_add_parameter_outside_range/Makefile +++ b/tests/test_add_parameter_outside_range/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=14 -rfct-param1="int arg" -rfct-param2=42 -olcursor=70 $(CURDIR)/source.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_add_parameter_to_empty/Makefile b/tests/test_add_parameter_to_empty/Makefile index 21fee6a4..571d65fa 100644 --- a/tests/test_add_parameter_to_empty/Makefile +++ b/tests/test_add_parameter_to_empty/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=1 -rfct-param1="int arg" -rfct-param2=42 -olcursor=16 $(CURDIR)/hello.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_add_parameter_to_void/Makefile b/tests/test_add_parameter_to_void/Makefile index 21fee6a4..571d65fa 100644 --- a/tests/test_add_parameter_to_void/Makefile +++ b/tests/test_add_parameter_to_void/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=1 -rfct-param1="int arg" -rfct-param2=42 -olcursor=16 $(CURDIR)/hello.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_bracketed_include/Makefile b/tests/test_bracketed_include/Makefile index 27d43ac4..2b5fc602 100644 --- a/tests/test_bracketed_include/Makefile +++ b/tests/test_bracketed_include/Makefile @@ -12,6 +12,3 @@ $(TEST): .c-xrefrc else \ $(OK) ; \ fi - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_c_extract_with_argument/Makefile b/tests/test_c_extract_with_argument/Makefile index 3a9214c8..1add51c8 100644 --- a/tests/test_c_extract_with_argument/Makefile +++ b/tests/test_c_extract_with_argument/Makefile @@ -9,9 +9,6 @@ $(TEST): trace: EXTRA=--extra \'-trace\' trace: $(TEST) -clean: - @-rm -rf .c-xrefrc CXrefs log output.tmp output - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_c_parsing/Makefile b/tests/test_c_parsing/Makefile index d5ac2294..1d36c61e 100644 --- a/tests/test_c_parsing/Makefile +++ b/tests/test_c_parsing/Makefile @@ -4,11 +4,8 @@ include ../Makefile.boilerplate ARGUMENTS = test_source/hello.c # This test will always succeed unless c-xref fails -$(TEST): clean +$(TEST): @$(COMMAND) -o output.tmp @$(NORMALIZE) output.tmp >> output @$(OK) @exit 0 - -clean: - @-rm -rf CXrefs output.log output.tmp output diff --git a/tests/test_c_simple_extract_function/Makefile b/tests/test_c_simple_extract_function/Makefile index a5a8e0c6..924d113e 100644 --- a/tests/test_c_simple_extract_function/Makefile +++ b/tests/test_c_simple_extract_function/Makefile @@ -1,15 +1,12 @@ include ../Makefile.boilerplate -$(TEST): clean +$(TEST): @# First do the extract @-$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp > output $(VERIFY) -clean: - @-rm -rf CXrefs output.log output.tmp output - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --buffer buffer --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_c_simple_extract_macro/Makefile b/tests/test_c_simple_extract_macro/Makefile index 0f65b492..0d0128e6 100644 --- a/tests/test_c_simple_extract_macro/Makefile +++ b/tests/test_c_simple_extract_macro/Makefile @@ -1,7 +1,7 @@ include ../Makefile.boilerplate -$(TEST): clean +$(TEST): @# First do the extract @-$(EDIT_SERVER_DRIVER) commands1.input $(EXTRA) > output1.tmp @$(NORMALIZE) output1.tmp > output @@ -22,9 +22,6 @@ $(TEST): clean trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - @-rm -rf CXrefs output.log output.tmp output - debug: @$(EDIT_SERVER_DRIVER) commands1.input $(EXTRA) --buffer buffer1 --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_cexercise_browsing/Makefile b/tests/test_cexercise_browsing/Makefile index ecd7ea94..01f4a8de 100644 --- a/tests/test_cexercise_browsing/Makefile +++ b/tests/test_cexercise_browsing/Makefile @@ -20,6 +20,3 @@ debug: @$(EDIT_SERVER_DRIVER) commands.input --delay 5 > output.tmp & sleep 1 sudo gdb -pid `pgrep -a c-xref | grep -v .emacs | awk '{ print $$1 }'` -ex 'br main' - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_completions/Makefile b/tests/test_cexercise_completions/Makefile index 5b9e5548..0fcbf46f 100644 --- a/tests/test_cexercise_completions/Makefile +++ b/tests/test_cexercise_completions/Makefile @@ -13,6 +13,3 @@ debug: @$(EDIT_SERVER_DRIVER) commands.input --delay 5 > output.tmp & sleep 1 sudo gdb -pid `pgrep -a c-xref | grep -v .emacs | awk '{ print $$1 }'` -ex 'br main' - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_completions_with_parenthesis/Makefile b/tests/test_cexercise_completions_with_parenthesis/Makefile index 5b9e5548..0fcbf46f 100644 --- a/tests/test_cexercise_completions_with_parenthesis/Makefile +++ b/tests/test_cexercise_completions_with_parenthesis/Makefile @@ -13,6 +13,3 @@ debug: @$(EDIT_SERVER_DRIVER) commands.input --delay 5 > output.tmp & sleep 1 sudo gdb -pid `pgrep -a c-xref | grep -v .emacs | awk '{ print $$1 }'` -ex 'br main' - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_extract_function/Makefile b/tests/test_cexercise_extract_function/Makefile index dbb2b769..c1b2ff52 100644 --- a/tests/test_cexercise_extract_function/Makefile +++ b/tests/test_cexercise_extract_function/Makefile @@ -9,9 +9,6 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_cexercise_extract_macro/Makefile b/tests/test_cexercise_extract_macro/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_extract_macro/Makefile +++ b/tests/test_cexercise_extract_macro/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_parameters_1_add/Makefile b/tests/test_cexercise_parameters_1_add/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_parameters_1_add/Makefile +++ b/tests/test_cexercise_parameters_1_add/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_parameters_2_delete/Makefile b/tests/test_cexercise_parameters_2_delete/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_parameters_2_delete/Makefile +++ b/tests/test_cexercise_parameters_2_delete/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_parameters_3_remove_used/Makefile b/tests/test_cexercise_parameters_3_remove_used/Makefile index 5b9e5548..0fcbf46f 100644 --- a/tests/test_cexercise_parameters_3_remove_used/Makefile +++ b/tests/test_cexercise_parameters_3_remove_used/Makefile @@ -13,6 +13,3 @@ debug: @$(EDIT_SERVER_DRIVER) commands.input --delay 5 > output.tmp & sleep 1 sudo gdb -pid `pgrep -a c-xref | grep -v .emacs | awk '{ print $$1 }'` -ex 'br main' - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_parameters_4_add_with_clash/Makefile b/tests/test_cexercise_parameters_4_add_with_clash/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_parameters_4_add_with_clash/Makefile +++ b/tests/test_cexercise_parameters_4_add_with_clash/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_rename_1_local_variable/Makefile b/tests/test_cexercise_rename_1_local_variable/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_rename_1_local_variable/Makefile +++ b/tests/test_cexercise_rename_1_local_variable/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_rename_2_function/Makefile b/tests/test_cexercise_rename_2_function/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_rename_2_function/Makefile +++ b/tests/test_cexercise_rename_2_function/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_rename_3_inside_macro/Makefile b/tests/test_cexercise_rename_3_inside_macro/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_rename_3_inside_macro/Makefile +++ b/tests/test_cexercise_rename_3_inside_macro/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_rename_4_macro_parameter/Makefile b/tests/test_cexercise_rename_4_macro_parameter/Makefile index aec791ec..3ec63920 100644 --- a/tests/test_cexercise_rename_4_macro_parameter/Makefile +++ b/tests/test_cexercise_rename_4_macro_parameter/Makefile @@ -14,9 +14,6 @@ CXrefs: .c-xrefrc @sed -e s:$(CURDIR)$$:$(CURDIR)/cexercise: .c-xrefrc > .c-xrefrc.tmp @mv .c-xrefrc.tmp .c-xrefrc -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_cexercise_rename_5_name_collision/Makefile b/tests/test_cexercise_rename_5_name_collision/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_rename_5_name_collision/Makefile +++ b/tests/test_cexercise_rename_5_name_collision/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_cexercise_rename_6_macro_refers_to_different_variables/Makefile b/tests/test_cexercise_rename_6_macro_refers_to_different_variables/Makefile index a0f556ee..d853d82f 100644 --- a/tests/test_cexercise_rename_6_macro_refers_to_different_variables/Makefile +++ b/tests/test_cexercise_rename_6_macro_refers_to_different_variables/Makefile @@ -8,6 +8,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_create_references_in_subdir/Makefile b/tests/test_create_references_in_subdir/Makefile index ab7618ec..d1b1ee3d 100644 --- a/tests/test_create_references_in_subdir/Makefile +++ b/tests/test_create_references_in_subdir/Makefile @@ -12,6 +12,3 @@ $(TEST): .c-xrefrc else \ $(FAIL) ; \ fi - -clean: - rm -rf .c-xrefrc CXrefs diff --git a/tests/test_delete_last_macro_argument/Makefile b/tests/test_delete_last_macro_argument/Makefile index d8b021f7..4bc73c4a 100644 --- a/tests/test_delete_last_macro_argument/Makefile +++ b/tests/test_delete_last_macro_argument/Makefile @@ -6,9 +6,6 @@ $(TEST): .c-xrefrc @$(NORMALIZE) output.tmp > output @$(VERIFY) -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_delete_no_parameter/Makefile b/tests/test_delete_no_parameter/Makefile index a7aa3e9d..a643f9dd 100644 --- a/tests/test_delete_no_parameter/Makefile +++ b/tests/test_delete_no_parameter/Makefile @@ -10,6 +10,3 @@ $(TEST): .c-xrefrc trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log .c-xrefrc diff --git a/tests/test_delete_void_parameter/Makefile b/tests/test_delete_void_parameter/Makefile index 6c7aaee1..bcad6902 100644 --- a/tests/test_delete_void_parameter/Makefile +++ b/tests/test_delete_void_parameter/Makefile @@ -10,6 +10,3 @@ $(TEST): .c-xrefrc trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log .c-xrefrc diff --git a/tests/test_edit_server_test_example/Makefile b/tests/test_edit_server_test_example/Makefile index 03c8bab8..914712ae 100644 --- a/tests/test_edit_server_test_example/Makefile +++ b/tests/test_edit_server_test_example/Makefile @@ -9,9 +9,6 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_extract_out_argument/Makefile b/tests/test_extract_out_argument/Makefile index acda2baa..dd2365f4 100644 --- a/tests/test_extract_out_argument/Makefile +++ b/tests/test_extract_out_argument/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-extract-function -olmark=50 -olcursor=80 $(CURDIR)/source.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_extract_with_complicated_comments_around/Makefile b/tests/test_extract_with_complicated_comments_around/Makefile index 65b77719..b9ae1dff 100644 --- a/tests/test_extract_with_complicated_comments_around/Makefile +++ b/tests/test_extract_with_complicated_comments_around/Makefile @@ -1,7 +1,7 @@ include ../Makefile.boilerplate -$(TEST): clean +$(TEST): @-$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp > output $(VERIFY) @@ -9,9 +9,6 @@ $(TEST): clean trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - @-rm -rf CXrefs output.log output.tmp output - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_extract_with_return/Makefile b/tests/test_extract_with_return/Makefile index 6e523263..33a18de3 100644 --- a/tests/test_extract_with_return/Makefile +++ b/tests/test_extract_with_return/Makefile @@ -1,7 +1,7 @@ include ../Makefile.boilerplate -$(TEST): clean +$(TEST): @-$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp > output @diff output expected > /dev/null ; \ @@ -18,9 +18,6 @@ $(TEST): clean trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - @-rm -rf CXrefs output.log output.tmp output - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_fileunused/Makefile b/tests/test_fileunused/Makefile index 430c58af..186110ed 100644 --- a/tests/test_fileunused/Makefile +++ b/tests/test_fileunused/Makefile @@ -1,7 +1,7 @@ include ../Makefile.boilerplate -$(TEST): clean +$(TEST): @-$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp > output @diff output expected > /dev/null ; \ @@ -18,9 +18,6 @@ $(TEST): clean trace: EXTRA = --extra "-trace -log=log" trace: $(TEST) -clean: - @-rm -rf CXrefs output.log output.tmp output - DEBUGGER = gdb debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & diff --git a/tests/test_for_with_declaration/Makefile b/tests/test_for_with_declaration/Makefile index ea725ba0..f8140d2d 100644 --- a/tests/test_for_with_declaration/Makefile +++ b/tests/test_for_with_declaration/Makefile @@ -2,7 +2,7 @@ include ../Makefile.boilerplate $(TEST): .c-xrefrc - $(COMMAND) > out + $(COMMAND) > output.tmp @$(NORMALIZE) output.tmp > output grep "error len" output ; \ if [ $$? -eq 0 ] ; then \ @@ -10,6 +10,3 @@ $(TEST): .c-xrefrc else \ $(OK) ; \ fi - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_full_update/Makefile b/tests/test_full_update/Makefile index eb4c223a..f1be81c3 100644 --- a/tests/test_full_update/Makefile +++ b/tests/test_full_update/Makefile @@ -16,6 +16,3 @@ CXrefs: .c-xrefrc sed -e s:$(CURDIR)$$:$(CURDIR)/cexercise: .c-xrefrc > .c-xrefrc.tmp mv .c-xrefrc.tmp .c-xrefrc $(CXREF) -create -o $(TEST).log - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_get_available_refactorings_without_mark/Makefile b/tests/test_get_available_refactorings_without_mark/Makefile index fa2d1160..68a67998 100644 --- a/tests/test_get_available_refactorings_without_mark/Makefile +++ b/tests/test_get_available_refactorings_without_mark/Makefile @@ -18,9 +18,6 @@ $(TEST): .c-xrefrc trace: EXTRA=--extra "-trace" trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 15 > output.tmp & sleep 1 diff --git a/tests/test_get_environment_value/Makefile b/tests/test_get_environment_value/Makefile index 7c5937a6..9f16a83e 100644 --- a/tests/test_get_environment_value/Makefile +++ b/tests/test_get_environment_value/Makefile @@ -12,9 +12,6 @@ trace: $(TEST) CXrefs: .c-xrefrc @$(CXREF) -create test_source -o cxrefs.log -clean: - rm -rf .c-xrefrc CXrefs output* - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_get_project/Makefile b/tests/test_get_project/Makefile index 4b1e7a7b..1fa2c378 100644 --- a/tests/test_get_project/Makefile +++ b/tests/test_get_project/Makefile @@ -13,9 +13,6 @@ trace: $(TEST) CXrefs: @sed -e "s+CURDIR+$(CURDIR)+g" -e "s+TEST+$(TEST)+g" -e"s+SRCDIR+$(realpath ../../src)+" c-xref.project >> .c-xrefrc -clean: - rm -rf .c-xrefrc CXrefs output* - debug: $(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_get_project_new/Makefile b/tests/test_get_project_new/Makefile index e67c87cf..0d506803 100644 --- a/tests/test_get_project_new/Makefile +++ b/tests/test_get_project_new/Makefile @@ -4,7 +4,7 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -olcxgetprojectname $(CURDIR)/index.c $(TEST): CXrefs - $(COMMAND) > output.tmp + $(COMMAND) 2>1 > output.tmp $(NORMALIZE) output.tmp | grep -v -w progress > output $(VERIFY) @@ -13,6 +13,3 @@ trace: $(TEST) CXrefs: .c-xrefrc $(CXREF) -create - -clean: - rm -rf CXrefs output* .c-xrefrc diff --git a/tests/test_globalunused/Makefile b/tests/test_globalunused/Makefile index ddc584ed..78b0e647 100644 --- a/tests/test_globalunused/Makefile +++ b/tests/test_globalunused/Makefile @@ -14,12 +14,7 @@ ARGUMENTS = -create CXrefs: .c-xrefrc @$(CXREF) -create -o $(TEST).log -clean: - @-rm -rf CXrefs output.log output.tmp output - - -DEBUGGER = gdb debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 - sudo $(DEBUGGER) -pid `pgrep -a c-xref | grep -v emacs | awk '{ print $$1 }'` -ex 'br scanForGlobalUnused' -ex 'br setSelectedVisibleItems' -ex 'continue' + sudo gdb -pid `pgrep -a c-xref | grep -v emacs | awk '{ print $$1 }'` -ex 'br scanForGlobalUnused' -ex 'br setSelectedVisibleItems' -ex 'continue' diff --git a/tests/test_include_brackets/Makefile b/tests/test_include_brackets/Makefile index c19ab358..00b3f803 100644 --- a/tests/test_include_brackets/Makefile +++ b/tests/test_include_brackets/Makefile @@ -15,6 +15,3 @@ $(TEST): .c-xrefrc trace: TRACE = -trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_include_macro/Makefile b/tests/test_include_macro/Makefile index e9f4abc9..fb3c389f 100644 --- a/tests/test_include_macro/Makefile +++ b/tests/test_include_macro/Makefile @@ -10,6 +10,3 @@ $(TEST): .c-xrefrc trace: TRACE = -trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_include_next/Makefile b/tests/test_include_next/Makefile index e6afc5cf..9c42aedd 100644 --- a/tests/test_include_next/Makefile +++ b/tests/test_include_next/Makefile @@ -31,6 +31,3 @@ $(TEST): .c-xrefrc else \ $(OK) ; \ fi - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_initializer_parsing/Makefile b/tests/test_initializer_parsing/Makefile index 24117de9..6f408931 100644 --- a/tests/test_initializer_parsing/Makefile +++ b/tests/test_initializer_parsing/Makefile @@ -12,6 +12,3 @@ $(TEST): .c-xrefrc fi @$(OK) @exit 0 - -clean: - @rm -rf $@.log CXrefs .c-xrefrc *output diff --git a/tests/test_java_not_supported/Makefile b/tests/test_java_not_supported/Makefile index de09e843..5e0318b8 100644 --- a/tests/test_java_not_supported/Makefile +++ b/tests/test_java_not_supported/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-add-param -olcxparnum=2 -rfct-param1=int\ arg -rfct-param2=42 -olcursor=17 $(CURDIR)/file.java -$(TEST): clean +$(TEST): -$(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_move_c_function/Makefile b/tests/test_move_c_function/Makefile index 701cc19e..e0e04593 100644 --- a/tests/test_move_c_function/Makefile +++ b/tests/test_move_c_function/Makefile @@ -10,9 +10,3 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - -command: - echo $(COMMAND) diff --git a/tests/test_move_parameter_with_void_pointer/Makefile b/tests/test_move_parameter_with_void_pointer/Makefile index ced7341c..d03c81a2 100644 --- a/tests/test_move_parameter_with_void_pointer/Makefile +++ b/tests/test_move_parameter_with_void_pointer/Makefile @@ -3,13 +3,10 @@ include ../Makefile.boilerplate ARGUMENTS = -xrefactory-II -refactory -rfct-move-param -olcxparnum=1 -olcxparnum2=2 -olcursor=17 $(CURDIR)/source.c -$(TEST): clean +$(TEST): $(COMMAND) -log=log $(EXTRA) > output.tmp @$(NORMALIZE) output.tmp | grep -v progress > output @$(VERIFY) trace: EXTRA=-trace trace: $(TEST) - -clean: - @-rm -rf CXrefs output.log output.tmp output log diff --git a/tests/test_multiline_string_lexing/Makefile b/tests/test_multiline_string_lexing/Makefile index ffa6eedb..ba14d29c 100644 --- a/tests/test_multiline_string_lexing/Makefile +++ b/tests/test_multiline_string_lexing/Makefile @@ -3,11 +3,8 @@ include ../Makefile.boilerplate ARGUMENTS = source.c # This test will always succeed unless c-xref fails, it used to hang on unterminated macro -$(TEST): clean +$(TEST): @$(COMMAND) -o output.tmp @$(NORMALIZE) output.tmp >> output @$(OK) @exit 0 - -clean: - @-rm -rf CXrefs output.log output.tmp output diff --git a/tests/test_no_errors_on_communication_channel/Makefile b/tests/test_no_errors_on_communication_channel/Makefile index fa5fb35b..095b89a2 100644 --- a/tests/test_no_errors_on_communication_channel/Makefile +++ b/tests/test_no_errors_on_communication_channel/Makefile @@ -20,9 +20,6 @@ trace: $(TEST) CXrefs: .c-xrefrc @$(CXREF) test_source -o cxrefs.log -clean: - rm -rf .c-xrefrc CXrefs output* *.log - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_old_style_func/Makefile b/tests/test_old_style_func/Makefile index 71047ff9..41ef6a32 100644 --- a/tests/test_old_style_func/Makefile +++ b/tests/test_old_style_func/Makefile @@ -15,7 +15,3 @@ $(TEST): .c-xrefrc trace: TRACE = -trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - diff --git a/tests/test_orig.c-xref/Makefile b/tests/test_orig.c-xref/Makefile index ececbd9f..bf6c833b 100644 --- a/tests/test_orig.c-xref/Makefile +++ b/tests/test_orig.c-xref/Makefile @@ -5,6 +5,3 @@ $(TEST): .c-xrefrc cat server-buffer >> output.tmp $(NORMALIZE) output.tmp > output $(VERIFY) - -clean: - rm -r .c-xrefrc output* CXrefs diff --git a/tests/test_prune_option/Makefile b/tests/test_prune_option/Makefile index da8325d2..04006c13 100644 --- a/tests/test_prune_option/Makefile +++ b/tests/test_prune_option/Makefile @@ -15,6 +15,3 @@ $(TEST): .c-xrefrc trace: TRACE = -trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_rename/Makefile b/tests/test_rename/Makefile index bb6b7296..e440f3d5 100644 --- a/tests/test_rename/Makefile +++ b/tests/test_rename/Makefile @@ -9,9 +9,6 @@ $(TEST): trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_rename_with_update/Makefile b/tests/test_rename_with_update/Makefile index bb6b7296..e440f3d5 100644 --- a/tests/test_rename_with_update/Makefile +++ b/tests/test_rename_with_update/Makefile @@ -9,9 +9,6 @@ $(TEST): trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_show_available_refactorings/Makefile b/tests/test_show_available_refactorings/Makefile index cb97cd4f..2c3fc75f 100644 --- a/tests/test_show_available_refactorings/Makefile +++ b/tests/test_show_available_refactorings/Makefile @@ -9,9 +9,6 @@ $(TEST): trace: EXTRA=--extra "-trace" trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 15 > output.tmp & sleep 1 diff --git a/tests/test_show_refactorings_for_macro/Makefile b/tests/test_show_refactorings_for_macro/Makefile index aec791ec..3ec63920 100644 --- a/tests/test_show_refactorings_for_macro/Makefile +++ b/tests/test_show_refactorings_for_macro/Makefile @@ -14,9 +14,6 @@ CXrefs: .c-xrefrc @sed -e s:$(CURDIR)$$:$(CURDIR)/cexercise: .c-xrefrc > .c-xrefrc.tmp @mv .c-xrefrc.tmp .c-xrefrc -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_simple_block/Makefile b/tests/test_simple_block/Makefile index bcfc6db3..41ef6a32 100644 --- a/tests/test_simple_block/Makefile +++ b/tests/test_simple_block/Makefile @@ -15,6 +15,3 @@ $(TEST): .c-xrefrc trace: TRACE = -trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs output.log output.tmp diff --git a/tests/test_simple_complete/Makefile b/tests/test_simple_complete/Makefile index 5babb3af..9bfe07b3 100644 --- a/tests/test_simple_complete/Makefile +++ b/tests/test_simple_complete/Makefile @@ -14,9 +14,6 @@ trace: $(TEST) CXrefs: .c-xrefrc @$(CXREF) test_source -create -o $(TEST).log -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_simple_push/Makefile b/tests/test_simple_push/Makefile index ef363aa9..02d1014f 100644 --- a/tests/test_simple_push/Makefile +++ b/tests/test_simple_push/Makefile @@ -9,9 +9,6 @@ $(TEST): .c-xrefrc trace: EXTRA = \'-trace\' trace: $(TEST) -clean: - rm -rf .c-xrefrc CXrefs output* - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_simple_tagsearch/Makefile b/tests/test_simple_tagsearch/Makefile index 0eb2718d..749b0bd0 100644 --- a/tests/test_simple_tagsearch/Makefile +++ b/tests/test_simple_tagsearch/Makefile @@ -12,9 +12,6 @@ trace: $(TEST) CXrefs: @$(CXREF) -create test_source -o $(TEST).log -clean: - rm -rf CXrefs .c-xrefrc - debug: @$(EDIT_SERVER_DRIVER) commands.input $(EXTRA) --delay 5 > output.tmp & sleep 1 diff --git a/tests/test_single_reference_file/Makefile b/tests/test_single_reference_file/Makefile index 88cf933a..1b3fb8fd 100644 --- a/tests/test_single_reference_file/Makefile +++ b/tests/test_single_reference_file/Makefile @@ -8,6 +8,3 @@ $(TEST): @$(COMMAND) @$(NO_TESTS) @exit 0 - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_uint32_t/Makefile b/tests/test_uint32_t/Makefile index 54328dc7..6b1e17f6 100644 --- a/tests/test_uint32_t/Makefile +++ b/tests/test_uint32_t/Makefile @@ -33,6 +33,3 @@ $(TEST): .c-xrefrc .PHONY: trace trace: TRACE=-trace trace: $(TEST) - -clean: - rm -rf .c-xrefrc CXrefs out output output.log output.tmp diff --git a/tests/test_update/Makefile b/tests/test_update/Makefile index 056a7768..48e2d095 100644 --- a/tests/test_update/Makefile +++ b/tests/test_update/Makefile @@ -17,6 +17,3 @@ CXrefs: .c-xrefrc sed -e s:$(CURDIR)$$:$(CURDIR)/cexercise: .c-xrefrc > .c-xrefrc.tmp mv .c-xrefrc.tmp .c-xrefrc $(CXREF) -create -o $(TEST).log - -clean: - rm -rf CXrefs .c-xrefrc diff --git a/tests/test_yacc_completions/Makefile b/tests/test_yacc_completions/Makefile index aa1c9ca8..8ca36b37 100644 --- a/tests/test_yacc_completions/Makefile +++ b/tests/test_yacc_completions/Makefile @@ -14,6 +14,3 @@ CXrefs: .c-xrefrc @sed -e s:$(CURDIR)$$:$(CURDIR)/cexercise: .c-xrefrc > .c-xrefrc.tmp @mv .c-xrefrc.tmp .c-xrefrc @$(CXREF) -create -o $(TEST).log - -clean: - rm -rf CXrefs .c-xrefrc