sim: testsuite: merge into toplevel automake
authorMike Frysinger <vapier@gentoo.org>
Sun, 17 Jan 2021 16:13:37 +0000 (11:13 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 7 Mar 2021 20:54:53 +0000 (15:54 -0500)
This allows us to delete most of our custom test logic,
and avoids a recursive make for minor speed up.

sim/ChangeLog
sim/Makefile.am
sim/Makefile.in
sim/common/ChangeLog
sim/common/Make-common.in
sim/configure
sim/configure.ac
sim/testsuite/ChangeLog
sim/testsuite/Makefile.in [deleted file]
sim/testsuite/lib/sim-defs.exp
sim/testsuite/local.mk [new file with mode: 0644]

index f31c165ea640e5863c10af6f1cf0e177d147fd84..6b27cb46a8f751759d74a66cf609bdfef22a1058 100644 (file)
@@ -1,3 +1,10 @@
+2021-03-07  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (AC_CONFIG_FILES): Delete testsuite/Makefile.
+       * Makefile.am: Include testsuite/local.mk.
+       (AUTOMAKE_OPTIONS): Add dejagnu.
+       * configure, Makefile.in: Regenerated.
+
 2021-03-07  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.am: New file.
index bcca70623e9af0c870d948fbcda6c148cbb9f375..c6e2d04f33ae549af5806e8cdeb1de7411226b7b 100644 (file)
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AUTOMAKE_OPTIONS = foreign no-dist subdir-objects
+AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
 ACLOCAL_AMFLAGS = -I.. -I../config
 
 srcroot = $(srcdir)/..
@@ -34,3 +34,5 @@ MOSTLYCLEANFILES = core
 nltvals:
        $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
        $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
+
+include testsuite/local.mk
index cda770d349ce27800dba12451bb0f2a014cf5d61..390a8575a7591d347379ef33bd3fd4cbbcb775e7 100644 (file)
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 VPATH = @srcdir@
 am__is_gnu_make = { \
   if test -z '$(MAKELEVEL)'; then \
@@ -116,7 +132,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_CLEAN_FILES = testsuite/Makefile
+CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -172,6 +188,10 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
+DEJATOOL = $(PACKAGE)
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXPECT = expect
+RUNTEST = runtest
 DIST_SUBDIRS = $(SUBDIRS)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -275,17 +295,20 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign no-dist subdir-objects
+AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
 ACLOCAL_AMFLAGS = -I.. -I../config
 srcroot = $(srcdir)/..
 SUBDIRS = @subdirs@
-MOSTLYCLEANFILES = core
+MOSTLYCLEANFILES = core site-srcdir.exp testrun.log testrun.sum
+
+# Tweak the site.exp so it works with plain `runtest` from user.
+EXTRA_DEJAGNU_SITE_CONFIG = site-srcdir.exp
 all: all-recursive
 
 .SUFFIXES:
 am--refresh: Makefile
        @:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/testsuite/local.mk $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -307,6 +330,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/testsuite/local.mk $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
@@ -316,8 +340,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
-testsuite/Makefile: $(top_builddir)/config.status $(top_srcdir)/testsuite/Makefile.in
-       cd $(top_builddir) && $(SHELL) ./config.status $@
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
@@ -424,7 +446,40 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
        -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
+       @echo 'Making a new site.exp file ...'
+       @echo '## these variables are automatically generated by make ##' >site.tmp
+       @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+       @echo '# edit the last section' >>site.tmp
+       @echo 'set srcdir "$(srcdir)"' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo 'set target_alias "$(target_alias)"' >>site.tmp
+       @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
+         echo "## Begin content included from file $$f.  Do not modify. ##" \
+          && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
+          && echo "## End content included from file $$f. ##" \
+          || exit 1; \
+        done >> site.tmp
+       @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
+       @if test -f site.exp; then \
+          sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
+        fi
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+       -rm -f site.exp site.bak
+       -l='$(DEJATOOL)'; for tool in $$l; do \
+         rm -f $$tool.sum $$tool.log; \
+       done
 check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
 check: check-recursive
 all-am: Makefile
 installdirs: installdirs-recursive
@@ -467,7 +522,8 @@ clean-am: clean-generic mostlyclean-am
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-DEJAGNU distclean-generic \
+       distclean-tags
 
 dvi: dvi-recursive
 
@@ -529,18 +585,18 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(am__recursive_targets) install-am install-strip
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
-       am--refresh check check-am clean clean-cscope clean-generic \
-       cscope cscopelist-am ctags ctags-am distclean \
-       distclean-generic distclean-tags dvi dvi-am html html-am info \
-       info-am install install-am install-data install-data-am \
-       install-dvi install-dvi-am install-exec install-exec-am \
-       install-html install-html-am install-info install-info-am \
-       install-man install-pdf install-pdf-am install-ps \
-       install-ps-am install-strip installcheck installcheck-am \
-       installdirs installdirs-am maintainer-clean \
+       am--refresh check check-DEJAGNU check-am clean clean-cscope \
+       clean-generic cscope cscopelist-am ctags ctags-am distclean \
+       distclean-DEJAGNU distclean-generic distclean-tags dvi dvi-am \
+       html html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs installdirs-am maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags tags-am uninstall uninstall-am
 
@@ -558,6 +614,18 @@ nltvals:
        $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
        $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
 
+site-srcdir.exp: Makefile
+       echo "set srcdir \"$(srcdir)/testsuite\"" > $@
+
+check-DEJAGNU: site.exp
+       LC_ALL=C; export LC_ALL; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+         $$runtest $(RUNTESTFLAGS); \
+       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+       fi
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 35c10a550dde5ab5dcbc03baf4d064b61430189f..6b6df9282b05a851a8f8873f39fbca49781818a9 100644 (file)
@@ -1,3 +1,7 @@
+2021-03-07  Mike Frysinger  <vapier@gentoo.org>
+
+       * Make-common.in (check): Delete body.
+
 2021-02-28  Mike Frysinger  <vapier@gentoo.org>
 
        * Make-common.in (SIM_EXTRA_LIBDEPS): Delete.
index 3f16dc476ef5cc8be9b47f3b7b49a9299c5e1d2b..cf92e94993c5a5e1110a9226718e75c5a205b286 100644 (file)
@@ -471,7 +471,6 @@ installdirs:
        $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
 
 check:
-       cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
 
 info:
 clean-info:
index b0179bb0cc990f9fd812d9e226a44b068e314116..54a52541ea3ca1c97c64de2882462544f9b848be 100755 (executable)
@@ -4953,7 +4953,7 @@ subdirs="$subdirs aarch64"
   fi
 fi
 
-ac_config_files="$ac_config_files Makefile testsuite/Makefile"
+ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -5703,7 +5703,6 @@ do
   case $ac_config_target in
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
index de5779642c508eb5105a63f6a6d0d2683a85c8fb..23478521e94c0e3b057efe9fd933f84d1a251fde 100644 (file)
@@ -152,5 +152,5 @@ if test "${enable_sim}" != no; then
   fi
 fi
 
-AC_CONFIG_FILES([Makefile testsuite/Makefile])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
index 9eadd5fc400cbeda6219091878ad12c5a29fb9b0..a88c99508436546c52c1f5b36a80a68a7892a524 100644 (file)
@@ -1,3 +1,9 @@
+2021-03-07  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in: Removed.
+       * lib/sim-defs.exp (sim): Update default path.
+       * local.mk: New file based on Makefile.in.
+
 2021-02-13  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (arch): Delete.
diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
deleted file mode 100644 (file)
index 8db77d2..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-# Makefile for regression testing the GNU debugger.
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-build_canonical = @build@
-build_alias = @build_alias@
-host_canonical = @host@
-host_alias = @host_alias@
-target_canonical = @target@
-target_alias = @target_alias@
-program_transform_name = @program_transform_name@
-
-SHELL = /bin/sh
-SUBDIRS = @subdirs@
-RPATH_ENVVAR = @RPATH_ENVVAR@
-
-EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
-          echo $${rootme}/../../expect/expect ; \
-          else echo expect ; fi`
-
-RUNTEST = `if [ -f $${srcdir}/../../dejagnu/runtest ] ; then \
-               echo $${srcdir}/../../dejagnu/runtest ; else echo runtest; \
-          fi`
-
-RUNTESTFLAGS =
-
-#### host, target, and site specific Makefile frags come in here.
-
-# The use of $$(x_FOR_TARGET) reduces the command line length by not
-# duplicating the lengthy definition.
-
-TARGET_FLAGS_TO_PASS = \
-        "prefix=$(prefix)" \
-        "exec_prefix=$(exec_prefix)" \
-        "against=$(against)" \
-        'CC=$$(CC_FOR_TARGET)' \
-        "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
-        "CFLAGS=$(TESTSUITE_CFLAGS)" \
-        "CHILLFLAGS=$(CHILLFLAGS)" \
-        'CHILL=$$(CHILL_FOR_TARGET)' \
-        "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
-        "CHILL_LIB=$(CHILL_LIB)" \
-        'CXX=$$(CXX_FOR_TARGET)' \
-        "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
-        "CXXFLAGS=$(CXXFLAGS)" \
-        "MAKEINFO=$(MAKEINFO)" \
-        "INSTALL=$(INSTALL)" \
-        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-        "INSTALL_DATA=$(INSTALL_DATA)" \
-        "RUNTESTFLAGS=$(RUNTESTFLAGS)"
-
-#        "RUNTEST=$(RUNTEST)" \
-
-all:
-       @echo "Nothing to be done for all..."
-
-.NOEXPORT:
-info:
-install-info:
-dvi:
-
-install:
-install-strip:
-
-uninstall: force
-
-installcheck:
-
-check:  check-DEJAGNU check-recursive
-
-#test1:
-check-recursive: 
-       @for i in . ${SUBDIRS}; do \
-               if [ $$i = . ] ; then continue ; fi ; \
-               if [ -d ./$$i ] ; then \
-                       if (rootme=`pwd`/ ; export rootme ; \
-                           rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
-                                echo "check recursively into $$i directory..."; \
-                               cd ./$$i; \
-                               $(MAKE) $(TARGET_FLAGS_TO_PASS) check) ; then true ; \
-                       else exit 1 ; fi ; \
-               else true ; fi ; \
-       done
-
-#test2:        
-check-DEJAGNU: site.exp
-       echo "Dejagnu-checking in `pwd` directory ..."
-       rootme=`pwd`; export rootme; echo rootme = $$rootme; \
-       srcdir=`cd ${srcdir}; pwd`; export srcdir ; echo srcdir = $$srcdir; \
-       EXPECT=${EXPECT} ; export EXPECT ; echo EXPECT = $$EXPECT; \
-       if [ -f $$rootme/../../expect/expect ]; then \
-         TCL_LIBRARY=`cd $$srcdir/../../tcl/library && pwd`; \
-         export TCL_LIBRARY; \
-       fi; \
-        echo TCL_LIBRARY = $$TCL_LIBRARY; \
-       runtest=$(RUNTEST); echo runtest = $$runtest; \
-       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
-         $$runtest $(RUNTESTFLAGS); \
-       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
-       fi
-
-
-site.exp: Makefile
-       @echo 'Making a new site.exp file...'
-       -@rm -f site.bak
-       @echo '## these variables are automatically generated by make ##' > $@-t
-       @echo '# Do not edit here.  If you wish to override these values' >> $@-t
-       @echo '# edit the last section' >> $@-t
-       @echo 'set srcdir $(srcdir)' >> $@-t
-       @echo 'set objdir' `pwd` >> $@-t
-       @echo 'set build_alias $(build_alias)' >> $@-t
-       @echo 'set build_triplet $(build_canonical)' >> $@-t
-       @echo 'set host_alias $(host_alias)' >> $@-t
-       @echo 'set host_triplet $(host_canonical)' >> $@-t
-       @echo 'set target_alias $(target_alias)' >> $@-t
-       @echo 'set target_triplet $(target_canonical)' >> $@-t
-       @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
-       -@sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
-       -@mv site.exp site.bak
-       @mv $@-t site.exp
-
-force:;
-
-clean mostlyclean:
-       -rm -f *~ core *.o a.out xgdb *.x *.grt
-       -rm -f *.rum *.c *.dif *.*out
-       if [ x"${SUBDIRS}" != x ] ; then \
-           for dir in ${SUBDIRS}; \
-           do \
-                   echo "$$dir:"; \
-                   if [ -d $$dir ]; then \
-                           (cd $$dir; $(MAKE) clean); \
-                   fi; \
-           done ; \
-       else true; fi
-
-distclean maintainer-clean realclean: clean
-       -rm -f *~ core
-       -rm -f Makefile config.status *-init.exp
-       -rm -fr *.log summary detail *.plog *.sum *.psum site.*
-       if [ x"${SUBDIRS}" != x ] ; then \
-           for dir in ${SUBDIRS}; \
-           do \
-                   echo "$$dir:"; \
-                   if [ -d $$dir ]; then \
-                           (cd $$dir; $(MAKE) distclean); \
-                   fi; \
-           done ; \
-       else true; fi
-
-Makefile : Makefile.in ../config.status
-       $(SHELL) ../config.status
-
-config.status: $(srcdir)/../configure
-       $(SHELL) ../config.status --recheck
-# FIXME: Requires --enable-maintainer-mode, which one could add, but
-# it's provided by automake.  Maybe switch to automake someday.
-#$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
-#      cd $(srcdir) && autoconf
index 43a07050f50830d9adc1d737350bbca81ac8f02e..0157f9bb2834576b0866a5601261bbea653d2b7d 100644 (file)
@@ -106,7 +106,7 @@ proc sim_run { prog sim_opts prog_opts redir options } {
        # These global variables come from generated site.exp.
        global objdir
        global arch
-       set sim "$objdir/../$arch/run"
+       set sim "$objdir/$arch/run"
     }
 
     if [is_remote host] {
diff --git a/sim/testsuite/local.mk b/sim/testsuite/local.mk
new file mode 100644 (file)
index 0000000..bd8a206
--- /dev/null
@@ -0,0 +1,34 @@
+## See sim/Makefile.am.
+#
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tweak the site.exp so it works with plain `runtest` from user.
+EXTRA_DEJAGNU_SITE_CONFIG = site-srcdir.exp
+
+site-srcdir.exp: Makefile
+       echo "set srcdir \"$(srcdir)/testsuite\"" > $@
+
+check-DEJAGNU: site.exp
+       LC_ALL=C; export LC_ALL; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+         $$runtest $(RUNTESTFLAGS); \
+       else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+       fi
+
+MOSTLYCLEANFILES += \
+       site-srcdir.exp testrun.log testrun.sum