Skip to content

Commit

Permalink
add msgq tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Nov 19, 2019
1 parent bcad184 commit 83880d5
Show file tree
Hide file tree
Showing 6 changed files with 17,495 additions and 2 deletions.
12 changes: 12 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pool:
vmImage: 'ubuntu-16.04'

steps:
- script: |
cd messaging
ASAN=1 make test_runner
./test_runner -r junit -o tests.xml
displayName: 'Run Tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'messaging/tests.xml'
1 change: 1 addition & 0 deletions messaging/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
demo
bridge
test_runner
*.o
*.d
*.a
Expand Down
12 changes: 10 additions & 2 deletions messaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ CXXFLAGS += $(ZMQ_FLAGS) $(YAML_FLAGS)
OBJS := messaging.o impl_zmq.o impl_msgq.o msgq.o
DEPS=$(OBJS:.o=.d)

TEST_OBJS := test_runner.o msgq_tests.o msgq.o
TEST_DEPS=$(TEST_OBJS:.o=.d)

.PRECIOUS: $(OBJS)
.PHONY: all clean
.PHONY: all clean test
all: bridge messaging.a messaging_pyx.so messaging.so

test: test_runner
./test_runner

test_runner: $(TEST_OBJS)

demo: messaging.a demo.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -L. -l:messaging.a -o '$@'

Expand Down Expand Up @@ -72,6 +80,6 @@ messaging.so: $(OBJS)

clean:
@echo "[ CLEAN ]"
rm -rf *.so *.a bridge demo libs_a libs_so $(OBJS) $(DEPS)
rm -rf *.so *.a bridge demo libs_a libs_so test_runner $(OBJS) $(DEPS) $(TEST_OBJS) $(TEST_DEPS)

-include $(DEPS)
Loading

0 comments on commit 83880d5

Please sign in to comment.