|
@@ -122,6 +122,19 @@ namespace Usm.Tests {
|
|
|
check(Usm.ManifestFlag.from_string("dataPackage") == Usm.ManifestFlag.DATA_PACKAGE, "dataPackage flag parses");
|
|
check(Usm.ManifestFlag.from_string("dataPackage") == Usm.ManifestFlag.DATA_PACKAGE, "dataPackage flag parses");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void test_rebuild_dependants_flag() throws Error {
|
|
|
|
|
+ check(Usm.ManifestFlag.REBUILD_DEPENDANTS.to_string() == "rebuildDependants", "rebuildDependants flag serialises");
|
|
|
|
|
+ check(Usm.ManifestFlag.from_string("rebuildDependants") == Usm.ManifestFlag.REBUILD_DEPENDANTS, "rebuildDependants flag parses");
|
|
|
|
|
+
|
|
|
|
|
+ var flagged = manifest_from_json(APP_MANIFEST.printf("invercargill", "invercargill", depends_with("runtime", "[]"))
|
|
|
|
|
+ .replace("\"flags\": []", "\"flags\": [\"rebuildDependants\"]"));
|
|
|
|
|
+ check(flagged.flags.contains(Usm.ManifestFlag.REBUILD_DEPENDANTS), "rebuildDependants parses within a manifest flags array");
|
|
|
|
|
+
|
|
|
|
|
+ var serialised = ((!)new JsonElement.from_properties(Usm.Manifest.get_mapper().map_from(flagged))).stringify_pretty();
|
|
|
|
|
+ check(manifest_from_json(serialised).flags.contains(Usm.ManifestFlag.REBUILD_DEPENDANTS),
|
|
|
|
|
+ "rebuildDependants round-trips through serialisation");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
void test_data_package_validation() throws Error {
|
|
void test_data_package_validation() throws Error {
|
|
|
var clean = manifest_from_json(DATA_MANIFEST.printf("\"execs\": { \"acquire\": \"fetch.sh\" }"));
|
|
var clean = manifest_from_json(DATA_MANIFEST.printf("\"execs\": { \"acquire\": \"fetch.sh\" }"));
|
|
|
clean.validate();
|
|
clean.validate();
|
|
@@ -841,6 +854,298 @@ esac
|
|
|
Usm.Util.delete_tree(scratch);
|
|
Usm.Util.delete_tree(scratch);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // ---- rebuildDependants: lookup, planning, dedup ------------------------------
|
|
|
|
|
+
|
|
|
|
|
+ /** Manifest for a package named <name> at <version> providing one key with the given flags and depends. */
|
|
|
|
|
+ const string REBUILD_MANIFEST = """
|
|
|
|
|
+ {
|
|
|
|
|
+ "name": "%s",
|
|
|
|
|
+ "version": "%s",
|
|
|
|
|
+ "summary": "rebuild fixtures",
|
|
|
|
|
+ "licences": [],
|
|
|
|
|
+ "flags": [%s],
|
|
|
|
|
+ "provides": { "%s": "as-expected" },
|
|
|
|
|
+ "depends": %s,
|
|
|
|
|
+ "execs": {}
|
|
|
|
|
+ }
|
|
|
|
|
+ """;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Caches a package under <state_dir>/packages/<name>-<version> built
|
|
|
|
|
+ * from {@link REBUILD_MANIFEST}, optionally marks it installed, and
|
|
|
|
|
+ * returns its {@link Usm.CachedPackage}.
|
|
|
|
|
+ */
|
|
|
|
|
+ Usm.CachedPackage scratch_package(string state_dir, string name, string version, string provides, string flags, string depends, bool installed) throws Error {
|
|
|
|
|
+ var source = Path.build_filename(state_dir, @"src-$name-$version");
|
|
|
|
|
+ DirUtils.create(source, 0755);
|
|
|
|
|
+ FileUtils.set_contents(Path.build_filename(source, "MANIFEST.usm"),
|
|
|
|
|
+ REBUILD_MANIFEST.printf(name, version, flags, provides, depends));
|
|
|
|
|
+
|
|
|
|
|
+ var cache_path = Path.build_filename(state_dir, "packages", @"$name-$version");
|
|
|
|
|
+ DirUtils.create_with_parents(cache_path, 0755);
|
|
|
|
|
+ Usm.Util.archive(source, Path.build_filename(cache_path, "package.usmc"));
|
|
|
|
|
+ Usm.Util.delete_tree(source);
|
|
|
|
|
+
|
|
|
|
|
+ if(installed) {
|
|
|
|
|
+ File.new_build_filename(state_dir, "installed", @"$name-$version").make_symbolic_link(cache_path);
|
|
|
|
|
+ }
|
|
|
|
|
+ return new Usm.CachedPackage(cache_path);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /** A managed {@link Usm.SystemState} over a scratch tree: usm.config plus empty state directories. */
|
|
|
|
|
+ Usm.SystemState make_state(string scratch) throws Error {
|
|
|
|
|
+ var config_dir = Path.build_filename(scratch, "config");
|
|
|
|
|
+ var state_dir = Path.build_filename(scratch, "state");
|
|
|
|
|
+ DirUtils.create_with_parents(config_dir, 0700);
|
|
|
|
|
+ DirUtils.create_with_parents(state_dir, 0700);
|
|
|
|
|
+ foreach(var part in new string[] { "packages", "installed", "lists" }) {
|
|
|
|
|
+ DirUtils.create(Path.build_filename(state_dir, part), 0700);
|
|
|
|
|
+ }
|
|
|
|
|
+ FileUtils.set_contents(Path.build_filename(config_dir, "usm.config"),
|
|
|
|
|
+ "{\"is_managed\": true, \"managed\": {\"state_path\": \"%s\"}}".printf(state_dir));
|
|
|
|
|
+
|
|
|
|
|
+ var paths = new Usm.Paths();
|
|
|
|
|
+ paths.usm_config_dir = config_dir;
|
|
|
|
|
+ return new Usm.SystemState(paths);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void test_find_dependant_names() throws Error {
|
|
|
|
|
+ var scratch = make_scratch();
|
|
|
|
|
+ var state = make_state(scratch);
|
|
|
|
|
+ var state_dir = Path.build_filename(scratch, "state");
|
|
|
|
|
+
|
|
|
|
|
+ var updated = scratch_package(state_dir, "dep-a", "1.0.0", "pc:dep-a.pc", "", depends_with("runtime", "[]"), false);
|
|
|
|
|
+ // an older installed dep-a depending on its own provides is not its own dependant
|
|
|
|
|
+ scratch_package(state_dir, "dep-a", "0.9.0", "pc:dep-a.pc", "", depends_with("runtime", "[\"pc:dep-a.pc\"]"), true);
|
|
|
|
|
+ scratch_package(state_dir, "dep-b", "0.1", "bin:dep-b", "", depends_with("build", "[\"pc:dep-a.pc\"]"), true);
|
|
|
|
|
+ scratch_package(state_dir, "dep-c", "2.0", "bin:dep-c", "",
|
|
|
|
|
+ "{ \"runtime\": [[\"pc:dep-a.pc\", \"opt:other\"], [\"pc:elsewhere.pc\"]], \"build\": [], \"manage\": [] }", true);
|
|
|
|
|
+ scratch_package(state_dir, "unrelated", "1.0", "bin:unrelated", "", depends_with("runtime", "[\"bin:bash\"]"), true);
|
|
|
|
|
+
|
|
|
|
|
+ var dependants = state.find_dependant_names(updated);
|
|
|
|
|
+ check(dependants.length == 2, "exactly the two dependants are found");
|
|
|
|
|
+ check(dependants.any(n => n == "dep-b-0.1"), "a build-phase dependant is found");
|
|
|
|
|
+ check(dependants.any(n => n == "dep-c-2.0"), "a grouped-phase dependant is found via any candidate group");
|
|
|
|
|
+ check(dependants.no(n => n == "unrelated-1.0"), "a package with no dependency on the update is not found");
|
|
|
|
|
+ check(dependants.no(n => n == "dep-a-0.9.0"), "an older installed version of the update is not its own dependant");
|
|
|
|
|
+
|
|
|
|
|
+ // resource-level matching: a canonlib: provide satisfies a lib: dependency
|
|
|
|
|
+ var canonical = scratch_package(state_dir, "dep-libc", "1.0", "canonlib:dep-lib.so", "", depends_with("runtime", "[]"), false);
|
|
|
|
|
+ scratch_package(state_dir, "dep-lib", "3.0", "lib:dep-lib.so", "", depends_with("runtime", "[\"lib:dep-lib.so\"]"), true);
|
|
|
|
|
+ check(state.find_dependant_names(canonical).any(n => n == "dep-lib-3.0"), "a canonlib provide satisfies a lib dependency");
|
|
|
|
|
+
|
|
|
|
|
+ Usm.Util.delete_tree(scratch);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void test_rebuild_planning() throws Error {
|
|
|
|
|
+ var scratch = make_scratch();
|
|
|
|
|
+ var state = make_state(scratch);
|
|
|
|
|
+ var state_dir = Path.build_filename(scratch, "state");
|
|
|
|
|
+
|
|
|
|
|
+ // two flagged providers, each with an incoming update
|
|
|
|
|
+ scratch_package(state_dir, "liba", "1.0.0", "pc:liba.pc", "\"rebuildDependants\"", depends_with("runtime", "[]"), true);
|
|
|
|
|
+ var liba_update = scratch_package(state_dir, "liba", "2.0.0", "pc:liba.pc", "\"rebuildDependants\"", depends_with("runtime", "[]"), false);
|
|
|
|
|
+ scratch_package(state_dir, "libx", "1.0.0", "pc:libx.pc", "\"rebuildDependants\"", depends_with("runtime", "[]"), true);
|
|
|
|
|
+ var libx_update = scratch_package(state_dir, "libx", "2.0.0", "pc:libx.pc", "\"rebuildDependants\"", depends_with("runtime", "[]"), false);
|
|
|
|
|
+ // statum depends on liba in its build phase and libx at runtime
|
|
|
|
|
+ scratch_package(state_dir, "statum", "0.1", "bin:statum", "",
|
|
|
|
|
+ "{ \"runtime\": [\"pc:libx.pc\"], \"build\": [\"pc:liba.pc\"], \"manage\": [] }", true);
|
|
|
|
|
+ // client 1.0.0 depends on liba, but client 2.0.0 joins the transaction explicitly
|
|
|
|
|
+ scratch_package(state_dir, "client", "1.0.0", "bin:client", "", depends_with("build", "[\"pc:liba.pc\"]"), true);
|
|
|
|
|
+ var client_update = scratch_package(state_dir, "client", "2.0.0", "bin:client", "", depends_with("build", "[\"pc:liba.pc\"]"), false);
|
|
|
|
|
+ // libz updates without the flag, so its dependant must NOT rebuild
|
|
|
|
|
+ var libz_update = scratch_package(state_dir, "libz", "2.0.0", "pc:libz.pc", "", depends_with("runtime", "[]"), false);
|
|
|
|
|
+ scratch_package(state_dir, "user", "1.0.0", "bin:user", "", depends_with("build", "[\"pc:libz.pc\"]"), true);
|
|
|
|
|
+
|
|
|
|
|
+ var dependants = state.find_dependant_names(liba_update);
|
|
|
|
|
+ check(dependants.length == 2 && dependants.any(n => n == "statum-0.1") && dependants.any(n => n == "client-1.0.0"),
|
|
|
|
|
+ "the lookup sees both of liba's installed dependants before filtering");
|
|
|
|
|
+
|
|
|
|
|
+ var to_install = new HashSet<Usm.CachedPackage>();
|
|
|
|
|
+ to_install.add(liba_update);
|
|
|
|
|
+ to_install.add(libx_update);
|
|
|
|
|
+ to_install.add(client_update);
|
|
|
|
|
+ to_install.add(libz_update);
|
|
|
|
|
+ var transaction = new Usm.Transaction() {
|
|
|
|
|
+ paths = new Usm.Paths(),
|
|
|
|
|
+ resource_finder = new Usm.ResourceFinder(),
|
|
|
|
|
+ to_install = to_install,
|
|
|
|
|
+ to_remove = new HashSet<Usm.CachedPackage>(),
|
|
|
|
|
+ state = state
|
|
|
|
|
+ };
|
|
|
|
|
+ transaction.strategise();
|
|
|
|
|
+
|
|
|
|
|
+ check(transaction.rebuilds.length == 1, "one rebuild is planned across two flagged providers");
|
|
|
|
|
+ check(transaction.rebuilds[0].package.package_name == "statum-0.1", "the shared dependant statum rebuilds exactly once");
|
|
|
|
|
+ check(transaction.rebuilds[0].trigger.package_name == "liba-2.0.0" || transaction.rebuilds[0].trigger.package_name == "libx-2.0.0",
|
|
|
|
|
+ "the rebuild records the flagged trigger");
|
|
|
|
|
+ check(transaction.rebuilds[0].package.state_path == Path.build_filename(state_dir, "packages", "statum-0.1"),
|
|
|
|
|
+ "the rebuild reuses the installed package's own state path");
|
|
|
|
|
+
|
|
|
|
|
+ var rebuilt = new HashSet<string>();
|
|
|
|
|
+ foreach(var entry in transaction.rebuilds) {
|
|
|
|
|
+ rebuilt.add(entry.package.package_name);
|
|
|
|
|
+ }
|
|
|
|
|
+ check(!rebuilt.has("client-1.0.0"), "a dependant already in to_install is not added as a rebuild");
|
|
|
|
|
+ check(!rebuilt.has("user-1.0.0"), "dependants of unflagged providers are not rebuilt");
|
|
|
|
|
+
|
|
|
|
|
+ var lot_names = new StringBuilder();
|
|
|
|
|
+ foreach(var lot in transaction.install_lots) {
|
|
|
|
|
+ lot_names.append(lot.to_string(p => p.package_name, ","));
|
|
|
|
|
+ }
|
|
|
|
|
+ check(!lot_names.str.contains("statum"), "a rebuild target never also builds through the install lots");
|
|
|
|
|
+
|
|
|
|
|
+ Usm.Util.delete_tree(scratch);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // ---- build archive restoration + clean retry ---------------------------------
|
|
|
|
|
+
|
|
|
|
|
+ /** Manifest for a build-only package: an executable build script, no provides. */
|
|
|
|
|
+ const string BUILD_MANIFEST = """
|
|
|
|
|
+ {
|
|
|
|
|
+ "name": "%s",
|
|
|
|
|
+ "version": "%s",
|
|
|
|
|
+ "summary": "build cache fixture",
|
|
|
|
|
+ "licences": [],
|
|
|
|
|
+ "flags": [],
|
|
|
|
|
+ "provides": {},
|
|
|
|
|
+ "depends": { "runtime": [], "build": [], "manage": [] },
|
|
|
|
|
+ "execs": { "build": "build.sh" }
|
|
|
|
|
+ }
|
|
|
|
|
+ """;
|
|
|
|
|
+
|
|
|
|
|
+ /** Always fails; logs whether the build directory carried the archived marker. */
|
|
|
|
|
+ const string FAILING_BUILD_SCRIPT = """#!/bin/bash
|
|
|
|
|
+if [ -f "$1/from-archive" ]; then
|
|
|
|
|
+ echo restored >> "$USM_TEST_BUILD_LOG"
|
|
|
|
|
+else
|
|
|
|
|
+ echo fresh >> "$USM_TEST_BUILD_LOG"
|
|
|
|
|
+fi
|
|
|
|
|
+exit 1
|
|
|
|
|
+""";
|
|
|
|
|
+
|
|
|
|
|
+ /** Succeeds only against the restored archive, so a retry (fresh) fails. */
|
|
|
|
|
+ const string INCREMENTAL_BUILD_SCRIPT = """#!/bin/bash
|
|
|
|
|
+if [ -f "$1/from-archive" ]; then
|
|
|
|
|
+ echo restored >> "$USM_TEST_BUILD_LOG"
|
|
|
|
|
+ exit 0
|
|
|
|
|
+fi
|
|
|
|
|
+echo fresh >> "$USM_TEST_BUILD_LOG"
|
|
|
|
|
+exit 1
|
|
|
|
|
+""";
|
|
|
|
|
+
|
|
|
|
|
+ /** Paths with the destination rooted in <scratch> so nothing touches the real filesystem. */
|
|
|
|
|
+ Usm.Paths scratch_paths(string scratch) {
|
|
|
|
|
+ var paths = new Usm.Paths();
|
|
|
|
|
+ paths.destination = Path.build_filename(scratch, "dest");
|
|
|
|
|
+ return paths;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Caches a build-only package named <name> running <script>, optionally
|
|
|
|
|
+ * seeding its cache with a build.tar.xz holding a "from-archive" marker,
|
|
|
|
|
+ * and returns a transaction over it.
|
|
|
|
|
+ */
|
|
|
|
|
+ Usm.Transaction build_transaction(string scratch, string name, string script, bool with_archive) throws Error {
|
|
|
|
|
+ var state = make_state(scratch);
|
|
|
|
|
+ var cache_path = Path.build_filename(scratch, "state", "packages", @"$name-1.0.0");
|
|
|
|
|
+ DirUtils.create_with_parents(cache_path, 0755);
|
|
|
|
|
+
|
|
|
|
|
+ var source = Path.build_filename(scratch, @"src-$name");
|
|
|
|
|
+ DirUtils.create(source, 0755);
|
|
|
|
|
+ FileUtils.set_contents(Path.build_filename(source, "MANIFEST.usm"), BUILD_MANIFEST.printf(name, "1.0.0"));
|
|
|
|
|
+ FileUtils.set_contents(Path.build_filename(source, "build.sh"), script);
|
|
|
|
|
+ FileUtils.chmod(Path.build_filename(source, "build.sh"), 0755);
|
|
|
|
|
+ Usm.Util.archive(source, Path.build_filename(cache_path, "package.usmc"));
|
|
|
|
|
+ Usm.Util.delete_tree(source);
|
|
|
|
|
+
|
|
|
|
|
+ if(with_archive) {
|
|
|
|
|
+ var stale_build = Path.build_filename(scratch, "stale-build");
|
|
|
|
|
+ DirUtils.create(stale_build, 0755);
|
|
|
|
|
+ FileUtils.set_contents(Path.build_filename(stale_build, "from-archive"), "stale");
|
|
|
|
|
+ Usm.Util.archive(stale_build, Path.build_filename(cache_path, "build.tar.xz"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var to_install = new HashSet<Usm.CachedPackage>();
|
|
|
|
|
+ to_install.add(new Usm.CachedPackage(cache_path));
|
|
|
|
|
+ return new Usm.Transaction() {
|
|
|
|
|
+ paths = scratch_paths(scratch),
|
|
|
|
|
+ resource_finder = new Usm.ResourceFinder(),
|
|
|
|
|
+ to_install = to_install,
|
|
|
|
|
+ to_remove = new HashSet<Usm.CachedPackage>(),
|
|
|
|
|
+ state = state
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void test_build_archive_restore_and_clean_retry() throws Error {
|
|
|
|
|
+ var original_dir = Environment.get_current_dir();
|
|
|
|
|
+ var scratch = make_scratch();
|
|
|
|
|
+ var log_path = Path.build_filename(scratch, "build.log");
|
|
|
|
|
+ Environment.set_variable("USM_TEST_BUILD_LOG", log_path, true);
|
|
|
|
|
+
|
|
|
|
|
+ var transaction = build_transaction(scratch, "fail-pkg", FAILING_BUILD_SCRIPT, true);
|
|
|
|
|
+ var threw = false;
|
|
|
|
|
+ try {
|
|
|
|
|
+ transaction.run();
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Usm.TransactionError e) {
|
|
|
|
|
+ threw = true;
|
|
|
|
|
+ check(e.message.contains("fail-pkg"), "the clean-retry failure names the package");
|
|
|
|
|
+ }
|
|
|
|
|
+ check(threw, "a failing restored build followed by a failing clean retry fails the transaction");
|
|
|
|
|
+
|
|
|
|
|
+ string log = "";
|
|
|
|
|
+ FileUtils.get_contents(log_path, out log);
|
|
|
|
|
+ check(log == "restored\nfresh\n", "the clean retry fires once after the restored build fails");
|
|
|
|
|
+
|
|
|
|
|
+ Environment.set_current_dir(original_dir);
|
|
|
|
|
+ Usm.Util.delete_tree(scratch);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void test_build_archive_restored_incrementally() throws Error {
|
|
|
|
|
+ var original_dir = Environment.get_current_dir();
|
|
|
|
|
+ var scratch = make_scratch();
|
|
|
|
|
+ var log_path = Path.build_filename(scratch, "build.log");
|
|
|
|
|
+ Environment.set_variable("USM_TEST_BUILD_LOG", log_path, true);
|
|
|
|
|
+
|
|
|
|
|
+ var cache_path = Path.build_filename(scratch, "state", "packages", "inc-pkg-1.0.0");
|
|
|
|
|
+ var transaction = build_transaction(scratch, "inc-pkg", INCREMENTAL_BUILD_SCRIPT, true);
|
|
|
|
|
+ transaction.run();
|
|
|
|
|
+
|
|
|
|
|
+ string log = "";
|
|
|
|
|
+ FileUtils.get_contents(log_path, out log);
|
|
|
|
|
+ check(log == "restored\n", "a successful build runs against the restored archive without a retry");
|
|
|
|
|
+ check(File.new_for_path(Path.build_filename(cache_path, "build.tar.xz")).query_exists(),
|
|
|
|
|
+ "cleanup re-archives the build directory for the next transaction");
|
|
|
|
|
+
|
|
|
|
|
+ Environment.set_current_dir(original_dir);
|
|
|
|
|
+ Usm.Util.delete_tree(scratch);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void test_build_failure_without_cache_propagates() throws Error {
|
|
|
|
|
+ var original_dir = Environment.get_current_dir();
|
|
|
|
|
+ var scratch = make_scratch();
|
|
|
|
|
+ var log_path = Path.build_filename(scratch, "build.log");
|
|
|
|
|
+ Environment.set_variable("USM_TEST_BUILD_LOG", log_path, true);
|
|
|
|
|
+
|
|
|
|
|
+ var transaction = build_transaction(scratch, "clean-pkg", FAILING_BUILD_SCRIPT, false);
|
|
|
|
|
+ var threw = false;
|
|
|
|
|
+ try {
|
|
|
|
|
+ transaction.run();
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Usm.TransactionError e) {
|
|
|
|
|
+ threw = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ check(threw, "a failing already-clean build propagates without a retry");
|
|
|
|
|
+
|
|
|
|
|
+ string log = "";
|
|
|
|
|
+ FileUtils.get_contents(log_path, out log);
|
|
|
|
|
+ check(log == "fresh\n", "a build without any cache is attempted exactly once");
|
|
|
|
|
+
|
|
|
|
|
+ Environment.set_current_dir(original_dir);
|
|
|
|
|
+ Usm.Util.delete_tree(scratch);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
int main() {
|
|
int main() {
|
|
|
test_default_ignore();
|
|
test_default_ignore();
|
|
|
try {
|
|
try {
|
|
@@ -855,6 +1160,7 @@ esac
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
test_data_package_flag();
|
|
test_data_package_flag();
|
|
|
|
|
+ test_rebuild_dependants_flag();
|
|
|
test_data_package_validation();
|
|
test_data_package_validation();
|
|
|
test_data_package_from_file();
|
|
test_data_package_from_file();
|
|
|
test_configuration_system_package_manager();
|
|
test_configuration_system_package_manager();
|
|
@@ -904,6 +1210,25 @@ esac
|
|
|
print("FAIL resolver test threw: %s\n", e.message);
|
|
print("FAIL resolver test threw: %s\n", e.message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ test_find_dependant_names();
|
|
|
|
|
+ test_rebuild_planning();
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Error e) {
|
|
|
|
|
+ failures++;
|
|
|
|
|
+ print("FAIL rebuild planning test threw: %s\n", e.message);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ test_build_archive_restore_and_clean_retry();
|
|
|
|
|
+ test_build_archive_restored_incrementally();
|
|
|
|
|
+ test_build_failure_without_cache_propagates();
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Error e) {
|
|
|
|
|
+ failures++;
|
|
|
|
|
+ print("FAIL build cache retry test threw: %s\n", e.message);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
print("%d passed, %d failed\n", passes, failures);
|
|
print("%d passed, %d failed\n", passes, failures);
|
|
|
return failures == 0 ? 0 : 1;
|
|
return failures == 0 ? 0 : 1;
|
|
|
}
|
|
}
|