Makefiles: update tests to ignore the BareExcept warning.
The `unittest` library still contains a number of bare exceptions, which now result in warnings from the compliler. Patching the standard library to remove these warnings is outside the scope of this project, so we're going to ignore these warnings.
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -2,4 +2,5 @@ tests/*
 | 
				
			|||||||
!tests/*.*
 | 
					!tests/*.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bin/
 | 
				
			||||||
*.sw?
 | 
					*.sw?
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										19
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Makefile
									
									
									
									
									
								
							@@ -5,25 +5,22 @@ SOURCES=$(call rwildcard,src/,*.nim)
 | 
				
			|||||||
TEST_SOURCES=$(wildcard tests/*.nim)
 | 
					TEST_SOURCES=$(wildcard tests/*.nim)
 | 
				
			||||||
TESTS=$(patsubst %.nim,bin/%,$(TEST_SOURCES))
 | 
					TESTS=$(patsubst %.nim,bin/%,$(TEST_SOURCES))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: test
 | 
					 | 
				
			||||||
test: $(TESTS) $(SOURCES)
 | 
					 | 
				
			||||||
	@for t in $(TESTS); do $$t; done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.PHONY: watch-tests
 | 
					 | 
				
			||||||
watch-tests:
 | 
					 | 
				
			||||||
	watch 'make test' src tests --wait=10
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.PHONY: build
 | 
					.PHONY: build
 | 
				
			||||||
build: test
 | 
					build: test
 | 
				
			||||||
	nimble build
 | 
						nimble build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.PHONY: test
 | 
				
			||||||
 | 
					test:
 | 
				
			||||||
 | 
						#@for t in $(TESTS); do $$t; done
 | 
				
			||||||
 | 
						nimble --warning:BareExcept:off test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: install
 | 
					.PHONY: install
 | 
				
			||||||
install: test
 | 
					install: test
 | 
				
			||||||
	nimble install
 | 
						nimble install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
diagrams: doc/vcard3.mmd doc/vcard4.mmd
 | 
					diagrams: doc/vcard3.mmd
 | 
				
			||||||
	mmdc -i doc/vcard3.mmd -o doc/vcard3.png
 | 
						mmdc -i doc/vcard3.mmd -o doc/vcard3.png
 | 
				
			||||||
	mmdc -i doc/vcard4.mmd -o doc/vcard4.png
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target allowing for running individual tests.
 | 
				
			||||||
bin/tests/%: tests/%.nim $(SOURCES)
 | 
					bin/tests/%: tests/%.nim $(SOURCES)
 | 
				
			||||||
	nim --outdir:bin/tests c $(patsubst bin/%,%.nim,$@)
 | 
						nim --outdir:bin/tests --hints:off --warning:BareExcept:off c -r $(patsubst bin/%,%.nim,$@)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user