From a10defd5c8bf803b15432fb9e771cc0579d67eac Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 30 Jun 2023 23:07:42 -0500 Subject: [PATCH] Move pre-install check to execution phase This prepares for later refactoring to move this check into a packet object "install" method and expand other checks to approach an atomic transaction model, where all foreseeable causes of processing errors are checked prior to executing any step of the operation list. The testsuite is updated accordingly. --- gatekeeper.pl | 3 +-- testsuite/lib/tool/gatekeeper.exp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index 8df29a2..84f5462 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -3272,6 +3272,7 @@ foreach my $packet (@packets) { # each list element is an array reference $packet->upload_check; + $Phase = 'EX'; # If the upload installs a file, check if the final file exists; if so, # require the 'replace' option to be set. foreach my $step (@$oplist) { @@ -3296,8 +3297,6 @@ foreach my $packet (@packets) { # each list element is an array reference } } - $Phase = 'EX'; - # If the upload carries a file, transfer (with signature) to staging area. if ($packet->has_uploaded_file) { # Do we need a subdirectory on CONF_DIR_Staging as well? Can't quite diff --git a/testsuite/lib/tool/gatekeeper.exp b/testsuite/lib/tool/gatekeeper.exp index d7a166e..be14b71 100644 --- a/testsuite/lib/tool/gatekeeper.exp +++ b/testsuite/lib/tool/gatekeeper.exp @@ -697,7 +697,7 @@ proc analyze_log { base_dir name assess } { exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\) \[VL\]\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\ [^ ]+ exists and 'replace' was not selected} { # from install_files, if target exists and replace not set set A(install,target-file-exists) 1 -- 2.25.1