Skip to content

Commit

Permalink
Added more citest.
Browse files Browse the repository at this point in the history
  • Loading branch information
lianglia-apollo authored and ycool committed Aug 24, 2018
1 parent 0f2619c commit 4187688
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ services:
dist: trusty
os: linux
env:
- JOB=lint
- JOB=cibuild
- JOB=citest
- JOB=citest_basic
- JOB=citest_map
- JOB=citest_dreamview
- JOB=citest_perception
- JOB=lint
cache:
directories:
- $HOME/.cache/bazel
Expand Down
62 changes: 59 additions & 3 deletions apollo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,37 @@ function citest_perception() {
fi
}

function citest() {
function citest_dreamview() {
generate_build_targets

# common related test
echo "$BUILD_TARGETS" | grep "dreamview\/" | xargs bazel test $DEFINES --config=unit_test -c dbg --test_verbose_timeout_warnings $@

if [ $? -eq 0 ]; then
success 'Test passed!'
return 0
else
fail 'Test failed!'
return 1
fi
}

function citest_map() {
generate_build_targets

# common related test
echo "$BUILD_TARGETS" | grep "map\/" | xargs bazel test $DEFINES --config=unit_test -c dbg --test_verbose_timeout_warnings $@

if [ $? -eq 0 ]; then
success 'Test passed!'
return 0
else
fail 'Test failed!'
return 1
fi
}

function citest_basic() {
generate_build_targets

# common related test
Expand All @@ -434,6 +464,20 @@ function citest() {
fi
}

function citest() {
citest_basic
citest_perception
citest_map
citest_dreamview
if [ $? -eq 0 ]; then
success 'Test passed!'
return 0
else
fail 'Test failed!'
return 1
fi
}

function run_cpp_lint() {
generate_build_targets
echo "$BUILD_TARGETS" | xargs bazel test --config=cpplint -c dbg
Expand Down Expand Up @@ -779,13 +823,25 @@ function main() {
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
run_test $@
;;
citest)
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
citest $@
;;
citest_map)
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
citest_map $@
;;
citest_dreamview)
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
citest_dreamview $@
;;
citest_perception)
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
citest_perception $@
;;
citest)
citest_basic)
DEFINES="${DEFINES} --cxxopt=-DCPU_ONLY"
citest $@
citest_basic $@
;;
test_gpu)
DEFINES="${DEFINES} --cxxopt=-DUSE_GPU"
Expand Down

0 comments on commit 4187688

Please sign in to comment.