Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
before_install:
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
- sudo apt install -y python3-pip build-essential cmake default-jdk maven
- git clone https://github.com/eclipse-cyclonedds/cyclonedds /tmp/cyclonedds
- cd /tmp/cyclonedds && mkdir build && cd build && cmake .. && make && sudo make install && cd $TRAVIS_BUILD_DIR
Expand All @@ -17,12 +16,10 @@ python:
install:
- travis_retry pip3 install tox
- pip install codecov jsonpickle idl_parser
script:
# - cd ../..
- ./configure
- python setup.py build
- python setup.py bdist_wheel
- pip install dist/python_cdds-0.1.0-py3-none-any.whl
- cp tests/example.idl /tmp/example.idl
- cp tests/helloworld.idl /tmp/helloworld.idl
script:
- tox
cache:
directories:
Expand Down
19 changes: 13 additions & 6 deletions configure
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# -*-Makefile-*-
#!/bin/bash

set -ev

if [ "$(uname)" == "Darwin" ]; then
BIT_LIB=libddstubs.dylib
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
BIT_LIB=libddstubs.so
STUB_LIB=libddstubs.dylib
BIT_LIB=libddsbit.dylib
HELLO_LIB=libddshelloworld.dylib
elif [ "$(uname -s)" == "Linux" ]; then
STUB_LIB=libddstubs.so
BIT_LIB=libddsbit.so
HELLO_LIB=libddshelloworld.so
fi

pushd &> /dev/null
cd bit
rm -Rf build
mkdir build
cd build
cmake ..
make
if [ "$(uname)" == "Darwin" ]; then
cp ${STUB_LIB} /usr/local/lib
cp ${BIT_LIB} /usr/local/lib
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
cp ${HELLO_LIB} /usr/local/lib
elif [ "$(uname -s)" == "Linux" ]; then
sudo cp ${STUB_LIB} /usr/local/lib
sudo cp ${BIT_LIB} /usr/local/lib
sudo cp ${HELLO_LIB} /usr/local/lib
fi

popd &> /dev/null
12 changes: 6 additions & 6 deletions tests/testQueryCondition.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_get_reader(self):

def test_read(self):
print("Begin test_read")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
for i in range(0, 5):
Expand Down Expand Up @@ -180,7 +180,7 @@ def test_read(self):

def test_read_n(self):
print("Begin test_read_n")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -251,7 +251,7 @@ def test_read_n(self):

def test_read_mask(self):
print("Begin test_read_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -356,7 +356,7 @@ def test_read_mask(self):

def test_read_instacne(self):
print("Begin test_read_instance")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -445,7 +445,7 @@ def test_read_instacne(self):

def test_take(self):
print("Begin test_take")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -533,7 +533,7 @@ def test_take(self):

def test_take_mask(self):
print("Begin test_take_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
print("Writer >> Begin writeing data")
Expand Down
12 changes: 6 additions & 6 deletions tests/testReadCondition.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_get_reader(self):

def test_read(self):
print("Begin test_read")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
for i in range(0, 5):
Expand Down Expand Up @@ -122,7 +122,7 @@ def test_read(self):

def test_read_n(self):
print("Begin test_read_n")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -163,7 +163,7 @@ def test_read_n(self):

def test_read_mask(self):
print("Begin test_read_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -275,7 +275,7 @@ def test_read_mask(self):

def test_read_instacne(self):
print("Begin test_read_instance")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -364,7 +364,7 @@ def test_read_instacne(self):

def test_take(self):
print("Begin test_read")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -456,7 +456,7 @@ def test_take(self):

def test_take_mask(self):
print("Begin test_take_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down
18 changes: 9 additions & 9 deletions tests/testReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_init_reader(self):

def test_read(self):
print("Begin test_read")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
newMsg = HelloWorldData_Msg(userID=1, message="Other message")
Expand Down Expand Up @@ -70,7 +70,7 @@ def test_read(self):

def test_read_n(self):
print("Begin test_read_n")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -111,7 +111,7 @@ def test_read_n(self):

def test_read_mask(self):
print("Begin test_read_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
print("Writer >> Begin writeing data")
Expand Down Expand Up @@ -214,7 +214,7 @@ def test_read_mask(self):

def test_read_wl(self):
print("Begin test_read_wl")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
for i in range(50, 55):
Expand Down Expand Up @@ -253,7 +253,7 @@ def test_read_wl(self):
# FIXME: Correct the implementation of this test
def test_read_instacne(self):
print("Begin test_read_instance")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
for i in range(60, 65):
Expand Down Expand Up @@ -324,7 +324,7 @@ def test_read_instacne(self):

def test_take(self):
print("Begin test_read")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -367,7 +367,7 @@ def test_take(self):

def test_take_mask(self):
print("Begin test_take_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down Expand Up @@ -491,7 +491,7 @@ def test_take_mask(self):

def test_take_next(self):
print("Begin test_read_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
print("Writer >> Begin writeing data")
Expand Down Expand Up @@ -567,7 +567,7 @@ def test_take_next(self):

def test_read_next(self):
print("Begin test_read_mask")
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
print("Writer >> Begin writeing data")
Expand Down
2 changes: 1 addition & 1 deletion tests/testWaitset.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_wait(self):

self.assertEqual(rc, 0, "The number of triggered entity is not correct")

idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)

Expand Down
6 changes: 3 additions & 3 deletions tests/testWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_hello_world_simple_value_type_support(self):
return self.helloworld_lib.HelloWorldData_Msg_desc

def test_write(self):
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'

className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_write(self):
raise Exception("Unexpected error:", sys.exc_info()[0])

def test_writedispose(self):
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'

className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_writedispose(self):
raise Exception("Unexpected error:", sys.exc_info()[0])

def test_dispose(self):
idl_path = '/home/firas/cyclone/cdds-python/lexer/example.idl'
idl_path = '/tmp/example.idl'
className = "HelloWorldData_Msg"
HelloWorldData_Msg = utils.create_class(className, idl_path)
for i in range(30, 40):
Expand Down