@@ -33,3 +33,23 @@ makeopts= # extra options passed to 'make'
# defaults to 'tar c'
#fate_targets= # targets to make when running fate; defaults to "fate",
# can be set to run a subset of tests, e.g. "fate-checkasm".
+
+#fate_environments= # a list of names of configurations to run tests for;
+ # each round is run with variables from ${${name}_env} set.
+
+# One example of using fate_environments:
+
+# target_exec="qemu-aarch64-static"
+# fate_targets="fate-checkasm fate-cpu"
+# fate_environments="sve128 sve256"
+# sve128_env="QEMU_CPU=max,sve128=on"
+# sve256_env="QEMU_CPU=max,sve256=on"
+
+# The variables set by fate_environments can also be used explicitly
+# by target_exec, e.g. like this:
+
+# target_exec="qemu-aarch64-static -cpu \$(MY_CPU)"
+# fate_targets="fate-checkasm fate-cpu"
+# fate_environments="sve128 sve256"
+# sve128_env="MY_CPU=max,sve128=on"
+# sve256_env="MY_CPU=max,sve256=on"
@@ -305,8 +305,8 @@ $(FATE): export PROGSUF = $(PROGSSUF)
$(FATE): export EXECSUF = $(EXESUF)
$(FATE): export HOSTEXECSUF = $(HOSTEXESUF)
$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | $(FATE_OUTDIRS)
- @echo "TEST $(@:fate-%=%)"
- $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' '$(KEEP_FILES)'
+ @echo "TEST $(@:fate-%=%)$(FATE_SUFFIX)"
+ $(Q)$(SRC_PATH)/tests/fate-run.sh $@$(FATE_SUFFIX) "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' '$(KEEP_FILES)'
fate-list:
@printf '%s\n' $(sort $(FATE))
@@ -101,7 +101,19 @@ compile_extra()(
fate()(
test "$build_only" = "yes" && return
cd ${build} || return
- ${make} ${makeopts_fate-${makeopts}} -k ${fate_targets}
+ if [ -n "${fate_environments}" ]; then
+ ret=0
+ for e in ${fate_environments}; do
+ eval "curenv=\${${e}_env}"
+ echo Testing environment ${e}: ${curenv}
+ ${make} ${makeopts_fate-${makeopts}} -k ${fate_targets} FATE_SUFFIX=_${e} ${curenv}
+ cur_ret=$?
+ test $cur_ret != 0 && ret=$cur_ret
+ done
+ return $ret
+ else
+ ${make} ${makeopts_fate-${makeopts}} -k ${fate_targets}
+ fi
)
clean(){