Commit aa62ad68 authored by stancakapost's avatar stancakapost
Browse files

fixed ATS delivery:

 - don't generate another folder for each test since already one ttcn3 file per folder
 - added XSD/XML files to the delivery
parent f348a8e4
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -25,29 +25,29 @@ public class DeliverableGenerator {
	      generateDeliverableDirectory(new File(sf, children[i]), newDir);
	    }
	  } else {
			if (sf.toString().endsWith(".ttcn")) {
				File newDir = new File(tf.getAbsolutePath() + "/" + sf.getName().replaceAll(".ttcn", ""));
				newDir.mkdir();
				
	    try {
	      if (sf.toString().toLowerCase().endsWith(".ttcn")) {
	        int moduleCount = FileUtils.countT3Modules(sf);					
	        if (moduleCount <= 1) {
						File targetFile = new File(newDir + "/" + sf.getName());
	          File targetFile = new File(tf + "/" + sf.getName());
	          FileUtils.copyFile(sf, targetFile);
	        } else {
						File targetFile = new File(newDir + "/temp.ttcn");
	          File targetFile = new File(tf + "/temp.ttcn");
	          FileUtils.copyFile(sf, targetFile);
	          FileUtils.splitT3ModuleFiles(targetFile);
	          targetFile.delete();
	        }

					
				} catch (IOException e) {
					e.printStackTrace();
				}
	        // FileUtils.countT3Modules(f)
	        // copyFile();
	        // System.out.println(sf.toString());
	      } else if (sf.toString().toLowerCase().matches(".+\\.(xsd|xml)$")) {
	        File targetFile = new File(tf + "/" + sf.getName());
	        FileUtils.copyFile(sf, targetFile);
	      }

	    } catch (IOException e) {
	      e.printStackTrace();
	    }
	  }
	}
@@ -55,7 +55,7 @@ public class DeliverableGenerator {
	// -----------------------------------------------------------------------------------------------

	public void run() {
		System.out.println("STF475 Tools: ATS Deliverable Generator v0.1");
		System.out.println("STF475 Tools: ATS Deliverable Generator v0.5");
		try {
			FileUtils.loadConfig(config);
			FileUtils.loadReferences(references);