We should be able to enter just 'make simtest' and not 'make simtest TFLAGS="-DTEST"'.
Same for extratest.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
@echo $(X) 2>&1
@cat $(EXTRADIR)/$(X) | $(TESTRUN)
-# Use "do_test" script to make the following target
+# Use "do_test" script to make the following targets
+simtest: DFLAGS += -DTEST
+
simtest: all testcomp
@$(foreach x, $(TESTLIST), $(MAKE) X=$x unit || exit;)
rm -f tests/root
ln -s root1 tests/root
@echo Simulation tests: Success!
+extratest: DFLAGS += -DTEST
+
extratest: all
@$(foreach x, $(EXTRALIST), $(MAKE) X=$x extraunit || exit;)
rm -f tests/root
make TFLAGS="-DTEST"
else
make distclean
- ./configure sa_lib_dir=. sar_dir=. conf_dir=. conf_file=sysstat.sysconfig sa_dir=tests --enable-debuginfo && make TFLAGS="-DTEST" && make simtest TFLAGS="-DTEST"
+ ./configure sa_lib_dir=. sar_dir=. conf_dir=. conf_file=sysstat.sysconfig sa_dir=tests --enable-debuginfo && make TFLAGS="-DTEST" && make simtest
fi
if [ "$?" = "0" -a "$1" = "all" ]
then
- make extratest TFLAGS="-DTEST" && make distclean && ./configure --disable-nls --disable-sensors --disable-pcp sa_lib_dir=. sar_dir=. conf_dir=. conf_file=sysstat.sysconfig sa_dir=tests --enable-debuginfo && make TFLAGS="-DTEST" && echo "EXTRA TESTS: Success!"
+ make extratest && make distclean && ./configure --disable-nls --disable-sensors --disable-pcp sa_lib_dir=. sar_dir=. conf_dir=. conf_file=sysstat.sysconfig sa_dir=tests --enable-debuginfo && make TFLAGS="-DTEST" && echo "EXTRA TESTS: Success!"
fi