From 162c7471a9d6c6e845380c0027594d103c0f5d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Wed, 25 Dec 2024 20:50:27 +0800 Subject: [PATCH] tests: delete `cat-and-grep-sanity-check` They were helper tests to check `cat` and `grep` behavior because `Makefile` tests were relying on those utils. Now that we don't use these tools, this test is no longer relevant. Co-authored-by: Oneirical --- .../tidy/src/allowed_run_make_makefiles.txt | 1 - .../cat-and-grep-sanity-check/Makefile | 50 ------------------- 2 files changed, 51 deletions(-) delete mode 100644 tests/run-make/cat-and-grep-sanity-check/Makefile diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 0e156b9d1ac9a..5453b5c0db533 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -1,5 +1,4 @@ run-make/branch-protection-check-IBT/Makefile -run-make/cat-and-grep-sanity-check/Makefile run-make/extern-fn-reachable/Makefile run-make/incr-add-rust-src-component/Makefile run-make/jobserver-error/Makefile diff --git a/tests/run-make/cat-and-grep-sanity-check/Makefile b/tests/run-make/cat-and-grep-sanity-check/Makefile deleted file mode 100644 index 8ee69c0a0de19..0000000000000 --- a/tests/run-make/cat-and-grep-sanity-check/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# grep in run-make tests was partially replaced with a custom script, CGREP. This tests that CGREP does its job correctly. -# See https://github.com/rust-lang/rust/commit/ab788a2ee175c7560f0ca58bbc183ecfd57d2f7a -# FIXME(Oneirical): Note that this test will likely become useless after the port to rmake.rs tests (see https://github.com/rust-lang/rust/issues/121876) - -include ../tools.mk - -all: - echo a | $(CGREP) a - ! echo b | $(CGREP) a - echo xyz | $(CGREP) x y z - ! echo abc | $(CGREP) b c d - printf "x\ny\nz" | $(CGREP) x y z - - echo AbCd | $(CGREP) -i a b C D - ! echo AbCd | $(CGREP) a b C D - - true | $(CGREP) -v nothing - ! echo nothing | $(CGREP) -v nothing - ! echo xyz | $(CGREP) -v w x y - ! echo xyz | $(CGREP) -v x y z - echo xyz | $(CGREP) -v a b c - - ! echo 'foo bar baz' | $(CGREP) 'foo baz' - echo 'foo bar baz' | $(CGREP) foo baz - echo 'x a `b` c y z' | $(CGREP) 'a `b` c' - - echo baaac | $(CGREP) -e 'ba*c' - echo bc | $(CGREP) -e 'ba*c' - ! echo aaac | $(CGREP) -e 'ba*c' - - echo aaa | $(CGREP) -e 'a+' - ! echo bbb | $(CGREP) -e 'a+' - - echo abc | $(CGREP) -e 'a|e|i|o|u' - ! echo fgh | $(CGREP) -e 'a|e|i|o|u' - echo abc | $(CGREP) -e '[aeiou]' - ! echo fgh | $(CGREP) -e '[aeiou]' - ! echo abc | $(CGREP) -e '[^aeiou]{3}' - echo fgh | $(CGREP) -e '[^aeiou]{3}' - echo ab cd ef gh | $(CGREP) -e '\bcd\b' - ! echo abcdefgh | $(CGREP) -e '\bcd\b' - echo xyz | $(CGREP) -e '...' - ! echo xy | $(CGREP) -e '...' - ! echo xyz | $(CGREP) -e '\.\.\.' - echo ... | $(CGREP) -e '\.\.\.' - - echo foo bar baz | $(CGREP) -e 'foo.*baz' - ! echo foo bar baz | $(CGREP) -ve 'foo.*baz' - ! echo foo bar baz | $(CGREP) -e 'baz.*foo' - echo foo bar baz | $(CGREP) -ve 'baz.*foo'