From 6881a71a87819ed99471cb110b18120dd6db6747 Mon Sep 17 00:00:00 2001 From: Alice Domage Date: Fri, 23 Jun 2023 13:32:20 +0200 Subject: [PATCH] depot_remove.run: improve tests This commits introduces changes to test number 4, so it must keep more than one PKG. Also, it introduces a 5th test to verify that the functionality does delete everything in the depot. Issue genodelabs#4866 --- repos/gems/run/depot_remove.run | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/repos/gems/run/depot_remove.run b/repos/gems/run/depot_remove.run index 2dc17efa65..7f53945b1e 100644 --- a/repos/gems/run/depot_remove.run +++ b/repos/gems/run/depot_remove.run @@ -288,15 +288,17 @@ if { [check_depot_state $context] } { puts " TEST 3 --- Delete a PKG archive with deps to keep --- SUCCESS" -puts "\n--------------- TEST 4 --- Remove all, keep themed_decorator PKG" +puts "\n--------------- TEST 4 --- Remove all, keep themed_decorator and chroot PKGS" set context [mark_all_for_deletion [build_depot_context]] set context [mark_pkg_to_keep $context "themed_decorator"] +set context [mark_pkg_to_keep $context "chroot"] install_test_config { + } @@ -304,9 +306,27 @@ install_test_config { run_genode_until ".*" 10 if { [check_depot_state $context] } { - puts " TEST 4 --- Remove all, keep themed_decorator PKG --- ERROR" + puts " TEST 4 --- Remove all, keep themed_decorator and chroot PKGS --- ERROR" exit 1 } -puts " TEST 4 --- Remove all, keep themed_decorator PKG --- SUCCESS" +puts " TEST 4 --- Remove all, keep themed_decorator and chroot PKGS --- SUCCESS" +puts "\n--------------- TEST 5 --- Remove all --- SUCCESS" + +set context [mark_all_for_deletion [build_depot_context]] + +install_test_config { + + + +} + +run_genode_until ".*" 10 + +if { [check_depot_state $context] } { + puts " TEST 5 --- Remove all --- ERROR" + exit 1 +} + +puts " TEST 5 --- Remove all --- SUCCESS"