gnu: java-slf4j-api: Fix tests.
* gnu/packages/java.scm (java-slf4j-api)[arguments]: Enable tests Adjust the jar content to prevent a test failure.
This commit is contained in:
		
							parent
							
								
									5fe2a139df
								
							
						
					
					
						commit
						dcf7a8a660
					
				
					 1 changed files with 19 additions and 5 deletions
				
			
		| 
						 | 
					@ -4171,12 +4171,26 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the
 | 
				
			||||||
                  #t))))
 | 
					                  #t))))
 | 
				
			||||||
    (build-system ant-build-system)
 | 
					    (build-system ant-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     ;; FIXME: org.slf4j.NoBindingTest fails with the ominous "This code
 | 
					     `(#:jar-name "slf4j-api.jar"
 | 
				
			||||||
     ;; should have never made it into slf4j-api.jar".
 | 
					 | 
				
			||||||
     `(#:tests? #f
 | 
					 | 
				
			||||||
       #:jar-name "slf4j-api.jar"
 | 
					 | 
				
			||||||
       #:source-dir "slf4j-api/src/main"
 | 
					       #:source-dir "slf4j-api/src/main"
 | 
				
			||||||
       #:test-dir "slf4j-api/src/test"))
 | 
					       #:test-dir "slf4j-api/src/test"
 | 
				
			||||||
 | 
					       #:phases
 | 
				
			||||||
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
 | 
					         (add-after 'build 'regenerate-jar
 | 
				
			||||||
 | 
					           (lambda _
 | 
				
			||||||
 | 
					             ;; pom.xml ignores these files in the jar creation process. If we don't,
 | 
				
			||||||
 | 
					             ;; we get the error "This code should have never made it into slf4j-api.jar"
 | 
				
			||||||
 | 
					             (delete-file-recursively "build/classes/org/slf4j/impl")
 | 
				
			||||||
 | 
					             (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
 | 
				
			||||||
 | 
					                             "build/classes" "."))))
 | 
				
			||||||
 | 
					         (add-before 'check 'dont-test-abstract-classes
 | 
				
			||||||
 | 
					           (lambda _
 | 
				
			||||||
 | 
					             ;; abstract classes are not meant to be run with junit
 | 
				
			||||||
 | 
					             (substitute* "build.xml"
 | 
				
			||||||
 | 
					               (("<include name=\"\\*\\*/\\*Test.java\" />")
 | 
				
			||||||
 | 
					                (string-append "<include name=\"**/*Test.java\" />"
 | 
				
			||||||
 | 
					                               "<exclude name=\"**/MultithreadedInitializationTest"
 | 
				
			||||||
 | 
					                               ".java\" />"))))))))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     `(("java-junit" ,java-junit)
 | 
					     `(("java-junit" ,java-junit)
 | 
				
			||||||
       ("java-hamcrest-core" ,java-hamcrest-core)))
 | 
					       ("java-hamcrest-core" ,java-hamcrest-core)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue