You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by ti...@apache.org on 2023/11/25 18:10:20 UTC

(db-jdo) branch jdo-834-move-log-files created (now c1f223c3)

This is an automated email from the ASF dual-hosted git repository.

tilmannz pushed a change to branch jdo-834-move-log-files
in repository https://gitbox.apache.org/repos/asf/db-jdo.git


      at c1f223c3 Move log files + cleanup

This branch includes the following new commits:

     new c1f223c3 Move log files + cleanup

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(db-jdo) 01/01: Move log files + cleanup

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tilmannz pushed a commit to branch jdo-834-move-log-files
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit c1f223c333a578bb0bf8db9c87bc38c04dcb6b29
Author: Tilmann <zo...@gmx.de>
AuthorDate: Sat Nov 25 19:10:13 2023 +0100

    Move log files + cleanup
---
 .../main/java/org/apache/jdo/exectck/RunTCK.java   | 23 +++++++++++-----------
 .../java/org/apache/jdo/tck/pc/mylib/Point.java    |  2 --
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java b/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
index 22f208d6..2ffeb132 100644
--- a/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
+++ b/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
@@ -265,7 +265,7 @@ public class RunTCK extends AbstractTCKMojo {
           if (resultValue != 0) {
             failureCount++;
           }
-          copyLogFiles(logFilePrefix);
+          moveLogFiles(logFilePrefix);
 
           if (runOnce) {
             alreadyRan = true;
@@ -531,6 +531,7 @@ public class RunTCK extends AbstractTCKMojo {
       command.add(debugDirectives);
     }
     command.add(testRunnerClass);
+    command.add("execute");
     command.add("--disable-banner");
     command.add("--disable-ansi-colors");
     command.add("--details=" + testRunnerDetails);
@@ -581,34 +582,32 @@ public class RunTCK extends AbstractTCKMojo {
   }
 
   /**
-   * Copies the implementation log file and TCK log file to the current log directory
+   * Moves the implementation log file and TCK log file to the current log directory
    *
    * @param logFilePrefix the prefix of the log file consisting of idtype and conf
    */
-  private void copyLogFiles(String logFilePrefix) {
+  private void moveLogFiles(String logFilePrefix) {
     // Move log to per-test location
     String testLogFilename = logFilePrefix + impl + ".txt";
     try {
       File logFile = new File(implLogFile);
-      FileUtils.copyFile(logFile, new File(testLogFilename));
-      resetFileContent(implLogFile);
+      FileUtils.moveFile(logFile, new File(testLogFilename));
     } catch (Exception e) {
-      System.out.println(">> Error copying implementation log file: " + e.getMessage());
+      System.out.println(">> Error moving implementation log file: " + e.getMessage());
     }
     String tckLogFilename = logFilePrefix + TCK_LOG_FILE;
     try {
       File logFile = new File(tckLogFile);
-      FileUtils.copyFile(logFile, new File(tckLogFilename));
-      resetFileContent(tckLogFile);
+      FileUtils.moveFile(logFile, new File(tckLogFilename));
     } catch (Exception e) {
-      System.out.println(">> Error copying tck log file: " + e.getMessage());
+      System.out.println(">> Error moving tck log file: " + e.getMessage());
     }
   }
 
   /**
-   * Finalizes the TCK run: delete log files create the result summray file TCK-results.txt create
-   * system configuration description file Copy metadata from enhanced to configuration logs
-   * directory This method is called once per TCK run.
+   * Finalizes the TCK run: delete log files, create the result summary file TCK-results.txt,
+   * create system configuration description file, copy metadata from enhanced to configuration logs
+   * directory. This method is called once per TCK run.
    *
    * @param logDir the path of the log directory
    * @param cpString classpath
diff --git a/tck/src/main/java/org/apache/jdo/tck/pc/mylib/Point.java b/tck/src/main/java/org/apache/jdo/tck/pc/mylib/Point.java
index bb618359..510b0320 100644
--- a/tck/src/main/java/org/apache/jdo/tck/pc/mylib/Point.java
+++ b/tck/src/main/java/org/apache/jdo/tck/pc/mylib/Point.java
@@ -49,12 +49,10 @@ public class Point {
   }
 
   public int getX() {
-    System.out.println("Hello from Point.getX");
     return x;
   }
 
   public Integer getY() {
-    System.out.println("Hello from Point.getY");
     return y;
   }