X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ext%2Ftestcase.c;h=77cc7194704e9ee20ecd0d749ada9cbb365cc47e;hb=c948f862b552adbe2cdee24096357b887dfbb088;hp=f515057cfe0e3fbe05aa0db8d3f56c65875bb9e5;hpb=97330b5a608c2213fdf3f49bfbaa268bf9627920;p=platform%2Fupstream%2Flibsolv.git diff --git a/ext/testcase.c b/ext/testcase.c index f515057..77cc719 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -23,6 +23,9 @@ #include "testcase.h" #include "selection.h" #include "solv_xfopen.h" +#if ENABLE_TESTCASE_HELIXREPO +#include "ext/repo_helix.h" +#endif #define DISABLE_JOIN2 #include "tools_util.h" @@ -175,6 +178,9 @@ static const char *features[] = { #ifdef ENABLE_COMPLEX_DEPS "complex_deps", #endif +#if ENABLE_TESTCASE_HELIXREPO + "testcase_helixrepo", +#endif 0 }; @@ -377,6 +383,7 @@ struct oplist { { REL_AND, "&" }, { REL_OR , "|" }, { REL_WITH , "+" }, + { REL_WITHOUT , "-" }, { REL_NAMESPACE , "" }, { REL_ARCH, "." }, { REL_MULTIARCH, "" }, @@ -386,6 +393,7 @@ struct oplist { { REL_KIND, "" }, { REL_ELSE, "" }, { REL_ERROR, "" }, + { REL_UNLESS, "" }, { REL_LT, "<" }, { 0, 0 } }; @@ -2266,7 +2274,7 @@ testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const cha strqueue_push(&sq, cmd); } - if (resultflags) + if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) != 0) { char *result; cmd = 0; @@ -2513,6 +2521,10 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res int ngenid = 0; Queue autoinstq; + if (resultp) + *resultp = 0; + if (resultflagsp) + *resultflagsp = 0; if (!fp && !(fp = fopen(testcase, "r"))) { pool_debug(pool, SOLV_ERROR, "testcase_read: could not open '%s'\n", testcase); @@ -2617,10 +2629,9 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res repo_add_solv(repo, rfp, 0); fclose(rfp); } -#if 0 +#if ENABLE_TESTCASE_HELIXREPO else if (!strcmp(repotype, "helix")) { - extern int repo_add_helix(Repo *repo, FILE *fp, int flags); repo_add_helix(repo, rfp, 0); fclose(rfp); } @@ -2794,8 +2805,10 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res if (resultflagsp) *resultflagsp = resultflags; } - else if (!strcmp(pieces[0], "nextjob") && npieces == 1) + else if (!strcmp(pieces[0], "nextjob")) { + if (npieces == 2 && resultflagsp && !strcmp(pieces[1], "reusesolver")) + *resultflagsp |= TESTCASE_RESULT_REUSE_SOLVER; break; } else if (!strcmp(pieces[0], "disable") && npieces == 3)