From 38bbc879a5e35a92a092ba20a992b626b88fd105 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 10 Oct 2017 22:13:39 -0700 Subject: [PATCH] fix travis failure for ccache command not found Summary: Travis don't have ccache installed on Mac. Only run the ccache command when it exists. https://docs.travis-ci.com/user/caching/#ccache-cache Closes https://github.com/facebook/rocksdb/pull/2990 Differential Revision: D6028837 Pulled By: yiwu-arbug fbshipit-source-id: 1e2d1c7f37be2c73773258c1fd5f24eebe7a06c6 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41e0ef2fc..73d18dab9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,8 @@ before_script: script: - ${CXX} --version - - if [ "${TEST_GROUP}" == 'platform_dependent' ]; then ccache -C && OPT=-DTRAVIS V=1 ROCKSDBTESTS_END=db_block_cache_test make -j4 all_but_some_tests check_some; fi + - if [ `command -v ccache` ]; then ccache -C; fi + - if [ "${TEST_GROUP}" == 'platform_dependent' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_END=db_block_cache_test make -j4 all_but_some_tests check_some; fi - if [ "${TEST_GROUP}" == '1' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=comparator_db_test make -j4 check_some; fi - if [ "${TEST_GROUP}" == '2' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=comparator_db_test ROCKSDBTESTS_END=write_prepared_transaction_test make -j4 check_some; fi - if [ "${TEST_GROUP}" == '3' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=write_prepared_transaction_test make -j4 check_some; fi