Last active
March 22, 2016 02:25
-
-
Save trevren11/7ef88164f5761241e89e to your computer and use it in GitHub Desktop.
Example of compiling c++ lab 236 BYU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#compile and run tests and check with valgrind afterwards | |
RED='\033[0;31m' | |
Blue='\033[0;36m' | |
NC='\033[0m' # No Color | |
#Black 0;30 Dark Gray 1;30 | |
#Red 0;31 Light Red 1;31 | |
#Green 0;32 Light Green 1;32 | |
#Brown/Orange 0;33 Yellow 1;33 | |
#Blue 0;34 Light Blue 1;34 | |
#Purple 0;35 Light Purple 1;35 | |
#Cyan 0;36 Light Cyan 1;36 | |
#Light Gray 0;37 White 1;37 | |
printf "${Blue}Compiling lab...\n${NC}" | |
g++ -std=c++11 -g *.cpp -o lab4 | |
#echo "Checking for differences" | |
printf "${Blue}Running Tests\n${NC}" | |
#./lab4 tests/test tests/xtest.txt; | |
#echo "Checking in40" | |
./lab4 tests/in40.txt tests/x40.txt; | |
#diff tests/out40.txt tests/x40.txt; | |
#./lab4 tests/in43.txt tests/x43.txt; | |
#diff tests/out43.txt tests/x43.txt; | |
#./lab4 tests/in45.txt tests/x45.txt; | |
#diff tests/out45.txt tests/x45.txt; | |
#./lab4 tests/in46.txt tests/x46.txt; | |
#diff tests/out46.txt tests/x46.txt; | |
#./lab4 tests/in49.txt tests/x49.txt; | |
#diff tests/out49.txt tests/x49.txt; | |
#./lab4 tests/in61.txt tests/x61.txt; | |
#diff tests/out61.txt tests/x61.txt; | |
#./lab4 tests/in62.txt tests/x62.txt; | |
#diff tests/out62.txt tests/x62.txt; | |
#echo "All tests run, running Valgrind" | |
printf "${Blue}Running Valgrind\n${NC}" | |
#valgrind --leak-check=full ./lab4 tests/in40.txt tests/xout40.txt; | |
#valgrind --leak-check=full ./lab4 tests/in43.txt tests/xout43.txt; | |
#valgrind --leak-check=full ./lab4 tests/in45.txt tests/xout45.txt; | |
#valgrind --leak-check=full ./lab4 tests/in49.txt tests/xout49.txt; | |
#valgrind --leak-check=full ./lab4 tests/in46.txt tests/xout46.txt; | |
#valgrind --leak-check=full ./lab4 tests/in61.txt tests/xout61.txt; | |
#valgrind --leak-check=full ./lab4 tests/in62.txt tests/xout62.txt; | |
#echo "Checking Complexity"; | |
#printf "${Blue}Checking Complexity\n${NC}" | |
#pmccabe *.h *.cpp; | |
#echo "FINDING Complexity"; | |
#pmccabe *.h *.cpp | sed -e 's/^\(.\{12\}\).*/\1/' | |
#zip lab4.zip *.h *.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment