Skip to content

Instantly share code, notes, and snippets.

@ruslo
Created January 11, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruslo/f5c6880462230c8d4dd6 to your computer and use it in GitHub Desktop.
Save ruslo/f5c6880462230c8d4dd6 to your computer and use it in GitHub Desktop.
Testing script for issue: https://github.com/ruslo/hunter/pull/295
#!/bin/bash -e
rm -rf Boo Bar
git clone https://github.com/forexample/temp-boo Boo
git clone https://github.com/forexample/temp-bar Bar
export HUNTER_ROOT="`pwd`/_HUNTER"
### Boo build with clean Hunter
rm -rf "${HUNTER_ROOT}"
echo "========== Generate Boo"
rm -rf _builds
cmake -HBoo -B_builds &> /dev/null
echo "========== Build Boo"
cmake --build _builds &> /dev/null
echo "========== Test clean Boo"
(cd _builds && ctest -VV)
### Bar build with clean Hunter
rm -rf "${HUNTER_ROOT}"
echo "========== Generate Bar"
rm -rf _builds
cmake -HBar -B_builds &> /dev/null
echo "========== Build Bar"
cmake --build _builds &> /dev/null
echo "========== Test clean Bar"
(cd _builds && ctest -VV)
### Let's test "dirty" Boo, i.e. when Bar's version of Foo already installed
### in Hunter
echo "========== Generate Boo"
rm -rf _builds
cmake -HBoo -B_builds &> /dev/null
echo "========== Build Boo"
cmake --build _builds &> /dev/null
echo "========== Test dirty Boo"
(cd _builds && ctest -VV)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment