Skip to content

Commit 90f80a3

Browse files
committed
Unify run_rostests and submit_result
1 parent 075fa65 commit 90f80a3

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

master/master.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,15 @@ Test_VBox.addStep(bs_submit_results)
323323
#Test_VMW_Hybrid.addStep(bs_submit_results)
324324

325325
Test_Win2003_x64 = util.BuildFactory();
326-
Test_Win2003_x64.addStep(steps.Compile(name="test", command=["bash", scripts_root + "run_rostests", util.WithProperties('%(suffix)s'), util.WithProperties('%(reason:-)s')], warningPattern=".*[:] Test .*", description=["testing"], descriptionDone=["test"]))
326+
Test_Win2003_x64.addStep(steps.Compile(name="test", command=["bash", scripts_root + "run_rostests", util.WithProperties('%(suffix)s'), util.WithProperties('%(buildnumber)s'), util.WithProperties('%(reason:-)s')], warningPattern=".*[:] Test .*", description=["testing"], descriptionDone=["test"]))
327327

328328
Test_WHS = util.BuildFactory();
329329
Test_WHS.addStep(bs_clean)
330330
Test_WHS.addStep(bs_git)
331331
Test_WHS.addStep(bs_prepare_source)
332332
Test_WHS.addStep(steps.Compile(name="rostests", command=["bash", scripts_root + "build_rostests"], warningPattern="^(.*warning[: ].*|.*error[: ].*)", description=["rostests"], descriptionDone=["rostests"]))
333333
Test_WHS.addStep(steps.SetPropertyFromCommand(command=["bash", scripts_root + "get_suffix"], property="suffix"))
334-
Test_WHS.addStep(steps.Compile(name="test", command=["bash", scripts_root + "run_rostests", util.WithProperties('%(suffix)s'), util.WithProperties('%(reason:-)s')], warningPattern=".*[:] Test .*", description=["testing"], descriptionDone=["test"]))
334+
Test_WHS.addStep(steps.Compile(name="test", command=["bash", scripts_root + "run_rostests", util.WithProperties('%(suffix)s'), util.WithProperties('%(buildnumber)s'), util.WithProperties('%(reason:-)s')], warningPattern=".*[:] Test .*", description=["testing"], descriptionDone=["test"]))
335335

336336

337337
c['builders'] = [

worker/run_rostests

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,26 @@
33
# run_rostests - Run the tests built via build_rostests using rosautotest
44
#
55
# Parameter $1 - The suffix of the directory containing the tests to run
6-
# Parameter $2 - The reason for running the tests
6+
# Parameter $2 - BuildBot Build number of the ReactOS build that has been tested.
7+
# Parameter $3 - BuildBot "reason" property.
8+
SUFFIX="$1"
9+
BUILDNO="$2"
10+
REASON="$3"
711
source ../../config.inc
812

913
rm -rf "${ROSAUTOTEST_DIR}"
10-
mv "${ROSTESTS_PREFIX}-$1" "${ROSAUTOTEST_DIR}" || exit $?
14+
mv "${ROSTESTS_PREFIX}-${SUFFIX}" "${ROSAUTOTEST_DIR}" || exit $?
1115

1216
cd $WORKDIR
1317
mv ${ROSAUTOTEST_DIR}/rosautotest.exe . || exit $?
1418
cp $SOURCEDIR/../rosautotest.ini . || exit $?
15-
./rosautotest.exe /c "Build $1 $2" /w
19+
20+
COMMENT="Build ${BUILDNO}"
21+
if [ "${REASON}" != "" -a "${REASON}" != "None" ]; then
22+
COMMENT+=", Reason: ${REASON}"
23+
fi
24+
25+
./rosautotest.exe /c "${COMMENT}" /w
1626

1727
# Initiate a graceful shutdown of the BuildBot worker, which in turn
1828
# initiates a graceful reboot of the Windows VM.

worker/submit_result

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55
# Parameter $1 - BuildBot Build number of the ReactOS build that has been tested.
66
# Parameter $2 - BuildBot "reason" property.
77
# Parameter $3 - JIRA Attachment ID of the patch file (this parameter can be evaluated as $ATTACHMENT_ID inside config.inc to set different sourceids for regular and patched builds)
8-
ATTACHMENT_ID=$3
8+
BUILDNO="$1"
9+
REASON="$2"
10+
ATTACHMENT_ID="$3"
911
source ../../config.inc
1012

11-
if [ "$1" = "" ]; then
13+
if [ "${BUILDNO}" = "" ]; then
1214
echo "Please specify the build number!"
1315
exit 1
1416
fi
1517

16-
echo "* Transferring winetest results for build $1."
18+
echo "* Transferring winetest results for build ${BUILDNO}."
1719
echo "* Using builder $TESTMAN_BUILDER."
1820

19-
COMMENT="Build $1"
20-
if [ "$ATTACHMENT_ID" != "" ]; then
21-
COMMENT+=", ID: $ATTACHMENT_ID, Reason: $2"
22-
elif [ "$2" != "" -a "$2" != "None" ]; then
23-
COMMENT+=", $2"
21+
COMMENT="Build ${BUILDNO}"
22+
if [ "${ATTACHMENT_ID}" != "" ]; then
23+
COMMENT+=", ID: ${ATTACHMENT_ID}"
24+
fi
25+
if [ "${REASON}" != "" -a "${REASON}" != "None" ]; then
26+
COMMENT+=", Reason: ${REASON}"
2427
fi
2528

2629
TESTMAN_OUT=`wget -q -O - "https://reactos.org/testman/webservice/buildbot_aggregator.php?sourceid=$TESTMAN_ID&password=$TESTMAN_PASS&builder=$TESTMAN_BUILDER&platform=0&build=$1&comment=$COMMENT"`

0 commit comments

Comments
 (0)