Hello, wt., 5 paź 2021 o 18:34 Radosław Korzeniewski <rados...@korzeniewski.net> napisał(a):
> Hello Dan, > > wt., 5 paź 2021 o 17:41 Dan Langille <d...@langille.org> napisał(a): > >> >> Dan Langille wrote: >> >> >> Hello, >> >> Is it time to update the regression tests from Python 2 to Python3? >> >> e.g. >> >> [pg14 dan ~/src/bacula/regress] % grep -r python2 * 14:25:49 >> build/release/bgit.py:#!/usr/bin/env python2 >> test_duration:#!/usr/bin/env python2 >> ^C >> >> This is not a complete list. >> >> >> >> I have started moving my regression testing hosts from 9.x to 11.x and >> I'm finding things which need improvement. >> >> Following on from this, I am finding other things which are breaking >> regression testing on non-Linux systems. >> >> The first: do not assume /bin/bash exists >> >> [pg14 dan ~/src/bacula/regress] % git diff >> scripts/cleanup 15:11:00 >> diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup >> index 6cc332a16..fbeb28025 100755 >> --- a/regress/scripts/cleanup >> +++ b/regress/scripts/cleanup >> @@ -1,4 +1,4 @@ >> -#!/bin/bash >> +#!/usr/bin/env bash >> # >> # Copyright (C) 2000-2020 Kern Sibbald >> # License: BSD 2-Clause; see file LICENSE-FOSS >> [pg14 dan ~/src/bacula/regress] >> % 15:11:07 >> >> This same problem also affects regress/scripts/regress-utils.sh >> >> Next, do not assume /bin/bash is the bash you are using. On some systems, >> it is /usr/local/bin/bash. >> >> Deeper into regress/scripts/regress-utils.sh, is found: >> >> # now check if we are running under a proper shell >> if test "x$SHELL" != "x/bin/bash" >> then >> echo "Regression script must use BASH for this utilities!" >> exit 1 >> fi >> >> This will fail on my system for sure and others I'm sure. I think for >> two reasons: >> >> 1 - $SHELL is an environment variable - it is not the shell running this >> script >> > > For bash it is a shell running the script. > I was wrong about the above statements. Do not take it in the discussion. Sorry. -- Radosław Korzeniewski rados...@korzeniewski.net
_______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel