diff --git a/cmake_targets/autotests/run_compilation_autotests.bash b/cmake_targets/autotests/run_compilation_autotests.bash
index 1fb28cd82540455b43e2fceac18fbc3bac9b477f..f27d1dcca8e74938eb56b791be31ba193305fbf8 100755
--- a/cmake_targets/autotests/run_compilation_autotests.bash
+++ b/cmake_targets/autotests/run_compilation_autotests.bash
@@ -7,6 +7,8 @@ else
    exit 1
 fi
 
+tdir=$OPENAIR_DIR/cmake_targets/autotests
+
 results_file=$tdir/log/compilation_autotests.xml
 
 # include the jUnit-like logging functions
@@ -39,7 +41,6 @@ test_compile() {
     fi
 }
 
-tdir=$OPENAIR_DIR/cmake_targets/autotests
 mkdir -p $tdir/bin $tdir/log
 
 updated=$(svn st -q $OPENAIR_DIR)