gnu: mariadb: Run the full test suite.
* gnu/packages/databases.scm (mariadb)[arguments]: Override 'check' phase. Add phase 'adjust-tests'. Disable one more plugin. [properties]: New field.
This commit is contained in:
		
							parent
							
								
									5b4d2e40f1
								
							
						
					
					
						commit
						3869f39e6d
					
				
					 1 changed files with 38 additions and 1 deletions
				
			
		| 
						 | 
					@ -665,6 +665,29 @@ Language.")
 | 
				
			||||||
         "-DINSTALL_SHAREDIR=share")
 | 
					         "-DINSTALL_SHAREDIR=share")
 | 
				
			||||||
       #:phases
 | 
					       #:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
 | 
					         (add-after 'unpack 'adjust-tests
 | 
				
			||||||
 | 
					           (lambda _
 | 
				
			||||||
 | 
					             (let ((disabled-tests
 | 
				
			||||||
 | 
					                    '(;; These fail because root@hostname == root@localhost in
 | 
				
			||||||
 | 
					                      ;; the build environment, causing a user count mismatch.
 | 
				
			||||||
 | 
					                      ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
 | 
				
			||||||
 | 
					                      "main.join_cache"
 | 
				
			||||||
 | 
					                      "main.explain_non_select"
 | 
				
			||||||
 | 
					                      "roles.acl_statistics"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                   ;; This file contains a list of known-flaky tests for this
 | 
				
			||||||
 | 
					                   ;; release.  Append our own items.
 | 
				
			||||||
 | 
					                   (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
 | 
				
			||||||
 | 
					               (for-each (lambda (test)
 | 
				
			||||||
 | 
					                           (format unstable-tests "~a : ~a\n"
 | 
				
			||||||
 | 
					                                   test "Disabled in Guix"))
 | 
				
			||||||
 | 
					                         disabled-tests)
 | 
				
			||||||
 | 
					               (close-port unstable-tests)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					               (substitute* "mysql-test/mysql-test-run.pl"
 | 
				
			||||||
 | 
					                 (("/bin/ls") (which "ls"))
 | 
				
			||||||
 | 
					                 (("/bin/sh") (which "sh")))
 | 
				
			||||||
 | 
					               #t)))
 | 
				
			||||||
         (add-before 'configure 'disable-plugins
 | 
					         (add-before 'configure 'disable-plugins
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (let ((disable-plugin (lambda (name)
 | 
					             (let ((disable-plugin (lambda (name)
 | 
				
			||||||
| 
						 | 
					@ -675,7 +698,9 @@ Language.")
 | 
				
			||||||
                                         (format port "\n")))))
 | 
					                                         (format port "\n")))))
 | 
				
			||||||
                   (disabled-plugins '(;; FIXME: On armhf-linux, this plugin
 | 
					                   (disabled-plugins '(;; FIXME: On armhf-linux, this plugin
 | 
				
			||||||
                                       ;; triggers a GCC ICE.  Disable for now.
 | 
					                                       ;; triggers a GCC ICE.  Disable for now.
 | 
				
			||||||
                                       "semisync")))
 | 
					                                       "semisync"
 | 
				
			||||||
 | 
					                                       ;; XXX: Causes a test failure.
 | 
				
			||||||
 | 
					                                       "disks")))
 | 
				
			||||||
               (for-each disable-plugin disabled-plugins)
 | 
					               (for-each disable-plugin disabled-plugins)
 | 
				
			||||||
               #t)))
 | 
					               #t)))
 | 
				
			||||||
         (add-before
 | 
					         (add-before
 | 
				
			||||||
| 
						 | 
					@ -683,6 +708,15 @@ Language.")
 | 
				
			||||||
          (lambda _
 | 
					          (lambda _
 | 
				
			||||||
            (setenv "CONFIG_SHELL" (which "sh"))
 | 
					            (setenv "CONFIG_SHELL" (which "sh"))
 | 
				
			||||||
            #t))
 | 
					            #t))
 | 
				
			||||||
 | 
					         (replace 'check
 | 
				
			||||||
 | 
					           (lambda* (#:key (tests? #t) #:allow-other-keys)
 | 
				
			||||||
 | 
					             (if tests?
 | 
				
			||||||
 | 
					                 (with-directory-excursion "mysql-test"
 | 
				
			||||||
 | 
					                   (invoke "./mtr" "--verbose"
 | 
				
			||||||
 | 
					                           "--parallel" (number->string (parallel-job-count))
 | 
				
			||||||
 | 
					                           "--skip-test-list=unstable-tests"))
 | 
				
			||||||
 | 
					                 (format #t "test suite not run~%"))
 | 
				
			||||||
 | 
					             #t))
 | 
				
			||||||
         (add-after
 | 
					         (add-after
 | 
				
			||||||
          'install 'post-install
 | 
					          'install 'post-install
 | 
				
			||||||
          (lambda* (#:key outputs #:allow-other-keys)
 | 
					          (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
| 
						 | 
					@ -708,6 +742,9 @@ Language.")
 | 
				
			||||||
       ("openssl" ,openssl)
 | 
					       ("openssl" ,openssl)
 | 
				
			||||||
       ("pcre" ,pcre)
 | 
					       ("pcre" ,pcre)
 | 
				
			||||||
       ("zlib" ,zlib)))
 | 
					       ("zlib" ,zlib)))
 | 
				
			||||||
 | 
					    ;; The test suite is very resource intensive and can take more than three
 | 
				
			||||||
 | 
					    ;; hours on a x86_64 system.  Give slow and busy machines some leeway.
 | 
				
			||||||
 | 
					    (properties '((timeout . 64800)))        ;18 hours
 | 
				
			||||||
    (home-page "https://mariadb.org/")
 | 
					    (home-page "https://mariadb.org/")
 | 
				
			||||||
    (synopsis "SQL database server")
 | 
					    (synopsis "SQL database server")
 | 
				
			||||||
    (description
 | 
					    (description
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue