[med-svn] [Git][med-team/libarb][master] 4 commits: Try to build PROBE

Andreas Tille gitlab at salsa.debian.org
Fri Jun 7 15:50:25 BST 2019



Andreas Tille pushed to branch master at Debian Med / libarb


Commits:
2ad08165 by Andreas Tille at 2019-06-07T14:42:02Z
Try to build PROBE

- - - - -
a6813dce by Andreas Tille at 2019-06-07T14:48:55Z
Do not accidentally exclude TEMPLATES/ut_valgrinded.h

- - - - -
414fe8fe by Andreas Tille at 2019-06-07T14:49:42Z
New upstream version 6.0.6
- - - - -
25021e21 by Andreas Tille at 2019-06-07T14:49:44Z
Update upstream source from tag 'upstream/6.0.6'

Update to upstream version '6.0.6'
with Debian dir bedae520c324fb5dfb047dc3a492bf486e5e036c
- - - - -


4 changed files:

- + TEMPLATES/ut_valgrinded.h
- debian/copyright
- debian/patches/fix_main_makefile.patch
- debian/rules


Changes:

=====================================
TEMPLATES/ut_valgrinded.h
=====================================
@@ -0,0 +1,109 @@
+// ================================================================ //
+//                                                                  //
+//   File      : ut_valgrinded.h                                    //
+//   Purpose   : wrapper to call subprocesses inside valgrind       //
+//                                                                  //
+//   Coded by Ralf Westram (coder at reallysoft.de) in February 2011   //
+//   Institute of Microbiology (Technical University Munich)        //
+//   http://www.arb-home.de/                                        //
+//                                                                  //
+// ================================================================ //
+
+#ifndef UT_VALGRINDED_H
+#define UT_VALGRINDED_H
+
+
+#ifdef UNIT_TESTS
+
+#ifndef ARB_MSG_H
+#include <arb_msg.h>
+#endif
+#ifndef _SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#define UTVG_CALL_SEEN "flag.valgrind.callseen"
+
+namespace utvg {
+
+    inline const char *flag_name(const char *name) {
+        const char *ARBHOME = getenv("ARBHOME");
+        const int   BUFSIZE = 200;
+        static char buf[BUFSIZE];
+
+        IF_ASSERTION_USED(int printed =)
+            snprintf(buf, BUFSIZE, "%s/UNIT_TESTER/valgrind/%s", ARBHOME, name);
+        arb_assert(printed<BUFSIZE);
+
+        return buf;
+    }
+    inline bool flag_exists(const char *name) {
+        const char  *path = flag_name(name);
+        struct stat  stt;
+
+        return stat(path, &stt) == 0 && S_ISREG(stt.st_mode);
+    }
+    inline void raise_flag(const char *name) {
+        const char *path = flag_name(name);
+        FILE       *fp   = fopen(path, "w");
+        arb_assert(fp);
+        fclose(fp);
+    }
+
+    struct valgrind_info {
+        bool wanted;
+        bool leaks;
+        bool reachable;
+
+        valgrind_info() {
+            // The following flag files are generated by ../UNIT_TESTER/Makefile.suite
+            // which reads the settings from ../UNIT_TESTER/Makefile.setup.local
+            wanted    = flag_exists("flag.valgrind");
+            leaks     = flag_exists("flag.valgrind.leaks");
+            reachable = flag_exists("flag.valgrind.reachable");
+        }
+    };
+
+    inline const valgrind_info& get_valgrind_info() {
+        static valgrind_info vinfo;
+        return vinfo;
+    }
+};
+
+inline void make_valgrinded_call(char *&command) {
+    using namespace utvg;
+    const valgrind_info& valgrind = get_valgrind_info();
+    if (valgrind.wanted) {
+// #define VALGRIND_ONLY_SOME
+#if defined(VALGRIND_ONLY_SOME)
+        bool perform_valgrind = false;
+
+        perform_valgrind = perform_valgrind || strstr(command, "arb_pt_server");
+        perform_valgrind = perform_valgrind || strstr(command, "arb_primer");
+
+        if (!perform_valgrind) return;
+#endif
+
+        const char *switches           = valgrind.leaks ? (valgrind.reachable ? "-l -r" : "-l") : "";
+        char       *valgrinded_command = GBS_global_string_copy("$ARBHOME/UNIT_TESTER/valgrind/arb_valgrind_logged CALL %s -c 15 %s", switches, command);
+        freeset(command, valgrinded_command);
+
+        utvg::raise_flag(UTVG_CALL_SEEN);
+    }
+}
+
+inline bool will_valgrind_calls() { return utvg::get_valgrind_info().wanted; }
+inline bool seen_valgrinded_call() { return utvg::flag_exists(UTVG_CALL_SEEN); }
+
+#else // !UNIT_TESTS
+
+#define make_valgrinded_call(command)
+inline bool will_valgrind_calls() { return false; }
+inline bool seen_valgrinded_call() { return false; }
+
+#endif // UNIT_TESTS
+
+
+#else
+#error ut_valgrinded.h included twice
+#endif // UT_VALGRINDED_H


