X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandsTest.java;h=2d54093bc133fb17b1927e170b587ba9aac22afe;hb=817c58fc18a954c8fdc69347e35dad742e25219f;hp=de6185c40b2e181dffd4616f4beebc3f68ae8c82;hpb=25e2a6f59681e1e7d9602a451fbcf3a2b414a49a;p=jalview.git diff --git a/test/jalview/bin/CommandsTest.java b/test/jalview/bin/CommandsTest.java index de6185c..2d54093 100644 --- a/test/jalview/bin/CommandsTest.java +++ b/test/jalview/bin/CommandsTest.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.bin; import java.io.File; @@ -49,7 +69,7 @@ public class CommandsTest } @AfterMethod(alwaysRun = true) - public void tearDown() + public void tearDown() { try { @@ -96,7 +116,8 @@ public class CommandsTest } */ - @Test(groups = {"Functional","testTask3"}, dataProvider = "cmdLines") + @Test(groups = { "Functional", "testTask3" }, dataProvider = "cmdLines", singleThreaded = true) + public void commandsOpenTest(String cmdLine, boolean cmdArgs, int numFrames, String[] sequences) { @@ -148,7 +169,7 @@ public class CommandsTest @Test( groups = { "Functional", "testTask3" }, - dataProvider = "structureImageOutputFiles") + dataProvider = "structureImageOutputFiles", singleThreaded = true) public void structureImageOutputTest(String cmdLine, String[] filenames) throws IOException { @@ -170,9 +191,13 @@ public class CommandsTest Assert.assertTrue(Files.size(file.toPath()) > 0, "File '" + filename + "' has no content from '" + cmdLine + "'"); // make sure the successive output files get bigger! - if (lastFile != null) - Assert.assertTrue(Files.size(file.toPath()) > Files - .size(lastFile.toPath())); + if (lastFile != null) { + Assert.assertTrue(Files.size(file.toPath()) > Files.size(lastFile.toPath())); + System.out.println("this file: " + file + " +" + Files.size(file.toPath()) + " greater than " + + Files.size(lastFile.toPath())); + } + // remember it for next file + lastFile = file; } } catch (Exception x) { @@ -185,7 +210,7 @@ public class CommandsTest } } - @Test(groups = "Functional", dataProvider = "argfileOutputFiles") + @Test(groups = "Functional", dataProvider = "argfileOutputFiles", singleThreaded = true) public void argFilesGlobAndSubstitutionsTest(String cmdLine, String[] filenames) throws IOException { @@ -207,9 +232,13 @@ public class CommandsTest Assert.assertTrue(Files.size(file.toPath()) > 0, "File '" + filename + "' has no content from '" + cmdLine + "'"); // make sure the successive output files get bigger! - if (lastFile != null) + if (lastFile != null) { Assert.assertTrue(Files.size(file.toPath()) > Files .size(lastFile.toPath())); + System.out.println("this file: "+file+" +"+Files.size(file.toPath()) + " greater than " +Files.size(lastFile.toPath())); + } + // remember it for next file + lastFile = file; } } catch (Exception x) { @@ -258,6 +287,19 @@ public class CommandsTest { testfiles + "/structureimage1.png", testfiles + "/structureimage2.png", testfiles + "/structureimage3.png" } }, + { "--gui --nonews --nosplash --open examples/1gaq.txt --append ./examples/3W5V.pdb "+"--structure examples/1gaq.txt --seqid \"1GAQ|A\" "+"--structureimage "+testfiles+"/1gaq.png --structure examples/3W5V.pdb "+"--seqid \"3W5V|A\" --structureimage "+testfiles+"/3w5v.png --overwrite", + + new String[] { + testfiles+"/1gaq.png",testfiles+"/3w5v.png" + } + }, + { "--headless --noquit --open ./examples/1gaq.txt --append ./examples/3W5V.pdb "+"--structure examples/1gaq.txt --seqid \"1GAQ|A\" "+"--structureimage "+testfiles+"/1gaq.png --structure examples/3W5V.pdb "+"--seqid \"3W5V|A\" --structureimage "+testfiles+"/3w5v.png --overwrite", + + new String[] { + testfiles+"/1gaq.png",testfiles+"/3w5v.png" + } + } + /* */ //