Skip to content

Commit

Permalink
fix test script
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dahl committed Jun 11, 2023
1 parent e25ae57 commit f569c61
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
7 changes: 3 additions & 4 deletions tests/Dockerfile_foxy
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ RUN apt-get install -y \
libclang-dev

# Get ros test messages
RUN apt-get install -y ros-foxy-test-msgs
RUN apt-get install -y ros-foxy-test-msgs ros-foxy-example-interfaces

# Get Rust
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

COPY . /r2r
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN chmod +x /r2r/tests/test.sh
ENTRYPOINT [ "/r2r/tests/test.sh" ]
RUN chmod +x /r2r/tests/test.bash
ENTRYPOINT [ "/r2r/tests/test.bash" ]
7 changes: 3 additions & 4 deletions tests/Dockerfile_galactic
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ RUN apt-get install -y \
libclang-dev

# Get ros test messages
RUN apt-get install -y ros-galactic-test-msgs
RUN apt-get install -y ros-galactic-test-msgs ros-galactic-example-interfaces

# Get Rust
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

COPY . /r2r
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN chmod +x /r2r/tests/test.sh
ENTRYPOINT [ "/r2r/tests/test.sh" ]
RUN chmod +x /r2r/tests/test.bash
ENTRYPOINT [ "/r2r/tests/test.bash" ]
7 changes: 3 additions & 4 deletions tests/Dockerfile_humble
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ RUN apt-get install -y \
libclang-dev

# Get ros test messages
RUN apt-get install -y ros-humble-test-msgs
RUN apt-get install -y ros-humble-test-msgs ros-humble-example-interfaces

# Get Rust
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

COPY . /r2r
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN chmod +x /r2r/tests/test.sh
ENTRYPOINT [ "/r2r/tests/test.sh" ]
RUN chmod +x /r2r/tests/test.bash
ENTRYPOINT [ "/r2r/tests/test.bash" ]
17 changes: 17 additions & 0 deletions tests/test.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# run rustup to test with latest rust version
/root/.cargo/bin/rustup update

if [ -e "/opt/ros/humble/setup.bash" ]; then
source "/opt/ros/humble/setup.bash"
fi
if [ -e "/opt/ros/galactic/setup.bash" ]; then
source "/opt/ros/galactic/setup.bash"
fi
if [ -e "/opt/ros/foxy/setup.bash" ]; then
source "/opt/ros/foxy/setup.bash"
fi

cd /r2r/
/root/.cargo/bin/cargo test
7 changes: 0 additions & 7 deletions tests/test.sh

This file was deleted.

0 comments on commit f569c61

Please sign in to comment.