testcase.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2012, Novell Inc.
  3. *
  4. * This program is licensed under the BSD license, read LICENSE.BSD
  5. * for further information
  6. */
  7. #include "pool.h"
  8. #include "repo.h"
  9. #include "solver.h"
  10. #define TESTCASE_RESULT_TRANSACTION (1 << 0)
  11. #define TESTCASE_RESULT_PROBLEMS (1 << 1)
  12. #define TESTCASE_RESULT_ORPHANED (1 << 2)
  13. #define TESTCASE_RESULT_RECOMMENDED (1 << 3)
  14. #define TESTCASE_RESULT_UNNEEDED (1 << 4)
  15. #define TESTCASE_RESULT_ALTERNATIVES (1 << 5)
  16. #define TESTCASE_RESULT_RULES (1 << 6)
  17. #define TESTCASE_RESULT_GENID (1 << 7)
  18. #define TESTCASE_RESULT_REASON (1 << 8)
  19. #define TESTCASE_RESULT_CLEANDEPS (1 << 9)
  20. #define TESTCASE_RESULT_JOBS (1 << 10)
  21. #define TESTCASE_RESULT_USERINSTALLED (1 << 11)
  22. #define TESTCASE_RESULT_ORDER (1 << 12)
  23. #define TESTCASE_RESULT_ORDEREDGES (1 << 13)
  24. /* reuse solver hack, testsolv use only */
  25. #define TESTCASE_RESULT_REUSE_SOLVER (1 << 31)
  26. extern Id testcase_str2dep(Pool *pool, const char *s);
  27. extern const char *testcase_dep2str(Pool *pool, Id id);
  28. extern const char *testcase_repoid2str(Pool *pool, Id repoid);
  29. extern const char *testcase_solvid2str(Pool *pool, Id p);
  30. extern Repo *testcase_str2repo(Pool *pool, const char *str);
  31. extern Id testcase_str2solvid(Pool *pool, const char *str);
  32. extern const char *testcase_job2str(Pool *pool, Id how, Id what);
  33. extern Id testcase_str2job(Pool *pool, const char *str, Id *whatp);
  34. extern int testcase_write_testtags(Repo *repo, FILE *fp);
  35. extern int testcase_add_testtags(Repo *repo, FILE *fp, int flags);
  36. extern const char *testcase_getsolverflags(Solver *solv);
  37. extern int testcase_setsolverflags(Solver *solv, const char *str);
  38. extern void testcase_resetsolverflags(Solver *solv);
  39. extern char *testcase_solverresult(Solver *solv, int flags);
  40. extern int testcase_write(Solver *solv, const char *dir, int resultflags, const char *testcasename, const char *resultname);
  41. extern Solver *testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **resultp, int *resultflagsp);
  42. extern char *testcase_resultdiff(const char *result1, const char *result2);
  43. extern const char **testcase_mangle_repo_names(Pool *pool);