]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add ENABLE_TESTCASE_HELIXREPO as hidden compile option
authorMichael Schroeder <mls@suse.de>
Wed, 24 May 2017 09:54:02 +0000 (11:54 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 24 May 2017 09:54:02 +0000 (11:54 +0200)
This is pretty much just for me using testsolv on testcases
generated by libzypp. There used to be a #if 0 in the code which
I manually toggled, but the option is much saner.

CMakeLists.txt
ext/testcase.c

index bcdeee648f2aa5d70a780fd100481e6868137764..790206512e803e056bfde572484e3e9e103e5f4c 100644 (file)
@@ -284,7 +284,7 @@ ENDFOREACH (VAR)
 
 FOREACH (VAR
   ENABLE_RPMDB ENABLE_RPMPKG ENABLE_PUBKEY ENABLE_RPMMD ENABLE_RPMDB_BYRPMHEADER
-  ENABLE_SUSEREPO ENABLE_COMPS
+  ENABLE_SUSEREPO ENABLE_COMPS ENABLE_TESTCASE_HELIXREPO
   ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN ENABLE_HAIKU
   ENABLE_ZLIB_COMPRESSION ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION
   ENABLE_PGPVRFY ENABLE_APPDATA)
index f515057cfe0e3fbe05aa0db8d3f56c65875bb9e5..70d0b73c42148c1659f6ff084508f92b8e58aa4d 100644 (file)
@@ -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"
@@ -174,6 +177,9 @@ static const char *features[] = {
 #endif
 #ifdef ENABLE_COMPLEX_DEPS
   "complex_deps",
+#endif
+#if ENABLE_TESTCASE_HELIXREPO
+  "testcase_helixrepo",
 #endif
   0
 };
@@ -2617,10 +2623,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);
                }