Re: [LTP] [PATCH v3 2/4] Add support for mixing C and shell code

Cyril Hrubis
2024-09-16T09:54:23Z

Hi!
> I hoped testcases/lib/run_tests.sh could be run in CI (and manually).
>
> We have in the toplevel Makefile other test targets, could we add
> testcases/lib/run_tests.sh to test-shell target?
>
> 1) Add test target to testcases/lib/tests/Makefile (similar to
> metadata/tests/Makefile).
>
> test:
> @echo == Run C - shell integration tests ===
> @./run_tests.sh
>
> 2) Add test target to testcases/lib/Makefile which would call test target in the
> test/ directory (similar to metadata/Makefile).
>
> test:
> $(MAKE) -C $(abs_srcdir)/tests/ test
>
> 3) Add testing to the toplevel test-shell target + build dependency to testcases/lib/.
>
> test-shell: lib-all
> ifneq ($(build),$(host))
> $(error running tests on cross-compile build not supported)
> endif
> $(call _test,-s)
> $(MAKE) -C $(abs_top_builddir)/testcases/lib
> $(MAKE) -C $(abs_top_srcdir)/testcases/lib test

Quite a few of these testcases fail in order to test failures, we need
to be able to record the test output and compare that with the expected
outcome first, in order to make these tests useful. And I guess that we
need that for the C library tests as well. So I would rather do this
later for both libraries instead.

--
Cyril Hrubis
chrubis@suse.cz