diff options
author | Didier Raboud <odyx@debian.org> | 2019-09-13 17:56:14 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2019-09-13 17:56:14 +0200 |
commit | b38516f13a1f563aa1eb7faf80965755ac63e3e6 (patch) | |
tree | fd60cd4095a45f7327d28dfe04bbfb34b7d7215a /test | |
parent | e50542121e724e851fc5d6c68bb773f80c0bc12c (diff) |
New upstream version 5.3.3
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/Makefile.in | 69 | ||||
-rwxr-xr-x | test/parse-escp2 | 42 | ||||
-rw-r--r-- | test/parse-escp2.in | 42 | ||||
-rw-r--r-- | test/pcl-unprint.c | 1 | ||||
-rwxr-xr-x | test/run-testdither.test (renamed from test/run-testdither) | 18 | ||||
-rw-r--r-- | test/run-testdither.test.in (renamed from test/run-testdither.in) | 18 | ||||
-rwxr-xr-x | test/run-weavetest.test (renamed from test/run-weavetest) | 28 | ||||
-rw-r--r-- | test/run-weavetest.test.in (renamed from test/run-weavetest.in) | 28 | ||||
-rwxr-xr-x | test/test-curve.test (renamed from test/test-curve) | 2 | ||||
-rw-r--r-- | test/test-curve.test.in (renamed from test/test-curve.in) | 2 |
11 files changed, 134 insertions, 124 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 8bc37c2..e98b88c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -28,7 +28,9 @@ LOCAL_CPPFLAGS = -I$(top_srcdir)/src/main $(GUTENPRINT_CFLAGS) ## It is essentially a giant unit test for the weave code. ## testdither doesn't actually test anything; there appears to be no way ## for it to actually return anything. -TESTS = test-curve run-weavetest run-testdither +TESTS = test-curve.test run-weavetest.test run-testdither.test +run-testdither.log: run-weavetest.log +test-curve.log: run-testdither.log ## Programs @@ -37,7 +39,7 @@ AM_TESTS_ENVIRONMENT=STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_buildd noinst_PROGRAMS = testdither escp2-weavetest unprint pcl-unprint bjc-unprint curve xml-curve pixma_parse gen-printer-list endif -noinst_SCRIPTS=test-curve run-weavetest run-testdither +noinst_SCRIPTS=test-curve.test run-weavetest.test run-testdither.test escp2_weavetest_SOURCES = escp2-weavetest.c escp2_weavetest_LDADD = $(GUTENPRINT_LIBS) @@ -75,4 +77,4 @@ pixma_parse_SOURCES = pixma_parse.c pixma_parse.h CLEANFILES = mixed-color-1bit.ppm MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = cyan-sweep.tif parse-escp2 run-weavetest run-testdither test-curve +EXTRA_DIST = cyan-sweep.tif parse-escp2 run-weavetest.test run-testdither.test test-curve.test diff --git a/test/Makefile.in b/test/Makefile.in index 4a2920d..31e8afe 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -102,16 +102,17 @@ host_triplet = @host@ @BUILD_TEST_TRUE@ gen-printer-list$(EXEEXT) subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4local/stp.m4 \ + $(top_srcdir)/m4local/stp_cups.m4 \ + $(top_srcdir)/m4local/stp_option.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \ - $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_option.m4 \ - $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp_release.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -119,7 +120,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = compress-5level.sh compress-6level.sh \ uncompress-5level.sh uncompress-6level.sh parse-bjc \ - parse-escp2 run-testdither run-weavetest test-curve + parse-escp2 run-testdither.test run-weavetest.test \ + test-curve.test CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_bjc_unprint_OBJECTS = bjc-unprint.$(OBJEXT) @@ -411,8 +413,12 @@ RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/scripts/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/scripts/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ @@ -423,17 +429,11 @@ am__set_b = \ *) \ b='$*';; \ esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/scripts/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/compress-5level.sh.in \ $(srcdir)/compress-6level.sh.in $(srcdir)/parse-bjc.in \ - $(srcdir)/parse-escp2.in $(srcdir)/run-testdither.in \ - $(srcdir)/run-weavetest.in $(srcdir)/test-curve.in \ + $(srcdir)/parse-escp2.in $(srcdir)/run-testdither.test.in \ + $(srcdir)/run-weavetest.test.in $(srcdir)/test-curve.test.in \ $(srcdir)/uncompress-5level.sh.in \ $(srcdir)/uncompress-6level.sh.in \ $(top_srcdir)/scripts/depcomp $(top_srcdir)/scripts/global.mk \ @@ -486,7 +486,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GENPPD_LIBS = @GENPPD_LIBS@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIMP2_CFLAGS = @GIMP2_CFLAGS@ GIMP2_LIBS = @GIMP2_LIBS@ GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ @@ -595,7 +594,6 @@ VERSION = @VERSION@ WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XZ = @XZ@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -668,9 +666,9 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) LOCAL_CPPFLAGS = -I$(top_srcdir)/src/main $(GUTENPRINT_CFLAGS) -TESTS = test-curve run-weavetest run-testdither +TESTS = test-curve.test run-weavetest.test run-testdither.test @BUILD_TEST_TRUE@AM_TESTS_ENVIRONMENT = STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/xml -noinst_SCRIPTS = test-curve run-weavetest run-testdither +noinst_SCRIPTS = test-curve.test run-weavetest.test run-testdither.test escp2_weavetest_SOURCES = escp2-weavetest.c escp2_weavetest_LDADD = $(GUTENPRINT_LIBS) unprint_SOURCES = unprint.c @@ -692,7 +690,7 @@ pixma_parse_SOURCES = pixma_parse.c pixma_parse.h #run-weavetest: escp2-weavetest CLEANFILES = mixed-color-1bit.ppm MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = cyan-sweep.tif parse-escp2 run-weavetest run-testdither test-curve +EXTRA_DIST = cyan-sweep.tif parse-escp2 run-weavetest.test run-testdither.test test-curve.test all: all-am .SUFFIXES: @@ -739,11 +737,11 @@ parse-bjc: $(top_builddir)/config.status $(srcdir)/parse-bjc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ parse-escp2: $(top_builddir)/config.status $(srcdir)/parse-escp2.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -run-testdither: $(top_builddir)/config.status $(srcdir)/run-testdither.in +run-testdither.test: $(top_builddir)/config.status $(srcdir)/run-testdither.test.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -run-weavetest: $(top_builddir)/config.status $(srcdir)/run-weavetest.in +run-weavetest.test: $(top_builddir)/config.status $(srcdir)/run-weavetest.test.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -test-curve: $(top_builddir)/config.status $(srcdir)/test-curve.in +test-curve.test: $(top_builddir)/config.status $(srcdir)/test-curve.test.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstPROGRAMS: @@ -1033,27 +1031,6 @@ recheck: all am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? -test-curve.log: test-curve - @p='test-curve'; \ - b='test-curve'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -run-weavetest.log: run-weavetest - @p='run-weavetest'; \ - b='run-weavetest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -run-testdither.log: run-testdither - @p='run-testdither'; \ - b='run-testdither'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -1260,6 +1237,8 @@ $(top_builddir)/src/main/libgutenprint.la: $(top_builddir)/src/gutenprintui2/libgutenprintui2.la: cd $(top_builddir)/src/gutenprintui2; \ $(MAKE) +run-testdither.log: run-weavetest.log +test-curve.log: run-testdither.log # 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. diff --git a/test/parse-escp2 b/test/parse-escp2 index b2cffef..00e1692 100755 --- a/test/parse-escp2 +++ b/test/parse-escp2 @@ -626,16 +626,21 @@ sub print_output_data($$$$$$) { } elsif ($comptype == 1) { foreach $i (0..$rows-1) { my ($found_something) = 0; - $dots = $savedots; + $dots = $savedots / 8; my ($tstuff) = "\n $i "; while ($dots > 0) { - fill_buffer(1); + if ($total_length - $curoffset < 1) { + fill_buffer(1); + } $counter = ord(substr($stuff, $curoffset + 0, 1)); - increment_curpos(1); + $curpos++; + $curoffset++; if ($counter <= 127) { $counter++; - fill_buffer($counter); - if ($opt_v || $opt_V) { + if ($total_length - $curoffset < $counter) { + fill_buffer($counter); + } + if ($opt_V || ($opt_v && ! $found_something)) { my $tmp = get_vector_at(0, $counter); if (!($tmp =~ /^[0 ]+$/)) { $found_something = 1; @@ -648,11 +653,25 @@ sub print_output_data($$$$$$) { $tstuff .= $tmp; } } - increment_curpos($counter); + $curpos += $counter; + $curoffset += $counter; } else { $counter = 257 - $counter; - fill_buffer(1); - if ($opt_v || $opt_V) { + if ($total_length - $curoffset < 1) { + fill_buffer(1); + } + if ($opt_v) { + if (! $found_something) { + my $tbyte = get_raw_at(0, 1); + if ($tbyte != 0) { + $found_something = 1; + $last_row = $i; + if ($first_row == -1) { + $first_row = $i; + } + } + } + } elsif ($opt_V) { $fchar = sprintf "%v02x ", get_raw_at(0, 1); if ($fchar ne "00 ") { $found_something = 1; @@ -661,13 +680,12 @@ sub print_output_data($$$$$$) { $first_row = $i; } } - } - if ($opt_V) { map { $tstuff .= $fchar } (0..$counter - 1); } - increment_curpos(1); + $curpos++; + $curoffset++; } - $dots -= $counter * 8; + $dots -= $counter; } if ($opt_V && $found_something) { $vstuff .= $tstuff; diff --git a/test/parse-escp2.in b/test/parse-escp2.in index 9ff3510..45da77d 100644 --- a/test/parse-escp2.in +++ b/test/parse-escp2.in @@ -626,16 +626,21 @@ sub print_output_data($$$$$$) { } elsif ($comptype == 1) { foreach $i (0..$rows-1) { my ($found_something) = 0; - $dots = $savedots; + $dots = $savedots / 8; my ($tstuff) = "\n $i "; while ($dots > 0) { - fill_buffer(1); + if ($total_length - $curoffset < 1) { + fill_buffer(1); + } $counter = ord(substr($stuff, $curoffset + 0, 1)); - increment_curpos(1); + $curpos++; + $curoffset++; if ($counter <= 127) { $counter++; - fill_buffer($counter); - if ($opt_v || $opt_V) { + if ($total_length - $curoffset < $counter) { + fill_buffer($counter); + } + if ($opt_V || ($opt_v && ! $found_something)) { my $tmp = get_vector_at(0, $counter); if (!($tmp =~ /^[0 ]+$/)) { $found_something = 1; @@ -648,11 +653,25 @@ sub print_output_data($$$$$$) { $tstuff .= $tmp; } } - increment_curpos($counter); + $curpos += $counter; + $curoffset += $counter; } else { $counter = 257 - $counter; - fill_buffer(1); - if ($opt_v || $opt_V) { + if ($total_length - $curoffset < 1) { + fill_buffer(1); + } + if ($opt_v) { + if (! $found_something) { + my $tbyte = get_raw_at(0, 1); + if ($tbyte != 0) { + $found_something = 1; + $last_row = $i; + if ($first_row == -1) { + $first_row = $i; + } + } + } + } elsif ($opt_V) { $fchar = sprintf "%v02x ", get_raw_at(0, 1); if ($fchar ne "00 ") { $found_something = 1; @@ -661,13 +680,12 @@ sub print_output_data($$$$$$) { $first_row = $i; } } - } - if ($opt_V) { map { $tstuff .= $fchar } (0..$counter - 1); } - increment_curpos(1); + $curpos++; + $curoffset++; } - $dots -= $counter * 8; + $dots -= $counter; } if ($opt_V && $found_something) { $vstuff .= $tstuff; diff --git a/test/pcl-unprint.c b/test/pcl-unprint.c index aa28803..7dfd31c 100644 --- a/test/pcl-unprint.c +++ b/test/pcl-unprint.c @@ -1963,6 +1963,7 @@ int main(int argc, char *argv[]) case PCL_DATA_LAST : if (skip_output == 1) { print_command(command_index, numeric_arg); + fprintf(stderr, "\n"); } else { diff --git a/test/run-testdither b/test/run-testdither.test index b6fd6ce..12b061e 100755 --- a/test/run-testdither +++ b/test/run-testdither.test @@ -30,14 +30,12 @@ if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then exec 2>&1 fi -out_status=0 - -if [ -z "$srcdir" -o "$srcdir" = "." ] ; then - sdir=`pwd` -elif [ -n "`echo $srcdir |grep '^/'`" ] ; then +if [[ -z $srcdir || $srcdir = "." ]] ; then + sdir=$(pwd) +elif grep -q '^/' <<< "$srcdir" ; then sdir="$srcdir" else - sdir="`pwd`/$srcdir" + sdir="$(pwd)/$srcdir" fi if [ -z "$STP_DATA_PATH" ] ; then @@ -58,22 +56,22 @@ set_args() { while true ; do case "$1" in -h*|--h*) usage ;; - -v|--valgrind) valopts='--tool=memcheck' ; valcount=`expr $valgrind + 1` ;; + -v|--valgrind) valopts='--tool=memcheck' ; valcount=$((valgrind + 1)) ;; -c|--cachegrind) valopts='--tool=cachegrind'; valcount=4 ;; -g|--gdb-attach) valopts='--gdb-attach=yes' ;; -V|--verbose) quiet= ;; -q|--quiet) quiet=quiet ;; - --) shift; args="$@"; return ;; + --) shift; args="$*"; return ;; *) return ;; esac shift done } -set_args `getopt hgvqncV "$@"` +set_args $(getopt hgvqncV "$@") case "$valcount" in - 1) valopts="$valopts -q --num-callers=100 --error-limit=no --leak-check=yes";; + 1) valopts="$valopts $quiet --num-callers=100 --error-limit=no --leak-check=yes";; 2) valopts="$valopts --num-callers=100 --error-limit=no --leak-resolution=high --leak-check=yes" ;; 3) valopts="$valopts --error-limit=no --num-callers=100 --show-reachable=yes --leak-resolution=high --leak-check=yes" ;; *) ;; diff --git a/test/run-testdither.in b/test/run-testdither.test.in index b057f66..7894f55 100644 --- a/test/run-testdither.in +++ b/test/run-testdither.test.in @@ -30,14 +30,12 @@ if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then exec 2>&1 fi -out_status=0 - -if [ -z "$srcdir" -o "$srcdir" = "." ] ; then - sdir=`pwd` -elif [ -n "`echo $srcdir |grep '^/'`" ] ; then +if [[ -z $srcdir || $srcdir = "." ]] ; then + sdir=$(pwd) +elif grep -q '^/' <<< "$srcdir" ; then sdir="$srcdir" else - sdir="`pwd`/$srcdir" + sdir="$(pwd)/$srcdir" fi if [ -z "$STP_DATA_PATH" ] ; then @@ -58,22 +56,22 @@ set_args() { while true ; do case "$1" in -h*|--h*) usage ;; - -v|--valgrind) valopts='--tool=memcheck' ; valcount=`expr $valgrind + 1` ;; + -v|--valgrind) valopts='--tool=memcheck' ; valcount=$((valgrind + 1)) ;; -c|--cachegrind) valopts='--tool=cachegrind'; valcount=4 ;; -g|--gdb-attach) valopts='--gdb-attach=yes' ;; -V|--verbose) quiet= ;; -q|--quiet) quiet=quiet ;; - --) shift; args="$@"; return ;; + --) shift; args="$*"; return ;; *) return ;; esac shift done } -set_args `getopt hgvqncV "$@"` +set_args $(getopt hgvqncV "$@") case "$valcount" in - 1) valopts="$valopts -q --num-callers=100 --error-limit=no --leak-check=yes";; + 1) valopts="$valopts $quiet --num-callers=100 --error-limit=no --leak-check=yes";; 2) valopts="$valopts --num-callers=100 --error-limit=no --leak-resolution=high --leak-check=yes" ;; 3) valopts="$valopts --error-limit=no --num-callers=100 --show-reachable=yes --leak-resolution=high --leak-check=yes" ;; *) ;; diff --git a/test/run-weavetest b/test/run-weavetest.test index 10c1d32..8854282 100755 --- a/test/run-weavetest +++ b/test/run-weavetest.test @@ -13,12 +13,12 @@ if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then exec 2>&1 fi -if [ -z "$srcdir" -o "$srcdir" = "." ] ; then - sdir=`pwd` -elif [ -n "`echo $srcdir |grep '^/'`" ] ; then +if [[ -z $srcdir || $srcdir = "." ]] ; then + sdir=$(pwd) +elif grep -q '^/' <<< "$srcdir" ; then sdir="$srcdir" else - sdir="`pwd`/$srcdir" + sdir="$(pwd)/$srcdir" fi if [ -z "$STP_DATA_PATH" ] ; then @@ -95,17 +95,15 @@ fi for strategy in $strategies ; do for jet in $jets ; do for sep in $separations ; do - start=`expr $jet \* $sep` - if [ $start -le $head_limit ] ; then - rows=`expr $start \* 5` - if [ $rows -lt 200 ] ; then - rows=200 - fi - s1=`expr $start - 1` - for f in 0 41 $start $s1 ; do - end=`expr $rows + $f + $start` - end1=`expr $rows + $f` - end2=`expr $rows + $f + 35` + start=$((jet * sep)) + if (( start < head_limit)) ; then + rows=$((start * 5)) + (( rows < 200 )) && rows=200 + s1=$((start - 1)) + for f in 0 41 "$start" "$s1" ; do + end=$((rows + f + start)) + end1=$((rows + f)) + end2=$((rows + f + 35)) for g in $end $end1 $end2 ; do for pass in $passes ; do for arrangement in $arrangements; do diff --git a/test/run-weavetest.in b/test/run-weavetest.test.in index 731cad5..0252b45 100644 --- a/test/run-weavetest.in +++ b/test/run-weavetest.test.in @@ -13,12 +13,12 @@ if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then exec 2>&1 fi -if [ -z "$srcdir" -o "$srcdir" = "." ] ; then - sdir=`pwd` -elif [ -n "`echo $srcdir |grep '^/'`" ] ; then +if [[ -z $srcdir || $srcdir = "." ]] ; then + sdir=$(pwd) +elif grep -q '^/' <<< "$srcdir" ; then sdir="$srcdir" else - sdir="`pwd`/$srcdir" + sdir="$(pwd)/$srcdir" fi if [ -z "$STP_DATA_PATH" ] ; then @@ -95,17 +95,15 @@ fi for strategy in $strategies ; do for jet in $jets ; do for sep in $separations ; do - start=`expr $jet \* $sep` - if [ $start -le $head_limit ] ; then - rows=`expr $start \* 5` - if [ $rows -lt 200 ] ; then - rows=200 - fi - s1=`expr $start - 1` - for f in 0 41 $start $s1 ; do - end=`expr $rows + $f + $start` - end1=`expr $rows + $f` - end2=`expr $rows + $f + 35` + start=$((jet * sep)) + if (( start < head_limit)) ; then + rows=$((start * 5)) + (( rows < 200 )) && rows=200 + s1=$((start - 1)) + for f in 0 41 "$start" "$s1" ; do + end=$((rows + f + start)) + end1=$((rows + f)) + end2=$((rows + f + 35)) for g in $end $end1 $end2 ; do for pass in $passes ; do for arrangement in $arrangements; do diff --git a/test/test-curve b/test/test-curve.test index 6c5b46a..cce049c 100755 --- a/test/test-curve +++ b/test/test-curve.test @@ -51,7 +51,7 @@ function runit() { case "$STP_TEST_PROFILE" in valgrind*) - vg="libtool --mode=execute valgrind $valopts" + vg="libtool --mode=execute valgrind" valgrind="$vg --num-callers=50 --leak-check=yes --error-limit=no --error-exitcode=1" ;; *) diff --git a/test/test-curve.in b/test/test-curve.test.in index 874a72e..59b426e 100644 --- a/test/test-curve.in +++ b/test/test-curve.test.in @@ -51,7 +51,7 @@ function runit() { case "$STP_TEST_PROFILE" in valgrind*) - vg="libtool --mode=execute valgrind $valopts" + vg="libtool --mode=execute valgrind" valgrind="$vg --num-callers=50 --leak-check=yes --error-limit=no --error-exitcode=1" ;; *) |