Skip to content

Commit

Permalink
Cleanup cache before run pytest in run_tests.sh (#3132)
Browse files Browse the repository at this point in the history
Only really less frequently changed content is cached. Although It is rare that cached content is inaccurate, it still could happen. Then it would be difficult to debug.

This change added code in run_tests.sh to cleanup cache before running pytest. Without cached
content, executing the first script may need extra time to gather facts again, but executing
subsequent scripts still can benefit from content cached while executing the first script.

Signed-off-by: Xin Wang <[email protected]>
  • Loading branch information
wangxin authored Mar 15, 2021
1 parent cd06b42 commit b0bebd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ function setup_environment()
export ANSIBLE_CONFIG=${BASE_PATH}/ansible
export ANSIBLE_LIBRARY=${BASE_PATH}/ansible/library/
export ANSIBLE_CONNECTION_PLUGINS=${BASE_PATH}/ansible/plugins/connection

rm -fr ${BASE_PATH}/tests/_cache
}

function setup_test_options()
Expand Down

0 comments on commit b0bebd5

Please sign in to comment.