File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ if [[ "${BUILD_ENVIRONMENT}" == *rocm* ]]; then
19
19
export HSA_FORCE_FINE_GRAIN_PCIE=1
20
20
fi
21
21
22
+ # This token is used by a parser on Jenkins logs for determining
23
+ # if a failure is a legitimate problem, or a problem with the build
24
+ # system; to find out more, grep for this string in ossci-job-dsl.
25
+ echo " ENTERED_USER_LAND"
26
+
27
+ trap_add cleanup EXIT
28
+
29
+
22
30
# TODO: Renable libtorch testing for MacOS, see https://github.com/pytorch/pytorch/issues/62598
23
31
# shellcheck disable=SC2034
24
32
BUILD_TEST_LIBTORCH=0
Original file line number Diff line number Diff line change @@ -39,6 +39,19 @@ trap_add() {
39
39
# inherit them unless the trace attribute is set
40
40
declare -f -t trap_add
41
41
42
+ # NB: define this function before set -x, so that we don't
43
+ # pollute the log with a premature EXITED_USER_LAND ;)
44
+ function cleanup {
45
+ # Note that if you've exited user land, then CI will conclude that
46
+ # any failure is the CI's fault. So we MUST only output this
47
+ # string
48
+ retcode=$?
49
+ set +x
50
+ if [ $retcode -eq 0 ]; then
51
+ echo " EXITED_USER_LAND"
52
+ fi
53
+ }
54
+
42
55
function assert_git_not_dirty() {
43
56
# TODO: we should add an option to `build_amd.py` that reverts the repo to
44
57
# an unmodified state.
You can’t perform that action at this time.
0 commit comments