You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2022/09/05 05:54:46 UTC

svn commit: r1903870 - /spamassassin/trunk/t/bayessql.t

Author: sidney
Date: Mon Sep  5 05:54:46 2022
New Revision: 1903870

URL: http://svn.apache.org/viewvc?rev=1903870&view=rev
Log:
bug 8033 - Remove use of /dev/shm to speed up test because that causes test failure on some machines. Label test as long running

Modified:
    spamassassin/trunk/t/bayessql.t

Modified: spamassassin/trunk/t/bayessql.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayessql.t?rev=1903870&r1=1903869&r2=1903870&view=diff
==============================================================================
--- spamassassin/trunk/t/bayessql.t (original)
+++ spamassassin/trunk/t/bayessql.t Mon Sep  5 05:54:46 2022
@@ -11,6 +11,7 @@ use constant HAS_DBI => eval { require D
 use constant SQLITE => eval { require DBD::SQLite; DBD::SQLite->VERSION(1.59_01); };
 use constant SQL => conf_bool('run_bayes_sql_tests');
 
+plan skip_all => "Long running tests disabled" unless conf_bool('run_long_tests');
 plan skip_all => "DBI is unavailable on this system" unless (HAS_DBI);
 plan skip_all => "Bayes SQL tests are disabled or DBD::SQLite not found" unless (SQLITE || SQL);
 
@@ -24,8 +25,8 @@ diag "Note: If there is a failure it may
 my ($dbconfig, $dbdsn, $dbusername, $dbpassword);
 
 if (SQLITE) {
-  # Try /dev/shm as it's likely memdisk, otherwise SQLite is sloow..
-  my $dbdir = tempdir("bayessql.XXXXXX", DIR => -w "/dev/shm" ? "/dev/shm" : "log");
+  # bug 8033 - Test is 7 times faster using /dev/shm but on some test machines it fails 
+  my $dbdir = tempdir("bayessql.XXXXXX", DIR => "log");
   die "FATAL: failed to create dbdir: $!" unless -d $dbdir;
   $dbdsn = "dbi:SQLite:dbname=$dbdir/bayes.db";
   $dbusername = "";