Test script removes unit test binaries after testing
authorSami Rämö <sami.ramo@ixonos.com>
Wed, 26 May 2010 14:20:23 +0000 (17:20 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Wed, 26 May 2010 14:20:23 +0000 (17:20 +0300)
 - Binaries are removed so they are not annoying in the list
   of untracked files if commit is made without compiling
   tests after running the script.

scripts/run_unit_tests.sh

index 7af810e..0b5de38 100755 (executable)
@@ -114,6 +114,15 @@ if [[ -d $REPORT_PATH && -d $UNIT_TESTS_ROOT_DIR ]]; then
     # remove temporary files
     rm $REPORT_PATH_ABSOLUTE/temp_*.txt
 
+    # remove all unit test binaries so they doesn't accidentally get into repository
+    for BINARY in "${UNIT_TEST_PROJECTS[@]}"
+    do
+        # remove only if file really exists
+        if [ -a $BINARY ]; then
+            rm $BINARY
+        fi
+    done
+
     # tell that script reached the end
     echo "" >> $REPORT
     echo "All done!" >> $REPORT