aboutsummaryrefslogtreecommitdiffstats
path: root/BuildTests
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-03-04 16:15:59 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-03-04 16:15:59 +0000
commit9ffeac6992774224ebc279e346f99d5ed725bcd9 (patch)
tree358b663f2d9e2dbd1555af6ab6ee174da26711e1 /BuildTests
parente408f92b266aa381b01066bd38da88b3c823b997 (diff)
downloadlufa-9ffeac6992774224ebc279e346f99d5ed725bcd9.tar.gz
lufa-9ffeac6992774224ebc279e346f99d5ed725bcd9.tar.bz2
lufa-9ffeac6992774224ebc279e346f99d5ed725bcd9.zip
Update code and StaticAnlysisTest so that missingInclude warnings do not have to be suppressed, and so that all code except for third party libraries can be checked.
Update SingleUSBModeTest makefile to separate out the messages from the test commands.
Diffstat (limited to 'BuildTests')
-rw-r--r--BuildTests/ModuleTest/makefile20
-rw-r--r--BuildTests/SingleUSBModeTest/makefile36
-rw-r--r--BuildTests/StaticAnalysisTest/makefile31
3 files changed, 54 insertions, 33 deletions
diff --git a/BuildTests/ModuleTest/makefile b/BuildTests/ModuleTest/makefile
index 1930eddc1..d80e2a2ac 100644
--- a/BuildTests/ModuleTest/makefile
+++ b/BuildTests/ModuleTest/makefile
@@ -22,7 +22,7 @@ UC3_FAMILIES = uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256
DEVICE_FAMILIES = $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3)
-all: begin $(DEVICE_FAMILIES) end
+all: begin $(DEVICE_FAMILIES) clean end
begin:
@echo Executing build test "ModuleTest".
@@ -33,21 +33,21 @@ end:
@echo
%.avr8:
- $(MAKE) -f makefile.avr8 clean
- $(MAKE) -f makefile.avr8 all MCU=$(@:%.avr8=%)
+ $(MAKE) -f makefile.avr8 clean -s
+ $(MAKE) -f makefile.avr8 all MCU=$(@:%.avr8=%) -s
%.xmega:
- $(MAKE) -f makefile.xmega clean
- $(MAKE) -f makefile.xmega all MCU=$(@:%.xmega=%)
+ $(MAKE) -f makefile.xmega clean -s
+ $(MAKE) -f makefile.xmega all MCU=$(@:%.xmega=%) -s
%.uc3:
- $(MAKE) -f makefile.uc3 clean
- $(MAKE) -f makefile.uc3 all MCU=$(@:%.uc3=%)
+ $(MAKE) -f makefile.uc3 clean -s
+ $(MAKE) -f makefile.uc3 all MCU=$(@:%.uc3=%) -s
clean:
- $(MAKE) -f makefile.avr8 clean
- $(MAKE) -f makefile.xmega clean
- $(MAKE) -f makefile.uc3 clean
+ $(MAKE) -f makefile.avr8 clean -s
+ $(MAKE) -f makefile.xmega clean -s
+ $(MAKE) -f makefile.uc3 clean -s
%:
\ No newline at end of file
diff --git a/BuildTests/SingleUSBModeTest/makefile b/BuildTests/SingleUSBModeTest/makefile
index c147d6236..701a4b930 100644
--- a/BuildTests/SingleUSBModeTest/makefile
+++ b/BuildTests/SingleUSBModeTest/makefile
@@ -12,30 +12,34 @@
# all module headers in a simple C and C++
# application.
-all:
+all: begin compile clean end
+
+begin:
@echo Executing build test "SingleUSBModeTest".
@echo
- $(MAKE) -f makefile.avr8 clean
- $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY'
- $(MAKE) -f makefile.avr8 clean
- $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY'
+end:
+ @echo Build test "SingleUSBModeTest" complete.
+ @echo
- $(MAKE) -f makefile.xmega clean
- $(MAKE) -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY'
+compile:
+ $(MAKE) -f makefile.avr8 clean -s
+ $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY' -s
+ $(MAKE) -f makefile.avr8 clean -s
+ $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY' -s
- $(MAKE) -f makefile.uc3 clean
- $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY'
- $(MAKE) -f makefile.uc3 clean
- $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY'
+ $(MAKE) -f makefile.xmega clean -s
+ $(MAKE) -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY' -s
- @echo Build test "SingleUSBModeTest" complete.
- @echo
+ $(MAKE) -f makefile.uc3 clean -s
+ $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY' -s
+ $(MAKE) -f makefile.uc3 clean -s
+ $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY' -s
clean:
- $(MAKE) -f makefile.avr8 clean
- $(MAKE) -f makefile.xmega clean
- $(MAKE) -f makefile.uc3 clean
+ $(MAKE) -f makefile.avr8 clean -s
+ $(MAKE) -f makefile.xmega clean -s
+ $(MAKE) -f makefile.uc3 clean -s
%:
\ No newline at end of file
diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile
index 44c7d5f82..8b15a7159 100644
--- a/BuildTests/StaticAnalysisTest/makefile
+++ b/BuildTests/StaticAnalysisTest/makefile
@@ -9,19 +9,36 @@
# Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool.
# Path to the root of the LUFA tree to scan
-LUFA_ROOT_PATH = ../../
+LUFA_ROOT_PATH = ../..
# Filenames or directories (including fragments) to exclude from the analysis
-EXCLUDE_LIST = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/
+EXCLUDE_LIST = FATFs/ \
+ PetiteFATFs/ \
+ uip/
# Output message template for found warnings and errors
-MESSAGE_TEMPLATE = "{file}({line}): {severity} ({id}): {message}"
+MESSAGE_TEMPLATE = "{file}:{line}: {severity} ({id}): {message}"
# Checks to suppress so that generated warnings are discarded
-SUPPRESS_WARNINGS = variableScope unusedFunction missingInclude
+SUPPRESS_WARNINGS = variableScope \
+ unusedFunction
-all:
- cppcheck -q --std=c99 --check-config $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
- cppcheck -q -f --std=c99 --error-exitcode=1 --inline-suppr --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
+# Extra paths to search for include files
+INCLUDE_PATHS = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/
+
+
+all: begin staticcheck end
+
+begin:
+ @echo Executing build test "StaticAnalysisTest".
+ @echo
+
+end:
+ @echo Build test "StaticAnalysisTest" complete.
+ @echo
+
+staticcheck:
+ cppcheck --quiet --inline-suppr --check-config $(SUPPRESS_WARNINGS:%=--suppress=%) --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
+ cppcheck --quiet --inline-suppr --error-exitcode=1 --std=c99 --force --enable=all --inconclusive $(SUPPRESS_WARNINGS:%=--suppress=%) --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
%: \ No newline at end of file