- qmake -project "CONFIG+=qtestlib"
- echo "Creating make file for $component"
- qmake
- echo "Building tests for $component"
- make
- echo "Running tests for $component"
- ./$component -o testreport_$component.txt
- echo "Cleaning $component"
- make clean
- rm Makefile
- rm $component
+ CASES=(`ls`) #List all test cases uner component directory
+ for unittest in "${CASES[@]}"
+ do
+ cd $location/$component/$unittest
+ if [ $component = "testMap" ]; then
+ qmake
+ else
+ qmake -project "CONFIG+=qtestlib"
+ echo "Creating make file for $component/$unittest"
+ qmake
+ fi
+ echo "Building tests for $component/$unittest"
+ make
+ echo "Running tests for $component/$unittest"
+ ./$unittest -o testreport_$component.txt
+ echo "Cleaning $unittest"
+ make clean
+ rm Makefile
+ rm $unittest
+ done