tools: make: set exit code when various tests fail
This commit is contained in:
		
							parent
							
								
									895a66eb06
								
							
						
					
					
						commit
						98ca2e965c
					
				
							
								
								
									
										10
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
								
							| @ -579,14 +579,14 @@ test: pkgtest builtintest functest \ | |||||||
| pkgtest: \ | pkgtest: \ | ||||||
| 	$(call def-help,pkgtest, run the test suites for each package ) | 	$(call def-help,pkgtest, run the test suites for each package ) | ||||||
| 	@($(STACK) test \
 | 	@($(STACK) test \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || (echo $@ FAILED; false) | ||||||
| 
 | 
 | ||||||
| # NB ensure hledger executable is current (eg do pkgtest first)
 | # NB ensure hledger executable is current (eg do pkgtest first)
 | ||||||
| #@echo "built-in tests (hledger cli unit tests)":
 | #@echo "built-in tests (hledger cli unit tests)":
 | ||||||
| builtintest: \ | builtintest: \ | ||||||
| 	$(call def-help,builtintest, run tests built in to the hledger executable (subset of pkg tests) ) | 	$(call def-help,builtintest, run tests built in to the hledger executable (subset of pkg tests) ) | ||||||
| 	@($(STACK) exec hledger test \
 | 	@($(STACK) exec hledger test \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || (echo $@ FAILED; false) | ||||||
| 
 | 
 | ||||||
| # builtintestghc: bin/hledgerdev \
 | # builtintestghc: bin/hledgerdev \
 | ||||||
| # 	$(call def-help,builtintest, run built-in unit tests with ghc build )
 | # 	$(call def-help,builtintest, run built-in unit tests with ghc build )
 | ||||||
| @ -610,7 +610,7 @@ builtintest: \ | |||||||
| functest: tests/addons/hledger-addon \ | functest: tests/addons/hledger-addon \ | ||||||
| 	$(call def-help,functest, run the functional tests for hledger ) | 	$(call def-help,functest, run the functional tests for hledger ) | ||||||
| 	@($(SHELLTESTSTK) tests \
 | 	@($(SHELLTESTSTK) tests \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || (echo $@ FAILED; false) | ||||||
| 
 | 
 | ||||||
| ADDONEXTS=pl py rb sh hs lhs rkt exe com bat | ADDONEXTS=pl py rb sh hs lhs rkt exe com bat | ||||||
| tests/addons/hledger-addon: \ | tests/addons/hledger-addon: \ | ||||||
| @ -638,7 +638,7 @@ tests/addons/hledger-addon: \ | |||||||
| haddocktest: \ | haddocktest: \ | ||||||
| 	$(call def-help,haddocktest, run haddock and make sure it succeeds ) | 	$(call def-help,haddocktest, run haddock and make sure it succeeds ) | ||||||
| 	@(make --quiet haddock \
 | 	@(make --quiet haddock \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || (echo $@ FAILED; false) | ||||||
| 
 | 
 | ||||||
| # warningstest: \
 | # warningstest: \
 | ||||||
| # 	$(call def-help,warningstest,\
 | # 	$(call def-help,warningstest,\
 | ||||||
| @ -651,7 +651,7 @@ haddocktest: \ | |||||||
| cabalfiletest: \ | cabalfiletest: \ | ||||||
| 	$(call def-help,cabalfiletest, run cabal check to test cabal file syntax ) | 	$(call def-help,cabalfiletest, run cabal check to test cabal file syntax ) | ||||||
| 	@(make --no-print-directory cabalcheck \
 | 	@(make --no-print-directory cabalcheck \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || (echo $@ FAILED; false) | ||||||
| 
 | 
 | ||||||
| # quickcabaltest: \
 | # quickcabaltest: \
 | ||||||
| # 	$(call def-help,quickcabaltest,\
 | # 	$(call def-help,quickcabaltest,\
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user