mirror of
https://github.com/wentasah/ros2nix.git
synced 2025-06-09 15:52:23 +03:00
Add autoware test
This commit is contained in:
parent
68126a4b82
commit
9193811bfc
3 changed files with 36 additions and 18 deletions
18
test/common.bash
Normal file
18
test/common.bash
Normal file
|
@ -0,0 +1,18 @@
|
|||
bats_load_library bats-support
|
||||
bats_load_library bats-assert
|
||||
bats_load_library bats-file
|
||||
|
||||
setup_file() {
|
||||
# get the containing directory of this file
|
||||
# use $BATS_TEST_FILENAME instead of ${BASH_SOURCE[0]} or $0,
|
||||
# as those will point to the bats executable's location or the preprocessed file respectively
|
||||
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
|
||||
export DIR
|
||||
# make executables in this directory visible to PATH
|
||||
PATH="$DIR:$PATH"
|
||||
}
|
||||
|
||||
setup() {
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
cp -a "$DIR/ws" .
|
||||
}
|
17
test/long_tests.bats
Normal file
17
test/long_tests.bats
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- bats-mode -*-
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
|
||||
bats_require_minimum_version 1.5.0
|
||||
load common.bash
|
||||
|
||||
@test "autoware" {
|
||||
rm -rf ws # we don't use out simple workspace
|
||||
git clone https://github.com/autowarefoundation/autoware.git
|
||||
cd autoware
|
||||
mkdir src
|
||||
vcs import src < autoware.repos
|
||||
cd ..
|
||||
|
||||
ros2nix --output-as-nix-pkg-name --fetch $(find -name package.xml|grep -v ament_cmake)
|
||||
}
|
|
@ -3,24 +3,7 @@
|
|||
# shellcheck disable=SC2046
|
||||
|
||||
bats_require_minimum_version 1.5.0
|
||||
bats_load_library bats-support
|
||||
bats_load_library bats-assert
|
||||
bats_load_library bats-file
|
||||
|
||||
setup_file() {
|
||||
# get the containing directory of this file
|
||||
# use $BATS_TEST_FILENAME instead of ${BASH_SOURCE[0]} or $0,
|
||||
# as those will point to the bats executable's location or the preprocessed file respectively
|
||||
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
|
||||
export DIR
|
||||
# make executables in this directory visible to PATH
|
||||
PATH="$DIR:$PATH"
|
||||
}
|
||||
|
||||
setup() {
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
cp -a "$DIR/ws" .
|
||||
}
|
||||
load common.bash
|
||||
|
||||
@test "ros2nix --help" {
|
||||
ros2nix --help
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue