mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-02 14:52:19 +00:00
test: replace use of pcre grep with awk
Unfortunately, grep -P is not ubiquitous, so use awk with two regexps to simulate the negative forward lookup in the grep -P expression. Using awk doesn't really make it too unreadable, as using boolean operators such as && and || might actually make it more intuitive than the extended regexp. Tested: - sudo make -C test zdtm_ns - sudo make -C test zdtm_nons Signed-off-by: Filipe Brandenburger <filbranden@google.com> Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
ee8cd3c261
commit
3a8cf03d94
1 changed files with 2 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
TST = $(shell ./zdtm.sh -l)
|
||||
EXP = '^ns/(?!.*(tty|pty))'
|
||||
|
||||
ZDTM_ARGS ?= -C
|
||||
|
||||
|
|
@ -25,8 +24,8 @@ fault-injection: .FORCE
|
|||
$(MAKE) -C fault-injection
|
||||
.PHONY: fault-injection
|
||||
|
||||
zdtm_ns: $(shell echo "$(TST)" | tr ' ' '\n' | grep -P $(EXP))
|
||||
zdtm_nons: $(shell echo "$(TST)" | tr ' ' '\n' | grep -vP $(EXP))
|
||||
zdtm_ns: $(shell echo "$(TST)" | tr ' ' '\n' | awk '/^ns\// && !/tty|pty/ {print}')
|
||||
zdtm_nons: $(shell echo "$(TST)" | tr ' ' '\n' | awk '!/^ns\// || /tty|pty/ {print}')
|
||||
|
||||
override CFLAGS += -D_GNU_SOURCE
|
||||
zdtm_ct: zdtm_ct.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue