diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2022-11-22 15:36:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 15:36:06 +0800 |
commit | 29d02b75fb6c0b664af56011d8292d1e71c96913 (patch) | |
tree | 81b11cf8febfe7a822ae9b22cc1fba7ca9960517 | |
parent | 96d9f40c9d5649089031c476cf37728013212288 (diff) | |
parent | 60f654cf6b7a072f1e840a037881237cdbcff0ee (diff) | |
download | riscv-gnu-toolchain-2022.11.23.zip riscv-gnu-toolchain-2022.11.23.tar.gz riscv-gnu-toolchain-2022.11.23.tar.bz2 |
Merge pull request #1139 from cmuellner/testing2022.11.23
Enhance the testing experience
-rw-r--r-- | Makefile.in | 15 | ||||
-rw-r--r-- | README.md | 35 |
2 files changed, 47 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index 455a378..09c5772 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 @@ -873,17 +875,24 @@ 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 > $@ + +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 > $@ @@ -210,6 +210,41 @@ 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`. +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 |