lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # uClibc API tests |
| 2 | # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. |
| 3 | |
| 4 | SHELL_TESTS := shell_tst-API |
| 5 | run: $(SHELL_TESTS) |
| 6 | |
| 7 | define get_codes |
| 8 | $(subst .,,$(sort $(suffix $(subst -,.,$(foreach x,$(1),$(if $(findstring -,$(x)),$(x),)))))) |
| 9 | endef |
| 10 | sym_files = $(patsubst %.syms,%,$(wildcard *.syms)) |
| 11 | stds = $(patsubst .%,%,$(sort $(suffix $(sym_files)))) |
| 12 | tests=$(foreach s,$(stds),$(patsubst %.$(s),%,$(sym_files))) |
| 13 | codes=$(call get_codes,$(tests)) |
| 14 | |
| 15 | shell_tst-API: uclibc_out=$(patsubst shell_%,%,$@).out |
| 16 | shell_tst-API: glibc_out=$(patsubst shell_%,%_glibc,$@).out |
| 17 | shell_tst-API: |
| 18 | @exec echo "DISABLED for now, needs improvement" |
| 19 | shell_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)" |