Avoid running generate-ftpindex during tests
authorJacob Bachmeyer <jcb@gnu.org>
Thu, 25 Mar 2021 01:26:39 +0000 (20:26 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Thu, 25 Mar 2021 01:26:39 +0000 (20:26 -0500)
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.

upload-ftp-v1.2.pl

index 49a8c459ac1711d8ce180d2b8fb16316feeaa683..0e6e9deee4422f8593e3b7a6f55b3f25763ac535 100755 (executable)
@@ -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");
   }