Skip to content

Commit

Permalink
Run AVR and ARM tests on travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Dec 16, 2019
1 parent 10da2bb commit a0844a2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ install:
script:
- coverage run --source=pbtools setup.py test
- make test-c
- make test-c-avr
- make test-c-arm
- make -C examples/c/hello_world
- make -C examples/c/address_book
- make -C examples/c/oneof
Expand Down
57 changes: 49 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
INC += pbtools/c_source/
SRC ?= \
pbtools/c_source/pbtools.c \
tests/files/c_source/int32.c \
tests/files/c_source/int64.c \
tests/files/c_source/sint32.c \
tests/files/c_source/sint64.c \
tests/files/c_source/uint32.c \
tests/files/c_source/uint64.c \
tests/files/c_source/fixed32.c \
tests/files/c_source/fixed64.c \
tests/files/c_source/sfixed32.c \
tests/files/c_source/sfixed64.c \
tests/files/c_source/float.c \
tests/files/c_source/double.c \
tests/files/c_source/bool.c \
tests/files/c_source/string.c \
tests/files/c_source/bytes.c \
tests/files/c_source/enum.c \
tests/files/c_source/address_book.c \
tests/files/c_source/tags.c \
tests/files/c_source/oneof.c \
tests/files/c_source/repeated.c \
tests/files/c_source/scalar_value_types.c \
tests/files/c_source/benchmark.c \
tests/files/c_source/message.c \
tests/files/c_source/no_package.c \
tests/files/c_source/ordering.c \
tests/files/c_source/importing.c \
tests/files/c_source/imported.c \
tests/files/c_source/imported1.c \
tests/files/c_source/imported2.c \
tests/files/c_source/imported3.c \
tests/files/c_source/imported_duplicated_package.c \
tests/files/c_source/no_package_importing.c \
tests/files/c_source/no_package_imported.c \
tests/files/c_source/enum_user.c \
tests/files/c_source/enum_provider.c \
tests/files/c_source/field_names.c
CFLAGS += $(INC:%=-I%)
CFLAGS += -O2
CFLAGS += -c
CFLAGS += -Wall
CFLAGS += -Wextra

test:
$(MAKE) test-python
$(MAKE) test-c
Expand All @@ -6,20 +51,16 @@ test-python:
python3 setup.py test

test-c:
make -C tests
$(MAKE) -C tests

test-c-avr:
avr-gcc -Wall -O2 -c pbtools/c_source/pbtools.c -o pbtools.avr.o
avr-size pbtools.avr.o
avr-objdump -d pbtools.avr.o
avr-gcc $(CFLAGS) $(SRC)

test-c-arm:
arm-none-eabi-gcc -Wall -O2 -c pbtools/c_source/pbtools.c -o pbtools.arm.o
arm-none-eabi-size pbtools.arm.o
arm-none-eabi-objdump -d pbtools.arm.o
arm-none-eabi-gcc $(CFLAGS) $(SRC)

test-c-fuzzer:
make -C tests fuzzer
$(MAKE) -C tests fuzzer

release-to-pypi:
python setup.py sdist
Expand Down

0 comments on commit a0844a2

Please sign in to comment.