]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Support the install time in the testcase format
authorMichael Schroeder <mls@suse.de>
Fri, 26 Nov 2021 10:32:37 +0000 (11:32 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 30 Nov 2021 09:43:25 +0000 (10:43 +0100)
ext/repo_testcase.c

index 00f7b5420360107bb3e829bfeca4f0c45a0d34d9..2497ab578e388008e0163d2fab0f61853b1de6fa 100644 (file)
@@ -489,6 +489,9 @@ testcase_write_testtags(Repo *repo, FILE *fp)
       ti = solvable_lookup_num(s, SOLVABLE_BUILDTIME, 0);
       if (ti)
        fprintf(fp, "=Tim: %u\n", ti);
+      ti = solvable_lookup_num(s, SOLVABLE_INSTALLTIME, 0);
+      if (ti)
+       fprintf(fp, "=Iti: %u\n", ti);
       writefilelist(repo, fp, "Fls:", s);
     }
   queue_free(&q);
@@ -635,6 +638,11 @@ testcase_add_testtags(Repo *repo, FILE *fp, int flags)
          if (t)
            repodata_set_num(data, s - pool->solvables, SOLVABLE_BUILDTIME, t);
          break;
+       case 'I' << 16 | 't' << 8 | 'i':
+         t = atoi(line + 6);
+         if (t)
+           repodata_set_num(data, s - pool->solvables, SOLVABLE_INSTALLTIME, t);
+         break;
        case 'R' << 16 | 'e' << 8 | 'q':
          s->requires = adddep(repo, s->requires, line + 6, -SOLVABLE_PREREQMARKER);
          break;