mirror of
https://github.com/reactos/buildbot_config.git
synced 2025-02-21 12:31:18 +00:00
Populate "testman_id" property of a build after submitting results to testman
This commit is contained in:
parent
92843a285c
commit
a8cc494371
@ -9,6 +9,7 @@ from twisted.internet import defer
|
||||
|
||||
import configparser
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
|
||||
class ReactOSLDAPUserInfoProvider(auth.UserInfoProviderBase):
|
||||
@ -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)
|
||||
if m:
|
||||
return {'testman_id': re.group(1)}
|
||||
else:
|
||||
return {'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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user