Skip to content

Commit 4bb3ae7

Browse files
committed
Don't use 'trap' for automatic end group
1 parent 81ebf11 commit 4bb3ae7

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

ci-support.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ fi
5757

5858

5959
GROUP_NEST_LEVEL=0
60+
6061
begin_output_group()
6162
{
6263
if [[ $GITHUB_ACTIONS == "true" ]] && [[ $GROUP_NEST_LEVEL == 0 ]]; then
6364
echo "::group::$1"
6465
else
65-
echo "--------------------------------------------------------------"
66+
echo "//------------------------------------------------------------"
6667
echo "BEGIN $1"
67-
echo "--------------------------------------------------------------"
6868
fi
6969
GROUP_NEST_LEVEL=$((GROUP_NEST_LEVEL + 1))
7070
}
@@ -76,9 +76,8 @@ end_output_group()
7676
if [[ $GITHUB_ACTIONS == "true" ]] && [[ $GROUP_NEST_LEVEL == 0 ]]; then
7777
echo "::endgroup::$1"
7878
else
79-
echo "--------------------------------------------------------------"
8079
echo "END $1"
81-
echo "--------------------------------------------------------------"
80+
echo "\\------------------------------------------------------------"
8281
fi
8382
}
8483

@@ -88,16 +87,16 @@ with_output_group()
8887
local groupname="$1"
8988
shift
9089
begin_output_group "$groupname"
91-
trap "end_output_group $groupname" RETURN
9290
"$@"
91+
end_output_group "$groupname"
9392
}
9493

9594

9695
rewrite_pyopencl_test()
9796
{
9897
if (cd ..; $PY_EXE -c 'import pyopencl as cl; import pyopencl.characterize as c; v = [c.get_pocl_version(p) for p in cl.get_platforms()]; v, = [i for i in v if i]; import sys; sys.exit(not v >= (4,0))'); then
9998
export PYOPENCL_TEST
100-
PYOPENCL_TEST="$(echo "${PYOPENCL_TEST}" | sed s/pthread/cpu/ )"
99+
PYOPENCL_TEST="${PYOPENCL_TEST//pthread/cpu}"
101100
fi
102101
}
103102

0 commit comments

Comments
 (0)