=====================================
debian/copyright
=====================================
@@ -65,6 +65,7 @@ Files-Excluded: arbsrc*/AISC_COM/Makefile
                 arbsrc*/SOURCE_TOOLS/r*
                 arbsrc*/SOURCE_TOOLS/s*
                 arbsrc*/SOURCE_TOOLS/t*
+                arbsrc*/SOURCE_TOOLS/update_config_makefile.pl
                 arbsrc*/SOURCE_TOOLS/valgrind2grep
                 arbsrc*/ST*
                 arbsrc*/TEMPLATES/C*
@@ -124,7 +125,7 @@ Files-Excluded: arbsrc*/AISC_COM/Makefile
                 arbsrc*/etc
                 arbsrc*/l*
                 arbsrc*/ptpan*
-                arbsrc*/u*
+                arbsrc*/util
 
 Files: *
 Copyright: 1994-2011


=====================================
debian/patches/fix_main_makefile.patch
=====================================
@@ -336,7 +336,7 @@ Description: Strip everything from ARB Makefiles that's not contained in the
  
  build: arb
 -	$(MAKE) binlink preplib compile_compatibility
-+	$(MAKE) core db SL/HELIX/HELIX.dummy SL/PTCLEAN/PTCLEAN.dummy PROBE_COM/PROBE_COM.dummy
++	$(MAKE) core db SL/HELIX/HELIX.dummy SL/PTCLEAN/PTCLEAN.dummy PROBE_COM/PROBE_COM.dummy PROBE/PROBE.dummy
  
  all:
  	@echo "Build time" > $(TIMELOG)


=====================================
debian/rules
=====================================
@@ -38,13 +38,20 @@ config.makefile: config.makefile.template
 
 override_dh_auto_build:
 	ln -s TEMPLATES INCLUDE
-	for header in CORE/*.h UNIT_TESTER/*.h SL/CB/*.h WINDOW/*.hxx ARBDB/*.h ; do ln -s ../$${header} INCLUDE/`basename $${header}` ; done
+	for header in CORE/*.h UNIT_TESTER/*.h SL/CB/*.h SL/PTCLEAN/*.h WINDOW/*.hxx ARBDB/*.h AISC_COM/C/*.h SERVERCNTRL/*.h ; \
+	    do ln -s ../$${header} INCLUDE/`basename $${header}` ; \
+	done
 	ln -s /usr/include/valgrind/valgrind.h INCLUDE/valgrind.h
 	ln -s ../AISC_COM/AISC PROBE_COM/AISC
 	ln -s ../AISC_COM/C PROBE_COM/C
+	ln -s ../PROBE_COM/PT_com.h INCLUDE/PT_com.h
+	ln -s ../PROBE_COM/PT_server.h INCLUDE/PT_server.h
+	ln -s ../PROBE_COM/PT_server_prototypes.h INCLUDE/PT_server_prototypes.h
+	ln -s ../SL/HELIX/BI_basepos.hxx INCLUDE/BI_basepos.hxx
 	mkdir bin
 	mkdir lib
-	dh_auto_build -- all # --sourcedirectory=CORE
+	# FIXME: --no-parallel is just for debugging
+	dh_auto_build --no-parallel -- all # --sourcedirectory=CORE
 
 override_dh_auto_configure: config.makefile
 
@@ -62,6 +69,7 @@ override_dh_auto_clean: config.makefile
 	rm -rf INCLUDE
 	rm -rf AISC/aisc
 	rm -rf AISC_MKPTPS/aisc_mkpt
+	rm -rf PROBE_COM/DUMP PROBE_COM/GENC PROBE_COM/GENH
 	rm config.makefile
 	# ARB does not have "distclean" or "realclean". Remove some leftovers:
 	rm -f UNIT_TESTER/Makefile.setup.local



View it on GitLab: https://salsa.debian.org/med-team/libarb/compare/e954cf04ac8c7a3518b1b22166be80d7d95673af...25021e21ab6c79463ee3833171e87a80044f58ef

-- 
View it on GitLab: https://salsa.debian.org/med-team/libarb/compare/e954cf04ac8c7a3518b1b22166be80d7d95673af...25021e21ab6c79463ee3833171e87a80044f58ef
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190607/a46feb11/attachment-0001.html>


More information about the debian-med-commit mailing list