From: Jacob Bachmeyer Date: Thu, 25 Mar 2021 01:26:39 +0000 (-0500) Subject: Avoid running generate-ftpindex during tests X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2bbbcf26bdcf2bf1869fee9922d885c7b25ba654;p=gatekeeper.git Avoid running generate-ftpindex during tests The attempt to rebuild the FTP server index is normally harmless, since most test machines will not actually have /usr/local/bin/generate-ftpindex and the error from the inability to execute that tool is ignored anyway. However, if the testsuite is ever actually run on the FTP upload server, this will prevent a large amount of spurious work rebuilding the FTP indexes. --- diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index 49a8c45..0e6e9de 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -351,7 +351,7 @@ sub main ftp_syslog('info', "($log_style) No files found for processing."); } else { ftp_syslog('info', "($log_style) Processing complete: " . (scalar @incoming) . " uploads processed."); - system("/usr/local/bin/generate-ftpindex"); + system("/usr/local/bin/generate-ftpindex") unless IN_TEST_MODE; ftp_syslog('info', "($log_style) Updated ftpindex"); }