parent
641238ca06
commit
1ef46fed69
@ -0,0 +1,66 @@
|
||||
#include "util.h"
|
||||
|
||||
int bs_test_release_check(EPM_rule_message_t msg)
|
||||
{
|
||||
int ifail = EPM_go, att_count, tag_cnt, rel_cnt;
|
||||
tag_t rootTask, *attachments, win, top, *tags, tag,*rels;
|
||||
char *val;
|
||||
EPM_ask_root_task(msg.task, &rootTask);
|
||||
|
||||
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
|
||||
TC_argument_list_t * arguments = msg.arguments;
|
||||
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
|
||||
|
||||
stringstream name;
|
||||
map<string, string> paras;
|
||||
for (auto i = 0; i<arg_cnt; i++)
|
||||
{
|
||||
char *temp_key, *temp_val;
|
||||
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
|
||||
paras[temp_key] = temp_val;
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i<att_count; i++)
|
||||
{
|
||||
bool pass = true;
|
||||
if(!isTypeOf(attachments[i],"JD2_GTSYWTSRevision"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
printf("release check1\n");
|
||||
AOM_ask_value_tags(attachments[i], "JD2_CSJH", &tag_cnt, &tags);
|
||||
for(int j=0;j<tag_cnt;j++)
|
||||
{
|
||||
int tag_cnt2;
|
||||
tag_t *tags2;
|
||||
ITEM_ask_latest_rev(tags[j], &tag);
|
||||
AOM_ask_value_tags(attachments[i], "JD2_CSBG", &tag_cnt2, &tags2);
|
||||
|
||||
}
|
||||
printf("release check2\n");
|
||||
|
||||
AOM_ask_value_tags(attachments[i], "JD2_CSBG", &tag_cnt, &tags);
|
||||
for (int j = 0; j<tag_cnt; j++)
|
||||
{
|
||||
if (isTypeOf(tags[j], "JD2_CSBGHZ"))
|
||||
{
|
||||
ITEM_ask_latest_rev(tags[j], &tag);
|
||||
AOM_ask_value_tags(tag, "release_status_list", &rel_cnt, &rels);
|
||||
if (rel_cnt == 0)
|
||||
{
|
||||
AOM_ask_value_string(tag, "object_string", &val);
|
||||
name <<val<<",";
|
||||
ifail = EPM_nogo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (ifail == EPM_nogo) {
|
||||
name <<"测试计划未发布,请先审核发布!";
|
||||
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, name.str().c_str());
|
||||
}
|
||||
return ifail;
|
||||
}
|
||||
|
Loading…
Reference in new issue