Unify run_rostests and submit_result

This commit is contained in:
Colin Finck 2023-02-02 13:01:34 +01:00
parent 075fa65bf1
commit 90f80a36f7
3 changed files with 26 additions and 13 deletions

View File

@ -323,7 +323,7 @@ Test_VBox.addStep(bs_submit_results)
#Test_VMW_Hybrid.addStep(bs_submit_results)
Test_Win2003_x64 = util.BuildFactory();
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"]))
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"]))
Test_WHS = util.BuildFactory();
Test_WHS.addStep(bs_clean)
@ -331,7 +331,7 @@ Test_WHS.addStep(bs_git)
Test_WHS.addStep(bs_prepare_source)
Test_WHS.addStep(steps.Compile(name="rostests", command=["bash", scripts_root + "build_rostests"], warningPattern="^(.*warning[: ].*|.*error[: ].*)", description=["rostests"], descriptionDone=["rostests"]))
Test_WHS.addStep(steps.SetPropertyFromCommand(command=["bash", scripts_root + "get_suffix"], property="suffix"))
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"]))
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"]))
c['builders'] = [

View File

@ -3,16 +3,26 @@
# run_rostests - Run the tests built via build_rostests using rosautotest
#
# Parameter $1 - The suffix of the directory containing the tests to run
# Parameter $2 - The reason for running the tests
# Parameter $2 - BuildBot Build number of the ReactOS build that has been tested.
# Parameter $3 - BuildBot "reason" property.
SUFFIX="$1"
BUILDNO="$2"
REASON="$3"
source ../../config.inc
rm -rf "${ROSAUTOTEST_DIR}"
mv "${ROSTESTS_PREFIX}-$1" "${ROSAUTOTEST_DIR}" || exit $?
mv "${ROSTESTS_PREFIX}-${SUFFIX}" "${ROSAUTOTEST_DIR}" || exit $?
cd $WORKDIR
mv ${ROSAUTOTEST_DIR}/rosautotest.exe . || exit $?
cp $SOURCEDIR/../rosautotest.ini . || exit $?
./rosautotest.exe /c "Build $1 $2" /w
COMMENT="Build ${BUILDNO}"
if [ "${REASON}" != "" -a "${REASON}" != "None" ]; then
COMMENT+=", Reason: ${REASON}"
fi
./rosautotest.exe /c "${COMMENT}" /w
# Initiate a graceful shutdown of the BuildBot worker, which in turn
# initiates a graceful reboot of the Windows VM.

View File

@ -5,22 +5,25 @@
# Parameter $1 - BuildBot Build number of the ReactOS build that has been tested.
# Parameter $2 - BuildBot "reason" property.
# 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)
ATTACHMENT_ID=$3
BUILDNO="$1"
REASON="$2"
ATTACHMENT_ID="$3"
source ../../config.inc
if [ "$1" = "" ]; then
if [ "${BUILDNO}" = "" ]; then
echo "Please specify the build number!"
exit 1
fi
echo "* Transferring winetest results for build $1."
echo "* Transferring winetest results for build ${BUILDNO}."
echo "* Using builder $TESTMAN_BUILDER."
COMMENT="Build $1"
if [ "$ATTACHMENT_ID" != "" ]; then
COMMENT+=", ID: $ATTACHMENT_ID, Reason: $2"
elif [ "$2" != "" -a "$2" != "None" ]; then
COMMENT+=", $2"
COMMENT="Build ${BUILDNO}"
if [ "${ATTACHMENT_ID}" != "" ]; then
COMMENT+=", ID: ${ATTACHMENT_ID}"
fi
if [ "${REASON}" != "" -a "${REASON}" != "None" ]; then
COMMENT+=", Reason: ${REASON}"
fi
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"`