1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
Description: tests: omalloc: multi-running script
Quoting the upstream maintainer: ``omalloc testing/verification may oversee
some memory error in some random cases''. This patch introduceds a simple
wrapper that is meant to work around those unlucky cases by running a few
number of tests instead of just one test; meant to be submitted to the
upstream maintainer.
Origin: vendor, Debian
Forwarded: https://github.com/Singular/Sources/pull/733
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2021-11-20
--- a/omalloc/Makefile.am
+++ b/omalloc/Makefile.am
@@ -68,9 +68,11 @@
####################################################
## Test program
-TESTS = omtTest-r
+TESTS = getlucky-omtTest-r
-check_PROGRAMS = $(TESTS)
+check_PROGRAMS = omtTest-r
+
+check_SCRIPTS = $(TESTS)
# EXTRA_PROGRAMS = omtTest-r
@@ -82,3 +84,9 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = omalloc.pc
+getlucky-omtTest-r: getlucky-omtTest-X.sh
+ $(LN_S) $< $@
+
+CLEANFILES += $(TESTS)
+
+EXTRA_DIST = getlucky-omtTest-X.sh
--- /dev/null
+++ b/omalloc/getlucky-omtTest-X.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+##
+## comment:
+## omalloc testing/verification may oversee some memory error in some random cases:
+## this simple wrapper is meant to work around those unlucky cases by running a few
+## number of tests instead of just one test.
+##
+SCRIPTNAME=${0##*/}
+SCRIPTDIR=${0%/*}
+CHECK_PROGRAM=${SCRIPTNAME#getlucky-}
+NUMBEROF_TRIAL=11
+for idx in $(seq 1 $NUMBEROF_TRIAL); do
+ ${SCRIPTDIR}/$CHECK_PROGRAM && { echo "$SCRIPTNAME: SUMMARY: $idx trial(s)" ; exit 0 ; }
+ sleep 3
+done
+echo "$SCRIPTNAME: SUMMARY: $idx failed trials"
+exit 1
+# eos
|