Codebase list hypre / fde61ba
debian/tests: launch runtest.sh explicitly via bash to avoid problems from hashbang #!/bin/sh hypre's src/test/runtest.sh has hashbang #!/bin/sh, but the script uses the function keyword to define functions, and therefore is not POSIX compliant. On the face of it the script should use #!/bin/bash. On debian systems /bin/sh is set to dash, which fails on the function keyword (treats it as command-not-found). But there are several problems with patching runtest.sh itself. All hypre scripts use #!/bin/sh, so a single file patch is inconsistent. What is upstream's intention? ksh and zsh, for instance, both have the function keyword and would be excluded by #!/bin/bash. See https://github.com/hypre-space/hypre/issues/881 for more discussion upstream. More bizarrely, the failure is inconsistent. Sometimes test-hypre fails (invoking via dash), sometimes it does not fail (bash gets invoked). In the same autopkgtest run test-hypre might get invoked via dash but test-hypre64 in the same run gets invoked via bash. Why is the shell invocation inconsistent this way? Simpler to just explicitly use bash in the debian/tests script. Drew Parsons 1 year, 1 month ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
44 * drop deprecated debian patch pilut_blas_mangle.patch. External
55 BLAS handling fixed in PR#36 (commit a16e7b3 for PETSc 2.18).
66 See also commit 5afacfc in PR#827.
7 * debian/tests: launch runtest.sh explicitly via bash to avoid
8 problems from hashbang #!/bin/sh (script uses function keyword)
9 See https://github.com/hypre-space/hypre/issues/881
710
811 -- Drew Parsons <dparsons@debian.org> Sun, 16 Apr 2023 12:05:45 +0200
912
4343 *\ ${TEST}\ *) echo "skipping ${TEST}";;
4444 *) echo -n "running ${TEST} ... "
4545 TEST_START=$SECONDS
46 if ./runtest.sh -t ${TEST}/*.sh >${TEST}.stdout 2>${TEST}.stderr ; then
46 if /bin/bash ./runtest.sh -t ${TEST}/*.sh >${TEST}.stdout 2>${TEST}.stderr ; then
4747 echo ok
4848 else
4949 test_return=$?