From ad4317504b97ac619ea62a2cc981314a188775bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Fri, 30 Sep 2022 22:22:44 +0200 Subject: Makefile.in: Allow to pass additional test flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to specify the test cases to be run. For example the following command can be used to restrict the testcases that will be executed to zb*.c and sm*.c from the directory `gcc/testsuite/gcc.target/riscv/` (which includes the file `riscv.exp`): RUNTESTFLAGS="riscv.exp=zb*.c\ sm*.c" make report Signed-off-by: Christoph Müllner --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7a6f409..0894f67 100644 --- a/Makefile.in +++ b/Makefile.in @@ -867,17 +867,17 @@ stamps/build-dejagnu: $(srcdir)/dejagnu $(srcdir)/dejagnu/.git date > $@ stamps/check-gcc-newlib: stamps/build-gcc-newlib-stage2 $(SIM_STAMP) stamps/build-dejagnu - $(SIM_PREPARE) $(MAKE) -C build-gcc-newlib-stage2 check-gcc "RUNTESTFLAGS=--target_board='$(NEWLIB_TARGET_BOARDS)'" + $(SIM_PREPARE) $(MAKE) -C build-gcc-newlib-stage2 check-gcc "RUNTESTFLAGS=$(RUNTESTFLAGS) --target_board='$(NEWLIB_TARGET_BOARDS)'" mkdir -p $(dir $@) date > $@ stamps/check-gcc-newlib-nano: stamps/build-gcc-newlib-stage2 $(SIM_STAMP) stamps/build-dejagnu - $(SIM_PREPARE) $(MAKE) -C build-gcc-newlib-stage2 check-gcc "RUNTESTFLAGS=--target_board='$(NEWLIB_NANO_TARGET_BOARDS)'" + $(SIM_PREPARE) $(MAKE) -C build-gcc-newlib-stage2 check-gcc "RUNTESTFLAGS=$(RUNTESTFLAGS) --target_board='$(NEWLIB_NANO_TARGET_BOARDS)'" mkdir -p $(dir $@) date > $@ stamps/check-gcc-linux: stamps/build-gcc-linux-stage2 $(SIM_STAMP) stamps/build-dejagnu - $(SIM_PREPARE) $(MAKE) -C build-gcc-linux-stage2 check-gcc "RUNTESTFLAGS=--target_board='$(GLIBC_TARGET_BOARDS)'" + $(SIM_PREPARE) $(MAKE) -C build-gcc-linux-stage2 check-gcc "RUNTESTFLAGS=$(RUNTESTFLAGS) --target_board='$(GLIBC_TARGET_BOARDS)'" mkdir -p $(dir $@) date > $@ -- cgit v1.1 From 80cc8b2167aed71f6097b2dfdf34210c974733a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Wed, 5 Oct 2022 20:24:03 +0200 Subject: Makefile.in: Add support for running glibc tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makefile.in has support for running the regression test suite of Binutils, GCC and others. Let's add support for running glibc tests. To run the tests the following command can be used: make check-glibc-linux Tested with linux/rv64. Signed-off-by: Christoph Müllner --- Makefile.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile.in b/Makefile.in index 0894f67..b65d341 100644 --- a/Makefile.in +++ b/Makefile.in @@ -141,6 +141,8 @@ check-gcc: check-gcc-@default_target@ check-gcc-linux: stamps/check-gcc-linux check-gcc-newlib: stamps/check-gcc-newlib check-gcc-newlib-nano: stamps/check-gcc-newlib-nano +.PHONY: check-glibc-linux +check-glibc-linux: $(addprefix stamps/check-glibc-linux-,$(GLIBC_MULTILIB_NAMES)) .PHONY: check-dhrystone check-dhrystone-linux check-dhrystone-newlib check-dhrystone: check-dhrystone-@default_target@ .PHONY: check-binutils check-binutils-linux check-binutils-newlib @@ -881,6 +883,13 @@ stamps/check-gcc-linux: stamps/build-gcc-linux-stage2 $(SIM_STAMP) stamps/build- mkdir -p $(dir $@) date > $@ +stamps/check-glibc-linux-%: $(addprefix stamps/build-glibc-linux-,$(GLIBC_MULTILIB_NAMES)) + $(eval $@_BUILD_DIR := $(notdir $@)) + $(eval $@_BUILD_DIR := $(subst check-,build-,$($@_BUILD_DIR))) + $(SIM_PREPARE) $(MAKE) -C $($@_BUILD_DIR) check + mkdir -p $(dir $@) + date > $@ + .PHONY: check-dhrystone-newlib check-dhrystone-newlib-nano check-dhrystone-newlib: $(patsubst %,stamps/check-dhrystone-newlib-%,$(NEWLIB_MULTILIB_NAMES)) check-dhrystone-newlib-nano: $(patsubst %,stamps/check-dhrystone-newlib-nano-%,$(NEWLIB_MULTILIB_NAMES)) -- cgit v1.1 From 60c52678af488db7f819f7004bd27947e58fb454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Wed, 5 Oct 2022 20:43:21 +0200 Subject: README.md: Add information how to run GCC, Binutils, glibc tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's document how to run all the test suites in order to increase the number of people that will execute the tests. Signed-off-by: Christoph Müllner --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2811132..6af46c4 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,22 @@ Note: - spike only support rv64* bare-metal/elf toolchain. - gdb simulator only support bare-metal/elf toolchain. +#### Testing GCC, Binutils, and glibc of a Linux toolchain + +The default Makefile target to run toolchain tests is `report`. +This will run all tests of the GCC regression test suite. +Alternatively, the following command can be used to do the same: + + make check-gcc + +The following command can be used to run the Binutils tests: + + make check-binutils + +The command below can be used to run the glibc tests: + + make check-glibc-linux + ### Development This section is only for developer or advanced user, or you want to build -- cgit v1.1 From 60f654cf6b7a072f1e840a037881237cdbcff0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Mon, 10 Oct 2022 12:05:34 +0200 Subject: README: Document usage of RUNTESTFLAGS for `make check` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's document how to use the environment variable RUNTESTFLAGS for selecting the tests that should be executed. Signed-off-by: Christoph Müllner --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 6af46c4..1d7cc0d 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,25 @@ Note: - spike only support rv64* bare-metal/elf toolchain. - gdb simulator only support bare-metal/elf toolchain. +#### Selecting the tests to run in GCC's regression test suite + +By default GCC will execute all tests of its regression test suite. +While running them in parallel (e.g. `make -j$(nproc) report`) will +significanlty speed up the execution time on multi-processor systems, +the required time for executing all tests is usually too high for +typical development cycles. Therefore GCC allows to select the tests +that are being executed using the environment variable `RUNTESTFLAGS`. + +To restrict a test run to only RISC-V specific tests +the following command can be used: + + RUNTESTFLAGS="riscv.exp" make report + +To to restrict a test run to only RISC-V specific tests with match the +pattern "zb*.c" and "sm*.c" the following command can be used: + + RUNTESTFLAGS="riscv.exp=zb*.c\ sm*.c" make report + #### Testing GCC, Binutils, and glibc of a Linux toolchain The default Makefile target to run toolchain tests is `report`. -- cgit v1.1