[med-svn] [Git][med-team/bart][master] 10 commits: fix commands test
Martin Uecker (@uecker-guest)
gitlab at salsa.debian.org
Sun May 10 08:32:15 BST 2026
Martin Uecker pushed to branch master at Debian Med / bart
Commits:
b6839744 by Martin Uecker at 2026-05-10T09:26:56+02:00
fix commands test
- - - - -
76e0ba73 by Martin Uecker at 2026-05-10T09:26:56+02:00
add rpath patch
- - - - -
646ffecd by Martin Uecker at 2026-05-10T09:26:56+02:00
add patch to remove duplicate entries for commands
- - - - -
6294c8f5 by Martin Uecker at 2026-05-10T09:26:56+02:00
do not assume flaky tests on some archs anymore
- - - - -
16a3b5b5 by Martin Uecker at 2026-05-10T09:26:56+02:00
turn off all workarounds for now
- - - - -
26257cf2 by Martin Uecker at 2026-05-10T09:26:56+02:00
remove feature for local use
- - - - -
6af63ad2 by Martin Uecker at 2026-05-10T09:27:50+02:00
add fix required for Debian autopkgtest tests
- - - - -
c8abeb44 by Martin Uecker at 2026-05-10T09:28:05+02:00
fix debian tests
- - - - -
1e86aa82 by Martin Uecker at 2026-05-10T09:28:11+02:00
do not delete command.txt
- - - - -
3fa568da by Martin Uecker at 2026-05-10T09:30:04+02:00
restore deterministic builds
- - - - -
10 changed files:
- + debian/patches/0004-remove-rpath.patch
- + debian/patches/0005-remove-commands-listed-twice.patch
- + debian/patches/0006-remove-exec-command-mechanism.patch
- + debian/patches/0007-fix-initialization-for-direct-call-of-tools.patch
- + debian/patches/0008-do-not-delete-command.txt.patch
- debian/patches/series
- debian/rules
- debian/tests/commands
- debian/tests/control
- debian/tests/suite
Changes:
=====================================
debian/patches/0004-remove-rpath.patch
=====================================
@@ -0,0 +1,66 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Sat, 9 May 2026 14:36:42 +0200
+Subject: remove rpath
+
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 23faaf5..59d5e09 100644
+--- a/Makefile
++++ b/Makefile
+@@ -423,12 +423,12 @@ endif
+
+ ifeq ($(TENSORFLOW),1)
+ CPPFLAGS += -DTENSORFLOW -I$(TENSORFLOW_BASE)/include
+-LIBS += -L$(TENSORFLOW_BASE)/lib -Wl,-rpath $(TENSORFLOW_BASE)/lib -ltensorflow_framework -ltensorflow
++LIBS += -L$(TENSORFLOW_BASE)/lib -ltensorflow_framework -ltensorflow
+ endif
+
+ ifeq ($(PYTORCH),1)
+ CPPFLAGS += -DPYTORCH -I$(PYTORCH_BASE)/include/torch/csrc/api/include/ -I$(PYTORCH_BASE)/include/
+-LIBS += -L$(PYTORCH_BASE)/lib -Wl,--no-as-needed,-rpath $(PYTORCH_BASE)/lib -ltorch -ltorch_cpu -lc10
++LIBS += -L$(PYTORCH_BASE)/lib -Wl,--no-as-needed -ltorch -ltorch_cpu -lc10
+ ifeq ($(CUDA),1)
+ LIBS += -ltorch_cuda -lc10_cuda
+ endif
+@@ -502,9 +502,9 @@ ifeq ($(BUILDTYPE), MacOSX)
+ CUDA_L := -L$(CUDA_BASE)/$(CUDA_LIB) -lcufft -lcudart -lcublas -m64 -lstdc++
+ else
+ ifeq ($(CUDNN),1)
+-CUDA_L := -L$(CUDA_BASE)/$(CUDA_LIB) -L$(CUDNN_BASE)/$(CUDNN_LIB) -lcudnn -lcufft -lcudart -lcublas -lstdc++ -Wl,-rpath $(CUDA_BASE)/$(CUDA_LIB) -Wl,-rpath $(CUDNN_BASE)/$(CUDNN_LIB)
++CUDA_L := -L$(CUDA_BASE)/$(CUDA_LIB) -L$(CUDNN_BASE)/$(CUDNN_LIB) -lcudnn -lcufft -lcudart -lcublas -lstdc++
+ else
+-CUDA_L := -L$(CUDA_BASE)/$(CUDA_LIB) -lcufft -lcudart -lcublas -lstdc++ -Wl,-rpath $(CUDA_BASE)/$(CUDA_LIB)
++CUDA_L := -L$(CUDA_BASE)/$(CUDA_LIB) -lcufft -lcudart -lcublas -lstdc++
+ endif
+ endif
+ else
+@@ -560,7 +560,7 @@ CFLAGS += -DUSE_OPENBLAS
+ else
+ ifeq ($(ACML),1)
+ BLAS_H := -I$(ACML_BASE)/include
+-BLAS_L := -L$(ACML_BASE)/lib -lgfortran -lacml_mp -Wl,-rpath $(ACML_BASE)/lib
++BLAS_L := -L$(ACML_BASE)/lib -lgfortran -lacml_mp
+ CPPFLAGS += -DUSE_ACML
+ else
+ ifeq ($(BUILDTYPE), MSYS)
+@@ -577,7 +577,7 @@ else
+ ifeq ($(BUILDTYPE), WASM)
+ BLAS_L := -L$(BLAS_BASE)/lib
+ else
+-BLAS_L := -Wl,-rpath $(BLAS_BASE)/lib -L$(BLAS_BASE)/lib
++BLAS_L := -L$(BLAS_BASE)/lib
+
+ ifeq ($(NOLAPACKE),1)
+ BLAS_L += -llapack -lblas
+@@ -657,7 +657,7 @@ FFTW_H := -I$(FFTW_BASE)/include/
+ ifeq ($(BUILDTYPE), WASM)
+ FFTW_L := -L$(FFTW_BASE)/lib -lfftw3f
+ else
+-FFTW_L := -Wl,-rpath $(FFTW_BASE)/lib -L$(FFTW_BASE)/lib -lfftw3f
++FFTW_L := -L$(FFTW_BASE)/lib -lfftw3f
+ endif
+
+ ifeq ($(FFTWTHREADS),1)
=====================================
debian/patches/0005-remove-commands-listed-twice.patch
=====================================
@@ -0,0 +1,21 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Sat, 9 May 2026 14:52:57 +0200
+Subject: remove commands listed twice
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 59d5e09..7ebee7b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -276,7 +276,7 @@ ISMRM_BASE ?= /usr/local/ismrmrd/
+
+ # Main build targets
+ #
+-TBASE+=show slice crop resize join transpose squeeze flatten zeros ones flip circshift extract repmat bitmask reshape version delta copy casorati vec poly index multicfl tee compress
++TBASE+=show slice crop resize join transpose squeeze flatten zeros ones flip circshift extract repmat bitmask reshape version delta copy casorati vec poly index compress
+ TFLP+=scale invert conj fmac saxpy sdot spow cpyphs creal carg normalize cdf97 pattern nrmse mip avg cabs zexp calc unwrap
+ TNUM+=fft fftmod fftshift noise bench threshold conv rss filter nlmeans mandelbrot wavelet window var std fftrot roistat pol2mask conway morphop hist gmm
+ TRECO+=pics pocsense sqpics itsense nlinv moba nufft nufftbase rof tgv ictv sake wave lrmatrix estdims estshift estdelay wavepsf wshfl rtnlinv mobafit mobasig grog denoise estscaling
=====================================
debian/patches/0006-remove-exec-command-mechanism.patch
=====================================
@@ -0,0 +1,50 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Sat, 9 May 2026 15:26:33 +0200
+Subject: remove exec command mechanism
+
+---
+ src/bart.c | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/src/bart.c b/src/bart.c
+index 5f820d0..dbcc65f 100644
+--- a/src/bart.c
++++ b/src/bart.c
+@@ -61,9 +61,6 @@
+
+ #include "main.h"
+
+-// also check in commands/ subdir at the bart exe location
+-#define CHECK_EXE_COMMANDS
+-
+ #ifndef DIMS
+ #define DIMS 16
+ #endif
+@@ -642,27 +639,7 @@ int main_bart(int argc, char* argv[argc])
+
+ debug_printf(DP_DEBUG3, "No builtin found: %s\n", argv[0]);
+
+-#ifdef CHECK_EXE_COMMANDS
+- // also check dirname(PATH_TO_BART)/commands/:
+- char exe_loc[1024] = { };
+- ssize_t exe_loc_size = ARRAY_SIZE(exe_loc);
+- ssize_t rl = readlink("/proc/self/exe", exe_loc, (size_t)exe_loc_size);
+-
+- char* exe_dir = NULL;
+-
+- if ((-1 != rl) && (exe_loc_size != rl)) {
+-
+- // readlink returned without error and did not truncate
+- exe_dir = dirname(exe_loc);
+- // no need to check for NULL, as in that case, we skip it in the loop below
+- }
+-#endif
+-
+ const char* tpath[] = {
+-#ifdef CHECK_EXE_COMMANDS
+- exe_dir,
+-#endif
+- getenv("BART_TOOLBOX_PATH"),
+ "/usr/local/lib/bart/",
+ "/usr/lib/bart/",
+ };
=====================================
debian/patches/0007-fix-initialization-for-direct-call-of-tools.patch
=====================================
@@ -0,0 +1,61 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Sat, 9 May 2026 19:38:24 +0200
+Subject: fix initialization for direct call of tools
+
+---
+ src/bart.c | 6 +++++-
+ src/misc/mmio.c | 2 +-
+ tests/bart.mk | 13 +++++++++++++
+ 3 files changed, 19 insertions(+), 2 deletions(-)
+ create mode 100644 tests/bart.mk
+
+diff --git a/src/bart.c b/src/bart.c
+index dbcc65f..0639298 100644
+--- a/src/bart.c
++++ b/src/bart.c
+@@ -537,8 +537,12 @@ int main_bart(int argc, char* argv[argc])
+ parse_bart_opts(&argc, &argv, order, &ref_stream);
+
+ bn = basename(argv[0]);
+- }
+
++ } else {
++
++ for (int i = 0; i < DIMS; i++)
++ order[i] = i;
++ }
+
+ main_fun_t* dispatch_func = NULL;
+
+diff --git a/src/misc/mmio.c b/src/misc/mmio.c
+index be0995f..eb2a235 100644
+--- a/src/misc/mmio.c
++++ b/src/misc/mmio.c
+@@ -150,7 +150,7 @@ struct cfl_loop_desc_s {
+
+ static struct cfl_loop_desc_s cfl_loop_desc = {
+
+- .D = 0,
++ .D = DIMS,
+ .omp_threads = 1,
+ .flags = 0UL,
+ .loop_dims = { [0 ... DIMS - 1] = 1 },
+diff --git a/tests/bart.mk b/tests/bart.mk
+new file mode 100644
+index 0000000..e7db22f
+--- /dev/null
++++ b/tests/bart.mk
+@@ -0,0 +1,13 @@
++
++
++tests/test-bart: bart
++ set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
++ $(ROOTDIR)/bart ones 2 1 1 o1.ra ;\
++ cp $(ROOTDIR)/bart ./ones ;\
++ ./ones 2 1 1 o2.ra ;\
++ $(ROOTDIR)/bart nrmse -t 0. o1.ra o2.ra ;\
++ rm ones *.ra ; cd .. ; rmdir $(TESTS_TMP)
++ touch $@
++
++TESTS += tests/test-bart
++
=====================================
debian/patches/0008-do-not-delete-command.txt.patch
=====================================
@@ -0,0 +1,21 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Sat, 9 May 2026 23:14:53 +0200
+Subject: do not delete command.txt
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 7ebee7b..77d7a70 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1190,7 +1190,7 @@ allclean: clean
+ rm -f $(root)/tests/test-*
+ rm -rf $(root)/stests/tmp/*/
+ rm -rf $(root)/doc/dx
+- rm -f $(root)/doc/commands.txt
++# rm -f $(root)/doc/commands.txt
+ rm -f $(root)/save/fftw/*.fftw
+ rm -f $(root)/save/nsv/*.dat
+ touch isclean
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,8 @@
0001-remove-empty-directory.patch
0005-do-not-update-doc-commands.txt-automatically.patch
0003-cleanup-more-thoroughly.patch
+0004-remove-rpath.patch
+0005-remove-commands-listed-twice.patch
+0006-remove-exec-command-mechanism.patch
+0007-fix-initialization-for-direct-call-of-tools.patch
+0008-do-not-delete-command.txt.patch
=====================================
debian/rules
=====================================
@@ -9,17 +9,16 @@ include /usr/share/dpkg/buildtools.mk
# set installation prefix
export PREFIX=/usr/
-# turn of parallel builds here to make build deterministic
-export PARALLEL=1
-export PARALLEL_NJOBS=1
+# use deterministic archives to make build deterministic
+export ARFLAGS=rs
# some archs require turning of some optimizations
-NOEXPOPT_ARCHS=arm64 ppc64el s390x ia64 powerpc ppc64 riscv64
+NOEXPOPT_ARCHS=
# turn off hanging tests on i386
-ifeq ($(DEB_BUILD_ARCH), i386)
-export ODE_SIMU_OFF=1
-endif
+#ifeq ($(DEB_BUILD_ARCH), i386)
+#export ODE_SIMU_OFF=1
+#endif
ifneq (,$(filter $(NOEXPOPT_ARCHS), $(DEB_BUILD_ARCH)))
export DEB_CFLAGS_MAINT_APPEND = -fno-expensive-optimizations
@@ -28,10 +27,10 @@ endif
# Some tests fail on the following architectures probably
# due to minor differences in floating point processing.
# For now, just turn it off...
-NOTEST_ARCHS=hurd-i386 kfreebsd-i386
+NOTEST_ARCHS=
# For this architesture the test will be run but it will pass in any case even when errors occure
-PRINT_ERRORS_WHEN_TESTING=sh4 arc m68k alpha loong64
+PRINT_ERRORS_WHEN_TESTING=
%:
dh $@
=====================================
debian/tests/commands
=====================================
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-CMDS=`bart | tail -n +2`
+CMDS=`bart | tail -n +2 | cut -d':' -f2- | xargs -n1 | sort`
./rules/update_commands.sh /usr/bin/bart $AUTOPKGTEST_TMP/commands.txt $CMDS
zcmp /usr/share/doc/bart/commands.txt.gz $AUTOPKGTEST_TMP/commands.txt
=====================================
debian/tests/control
=====================================
@@ -12,10 +12,4 @@ Restrictions: superficial
Tests: suite
Depends: bart, make
-Architecture: amd64
Restrictions: allow-stderr
-
-Tests: suite
-Depends: bart, make
-Architecture: i386, mips64el, s390x
-Restrictions: allow-stderr, flaky
=====================================
debian/tests/suite
=====================================
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-CMDS=`bart | tail -n +2`
+CMDS=`bart | tail -n +2 | cut -d':' -f2-`
mkdir $AUTOPKGTEST_TMP/tests/
mkdir $AUTOPKGTEST_TMP/tests/out/
@@ -12,6 +12,8 @@ cat <<EOF > $AUTOPKGTEST_TMP/Makefile
TOOLDIR=$AUTOPKGTEST_TMP/
ROOTDIR=$AUTOPKGTEST_TMP/
+export BART_TOOLBOX_PATH=$AUTOPKGTEST_TMP/
+
TESTS_DIR=$AUTOPKGTEST_TMP/tests/
TESTS_TMP=$AUTOPKGTEST_TMP/tests/tmp/\$\$\$\$/
TESTS_OUT=$AUTOPKGTEST_TMP/tests/out/
@@ -32,6 +34,9 @@ for CMD in $CMDS ; do
[ -e tests/$CMD.mk ] && cp tests/$CMD.mk $AUTOPKGTEST_TMP/tests/
done
+# copy scripts
+cp -r scripts/ $AUTOPKGTEST_TMP/scripts/
+
# copy some test data
cp -r tests/geom/ $AUTOPKGTEST_TMP/tests/geom/
View it on GitLab: https://salsa.debian.org/med-team/bart/-/compare/d226a3e5921193fd9758d013d9bf16a4a28f7abd...3fa568da903d331a1df79ee5de413f2f502ebeaf
--
View it on GitLab: https://salsa.debian.org/med-team/bart/-/compare/d226a3e5921193fd9758d013d9bf16a4a28f7abd...3fa568da903d331a1df79ee5de413f2f502ebeaf
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260510/69cd288c/attachment-0001.htm>
More information about the debian-med-commit
mailing list