From fc9898f94c0e058919773bdfd8c29ba4ed779c07 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 26 Nov 2007 08:00:10 +0000 Subject: [PATCH] ignores migration folder SVN: 2794 --- .../ch/systemsx/cisd/common/db/SqlUnitTestRunner.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/source/java/ch/systemsx/cisd/common/db/SqlUnitTestRunner.java b/common/source/java/ch/systemsx/cisd/common/db/SqlUnitTestRunner.java index f92743817eb..084dff7c5e2 100644 --- a/common/source/java/ch/systemsx/cisd/common/db/SqlUnitTestRunner.java +++ b/common/source/java/ch/systemsx/cisd/common/db/SqlUnitTestRunner.java @@ -45,6 +45,7 @@ import ch.systemsx.cisd.common.utilities.OSUtilities; * ... * ... * </pre> + * Folder starting with '.' or <code>migration</code> are ignored. * The test cases are executed in lexicographical order of their name. For each test case <code>buildup.sql</code> * will be executed first. The test scripts follow the naming schema * <pre> @@ -63,6 +64,9 @@ import ch.systemsx.cisd.common.utilities.OSUtilities; */ public class SqlUnitTestRunner { + /** Name of ignored migration folder. */ + public static final String MIGRATION_FOLDER = "migration"; + private static final class TestResult { private final boolean ok; @@ -135,7 +139,9 @@ public class SqlUnitTestRunner { public boolean accept(File pathname) { - return pathname.isDirectory() && pathname.getName().startsWith(".") == false; + String name = pathname.getName(); + return pathname.isDirectory() && name.startsWith(".") == false + && name.startsWith(MIGRATION_FOLDER) == false; } }); Arrays.sort(testCases); -- GitLab