Skip to content

Commit 6b113d7

Browse files
author
Cory Schwartz
committed
date in output
1 parent 4a39a56 commit 6b113d7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

entrypoint.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SUCCESS=0
88
FAILURE=1
99

1010
# For github to collect the action output, use these strings:
11+
# Note that if you echo these strings, they will not be visible in the action log.
1112
OUTPUT_STATUS="::set-output name=status::"
1213
OUTPUT_OUTCOME="::set-output name=outcome::"
1314

@@ -24,18 +25,16 @@ REAL_COMP_FILE=$(realpath $INPUT_COMPOSITION_FILE)
2425
mkdir -p "${PLANSHOME}"
2526
ln -s "${REAL_PLAN_DIR}" "${PLANSHOME}"
2627

27-
echo real quick ls
28-
ls -l "${PLANSHOME}"
29-
3028
# Run test and wait until finished.
3129
# There is a --wait option, so it might work to use it like this
3230
# testground --endpoint "$BACKEND" run composition -f "$REAL_COMP_FILE" --wait
3331
# However, --wait doesn't always work well particularly for long-running jobs
3432
# so instead, do a long poll.
35-
/testground --endpoint "${BACKEND}" run composition -f "${REAL_COMP_FILE}" | tee testground.out
36-
TGID=$(awk '/run is queued with ID/ {print $10}' <testground.out)
33+
/testground --endpoint "${BACKEND}" run composition -f "${REAL_COMP_FILE}" | tee run.out
34+
TGID=$(awk '/run is queued with ID/ {print $10}' <run.out)
3735

3836
echo "Got testground ID ${TGID}"
37+
echo -n "Testground started: "; date
3938
echo "Waiting for job to complete."
4039

4140
while [ "${status}" != "complete" ]
@@ -46,13 +45,16 @@ do
4645
echo "${OUTPUT_STATUS}${status}"
4746
done
4847

48+
echo -n "Testground ended: "; date
49+
4950
echo getting extended status
5051
/testground --endpoint "${BACKEND}" status -t "${TGID}" --extended | tee extendedstatus.out
5152
# Get the extened status, which includes a "Result" section.
52-
# Capture the line that occurs after "Result"
53+
# Capture the line that occurs after "Result:"
5354
extstatus=$(awk '/Result/ {getline; print $0}' <extendedstatus.out)
5455

5556
# First off, there are control characters in this output, and we need to remove that.
57+
# https://github.com/testground/testground/issues/1214
5658
extstatus=$(echo "${extstatus}" | tr -d "[:cntrl:]" | sed 's/\[0m//g')
5759

5860
# test if we got a result at all. The result might be "null". A null result means most likely the

0 commit comments

Comments
 (0)