title: gtest unit tests target configuration file path
body: <p>In my C++ application, I have a text file (dataFile.txt) that is installed on the Linux target machine in the following path:</p>
  
  <pre><code>/SoftwareHomeDir/Configuration/Application/dataFile.txt
  </code></pre>
  
  <p>This file exists on my Rational ClearCase source code environment under the path:</p>
  
  <pre><code>/ProjectName/config/Application/dataFile.txt
  </code></pre>
  
  <p>I am developping a unitTest in gtest that does following:</p>
  
  <p>Read a specific data from <code>dataFile.txt</code> , if the data does not exist than write it into the file.</p>
  
  <p>1) I am avoiding to create an environment variable to check whether I am in the compilation environment or the target machine. Then add additional test code in the final release. I really want to separate test code from final code.</p>
  
  <p>2) I am not using any IDE (no visual studio, no qt, etc.), just notepad++</p>
  
  <p>3) The compilatio. server is shared (access with a username, however the root folder "/" is shared. Which means that if I create the path <code>"/SoftwareHomeDir/Confiugration/Application/dataFile.txt"</code>, it will be visible by all users, and if another user is running his gtest unitTest, he may overwrite my file. </p>
  
  <p>4) In the final code, the path to the dataFile is hard coded, and it is very costly (will take few seconds to run) to implement a filesearch(filename) method to look for the file in the entire hard drive before reading the file.</p>
  
  <p>Question:</p>
  
  <p>I am looking for a solution to unit-test my code in the compilation environment that is using  <code>/ProjectName/config/Application/dataFile.txt</code></p>