blob: 9e7cfdf5764982f2cf55208388254abb6ca8ae3c [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# uClibc API tests
2# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
3
4SHELL_TESTS := shell_tst-API
5run: $(SHELL_TESTS)
6
7define get_codes
8 $(subst .,,$(sort $(suffix $(subst -,.,$(foreach x,$(1),$(if $(findstring -,$(x)),$(x),))))))
9endef
10sym_files = $(patsubst %.syms,%,$(wildcard *.syms))
11stds = $(patsubst .%,%,$(sort $(suffix $(sym_files))))
12tests=$(foreach s,$(stds),$(patsubst %.$(s),%,$(sym_files)))
13codes=$(call get_codes,$(tests))
14
15shell_tst-API: uclibc_out=$(patsubst shell_%,%,$@).out
16shell_tst-API: glibc_out=$(patsubst shell_%,%_glibc,$@).out
17shell_tst-API:
18 @exec echo "DISABLED for now, needs improvement"
19shell_tst-API_DISABLED:
20 $(showtest)
21 $(Q)top_builddir=$(top_builddir) AWK=$(AWK) \
22 uclibc_out=$(uclibc_out) glibc_out=$(glibc_out) \
23 $(SHELL) \
24 $(patsubst shell_%,%.sh,$@) $(stds) "$(tests)"
25 $(do_showdiff) $(glibc_out) $(uclibc_out) ; \
26 exec diff -u "$(glibc_out)" "$(uclibc_out)"