Skip to content

Commit

Permalink
Try to fix broken Travis tests - from mod-livestatus
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed Dec 3, 2019
1 parent 7f3b10d commit 30211ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ install:
script:
- cur_dir=$PWD
- export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken # we need shinken..
- export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test
- export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test/modules
# - export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test
# - export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test/modules
- export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test/modules/livestatus # we also need mock_livestatus from mod-livestatus..
- export PYTHONPATH=$PYTHONPATH:$PWD/test/tmp/shinken/test/modules/livestatus/test # we also need mock_livestatus from mod-livestatus..
- echo $PYTHONPATH
- cd test/tmp/shinken/test
- nosetests -vx --process-restartworker --processes=1 --process-timeout=1800 "$cur_dir/test"
Expand Down
17 changes: 4 additions & 13 deletions test/setup_module_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,24 @@ setup_submodule (){
( cd $mpath && git status && git log -1)
rmname=$(get_name "$mpath/")
ln -s "$PWD/$mpath/module" "$PWD/$SHI_DST/test/modules/$rmname"

if [ -f "$PWD/$mpath/test/mock_livestatus.py" ]
then
ln -s "$PWD/$mpath/test/mock_livestatus.py" "$PWD/$SHI_DST/test/modules/$rmname/mock_livestatus.py"
fi

if [ -f "$PWD/$mpath/test/etc" ]
then
cp -r "$PWD/$mpath/test/etc" "$PWD/$SHI_DST/test/etc"
fi

if [ -f "$mpath/requirements.txt" ]
then
pip install -r "$mpath/requirements.txt"
fi

ls -alH "$PWD/$SHI_DST/test/modules/$rmname"
done
# we need the livestatus test config files to be in shinken test config dir:
# cp -r ~/mod-livestatus/test/etc/* "$SHI_DST/test/etc/"
}

name=$(get_name)
Expand Down Expand Up @@ -68,15 +70,6 @@ then
setup_submodule
fi

#if [ -f requirements.txt ]
#then
# pip install -r requirements.txt
#fi
#if [ -f "$spec_requirement" ]
#then
# pip install --use-mirrors -r "$spec_requirement"
#fi
#
test_requirement="test/requirements.txt"
if [ -f "$test_requirement" ]
then
Expand All @@ -88,6 +81,4 @@ then
pip install -r "$test_requirement"
fi

#cp -r test/etc "$SHI_DST/test/"

ln -s "$PWD/module" "$SHI_DST/test/modules/$name"

0 comments on commit 30211ee

Please sign in to comment.