Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ from twisted.internet import defer

import configparser
import pathlib
import re


class ReactOSLDAPUserInfoProvider(auth.UserInfoProviderBase):
Expand Down Expand Up @@ -199,13 +200,28 @@ c['schedulers'].append(schedulers.ForceScheduler(

scripts_root = "../../"

testmain_id_regex = re.compile("OK\.\sTest_id\:\s(\d+)")

def extract_testman_id(rc, stdout, stderr):
m = re.search(stdout)
Comment on lines +203 to +206

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
testmain_id_regex = re.compile("OK\.\sTest_id\:\s(\d+)")
def extract_testman_id(rc, stdout, stderr):
m = re.search(stdout)
testman_id_regex = re.compile("OK\.\sTest_id\:\s(\d+)")
def extract_testman_id(rc, stdout, stderr):
m = testman_id_regex.search(stdout)

if m:
return {'testman_id': re.group(1)}
else:
return {'testman_id': None}
Comment on lines +207 to +210

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if m:
return {'testman_id': re.group(1)}
else:
return {'testman_id': None}
return {'testman_id': m.group(1)} if m else {'testman_id': None}


bs_git = steps.Git(repourl='https://github.com/reactos/reactos.git', mode='full')
bs_clean = steps.ShellCommand(name="clean", command=["bash", scripts_root + "clean"], description=["cleaning"], descriptionDone=["clean"], haltOnFailure=True)
bs_prepare_source = steps.ShellCommand(name="prepare_source", command=["bash", scripts_root + "prepare_source", util.WithProperties("%(id:-)s")], description=["preparing source"], descriptionDone=["prepared source"], haltOnFailure=True)
bs_bootcd = steps.Compile(name="bootcd", command=["bash", scripts_root + "build_reactos", "bootcd"], warningPattern="^(.*warning[: ].*|.*error[: ].*)", description=["BootCD"], descriptionDone=["BootCD"])
bs_livecd = steps.Compile(name="livecd", command=["bash", scripts_root + "build_reactos", "livecd"], warningPattern="^(.*warning[: ].*|.*error[: ].*)", description=["LiveCD"], descriptionDone=["LiveCD"])
bs_upload_iso = steps.ShellCommand(name="uploadiso", command=["bash", scripts_root + "uploadiso"], description=["uploading"], descriptionDone=["uploaded"])
bs_submit_results = steps.ShellCommand(name="submit_results", command=["bash", scripts_root + "submit_result", util.WithProperties('%(buildnumber)s'), util.WithProperties('%(reason:-)s'), util.WithProperties('%(id:-)s')], description=["submitting results"], descriptionDone=["submit results"])
bs_submit_results = steps.SetPropertyFromCommand(
name="submit_results",
command=["bash", scripts_root + "submit_result", util.WithProperties('%(buildnumber)s'), util.WithProperties('%(reason:-)s'), util.WithProperties('%(id:-)s')],
description=["submitting results"],
descriptionDone=["submit results"],
extract_fn=extract_testman_id
)


Build_GCCLin_x86 = util.BuildFactory();
Expand Down
2 changes: 1 addition & 1 deletion worker/submit_result
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ 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"`
echo "$TESTMAN_OUT"

[ "$TESTMAN_OUT" = "OK" ] && exit 0 || exit 1
[ "$TESTMAN_OUT" =~ ^OK\.\sTest_id\:\s\d+$ ] && exit 0 || exit 1