@Override
    public QTestProcessExecResult checkCliDriverResults() throws Exception {
      String tname = getInputFile().getName();
      File logFile = new File(logDir, tname + ".out");

      int failedCount = 0;
      StringBuilder fileNames = new StringBuilder("Files failing the location check:");
      FileReader fr = new FileReader(logFile);
      BufferedReader in = new BufferedReader(fr);
      try {
        String line;
        int locationCount = 0;
        Pattern p = Pattern.compile("location:([^,)]+)");
        while((line = in.readLine()) != null) {
          Matcher m = p.matcher(line);
          if (m.find()) {
            File f = new File(m.group(1));
            if (!f.getName().equals(locationSubdir)) {
              failedCount++;
              fileNames.append(f.getName()).append("\r\n");
            }
            locationCount++;
          }
        }
        // we always have to find at least one location, otw the test is useless
        if (locationCount == 0) {
          return QTestProcessExecResult.create(Integer.MAX_VALUE, "0 locations tested");
        }
      } finally {
        in.close();
      }

      return QTestProcessExecResult.create(failedCount, fileNames.toString());
    }
Validate only that the location is correct.
@return non-zero if it failed
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestLocationQueries.java