#55 Makes ant test work

closed-accepted
nobody
None
5
2012-08-18
2012-08-16
Hakon
No

The data files were not being included when ant test runs the jUnit tests. With this patch, all tests passes with ant test.

I have also replaced all tabs with 4 spaces - review diff with e.g. 'svn diff -x -w'.

Discussion

  • Hakon

    Hakon - 2012-08-16

    svn diff output

     
  • Chris Duncan

    Chris Duncan - 2012-08-16

    Several tests still don't work when run by ant test....

     
  • Hakon

    Hakon - 2012-08-16

    Could it be you're running ant test in the workspace you also have Eclipse on? There's some strange interaction between Eclipse and ant that I haven't figured out yet. Try out in a clean client.

     
  • Chris Duncan

    Chris Duncan - 2012-08-16

    C:\Users\veqryn\workspace\triplea>ant test
    Buildfile: C:\Users\veqryn\workspace\triplea\build.xml

    test:
    [mkdir] Created dir: C:\Users\veqryn\workspace\triplea\test-results
    [mkdir] Created dir: C:\Users\veqryn\workspace\triplea\testclasses
    [javac] Compiling 81 source files to C:\Users\veqryn\workspace\triplea\testclasses
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\GameDataTestUtil.java:157: warning: [deprecation] getData() in game
    s.strategy.engine.data.PlayerID has been deprecated
    [javac] new ChangePerformer(t.getData()).perform(ChangeFactory.addUnits(t, units));
    [javac] ^
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\GameDataTestUtil.java:195: warning: [deprecation] getData() in game
    s.strategy.engine.data.PlayerID has been deprecated
    [javac] return new TestDelegateBridge(player.getData(), player, new DummyDisplay());
    [javac] ^
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\DelegateTest.java:120: warning: [deprecation] TechAttachment() in g
    ames.strategy.triplea.attatchments.TechAttachment has been deprecated
    [javac] british.addAttachment(Constants.TECH_ATTACHMENT_NAME, new TechAttachment());
    [javac] ^
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\DelegateTest.java:122: warning: [deprecation] TechAttachment() in g
    ames.strategy.triplea.attatchments.TechAttachment has been deprecated
    [javac] japanese.addAttachment(Constants.TECH_ATTACHMENT_NAME, new TechAttachment());
    [javac] ^
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\DelegateTest.java:124: warning: [deprecation] TechAttachment() in g
    ames.strategy.triplea.attatchments.TechAttachment has been deprecated
    [javac] russians.addAttachment(Constants.TECH_ATTACHMENT_NAME, new TechAttachment());
    [javac] ^
    [javac] C:\Users\veqryn\workspace\triplea\test\games\strategy\triplea\delegate\DelegateTest.java:126: warning: [deprecation] TechAttachment() in g
    ames.strategy.triplea.attatchments.TechAttachment has been deprecated
    [javac] germans.addAttachment(Constants.TECH_ATTACHMENT_NAME, new TechAttachment());
    [javac] ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 6 warnings
    [copy] Copying 14 files to C:\Users\veqryn\workspace\triplea\testclasses
    [junit] Test games.strategy.StrategyGameTest FAILED
    [junit] Test games.strategy.engine.data.AllianceTrackerTest FAILED
    [junit] Test games.strategy.engine.data.ChangeTest FAILED
    [junit] Test games.strategy.engine.data.SerializationTest FAILED
    [junit] Test games.strategy.engine.framework.GameDataManagerTest FAILED
    [junit] Test games.strategy.engine.framework.ui.NewGameChooserModelTest FAILED
    [junit] Test games.strategy.engine.xml.ParserTest FAILED
    [junit] Test games.strategy.kingstable.KingsTableTest FAILED
    [junit] Test games.strategy.kingstable.delegate.DelegateTest FAILED
    [junit] Test games.strategy.kingstable.delegate.PlayDelegateTest FAILED
    [junit] Test games.strategy.triplea.TripleATest FAILED
    [junit] Test games.strategy.triplea.baseAI.AIUtilsTest FAILED
    [junit] Test games.strategy.triplea.delegate.AirThatCantLandUtilTest FAILED
    [junit] Test games.strategy.triplea.delegate.BattleCalculatorTest FAILED
    [junit] Test games.strategy.triplea.delegate.BigWorldTest FAILED
    [junit] Test games.strategy.triplea.delegate.DelegateTest FAILED
    [junit] Test games.strategy.triplea.delegate.DiceRollTest FAILED
    [junit] Test games.strategy.triplea.delegate.LHTRTest FAILED
    [junit] Test games.strategy.triplea.delegate.MoveDelegateTest FAILED
    [junit] Test games.strategy.triplea.delegate.MoveValidatorTest FAILED
    [junit] Test games.strategy.triplea.delegate.PacificTest FAILED
    [junit] Test games.strategy.triplea.delegate.Pacific_1940_Test FAILED
    [junit] Test games.strategy.triplea.delegate.Pact_of_Steel_2_Test FAILED
    [junit] Test games.strategy.triplea.delegate.PlaceDelegateTest FAILED
    [junit] Test games.strategy.triplea.delegate.RevisedTest FAILED
    [junit] Test games.strategy.triplea.delegate.UnitsThatCantFightUtilTest FAILED
    [junit] Test games.strategy.triplea.delegate.VictoryTest FAILED
    [junit] Test games.strategy.triplea.delegate.WW2V3_41_Test FAILED
    [junit] Test games.strategy.triplea.delegate.WW2V3_42_Test FAILED
    [junit] Test games.strategy.triplea.oddsCalculator.ta.OddsCalculatorTest FAILED
    [junit] Test games.strategy.triplea.util.UnitAutoChooserTest FAILED

    BUILD SUCCESSFUL
    Total time: 1 minute 37 seconds

     
  • Hakon

    Hakon - 2012-08-16

    svn diff output, second try at a patch that fixes ant test

     
  • Hakon

    Hakon - 2012-08-16

    Sorry for the confusion, I was able to reproduce the problem by checking out to a clean client. build.patch-2 should fix it. This patch:
    1. Makes ant test depend on compiling the project. Otherwise ant test in a clean client fails immediately.
    2. Makes ant clean delete more directories, in particular the junit output directory.
    3. Removes the <path .../> element (that apparently was checked in), and instead copies the data files into testclasses.
    4. Replaces tabs with 4 spaces.

     
  • Chris Duncan

    Chris Duncan - 2012-08-16

    alright, almost there, only StrategyGameTest is failing now.

     
  • Hakon

    Hakon - 2012-08-16

    It works for me now. Checked out a client, ant test. All succeed. What error do you get?

     
  • Hakon

    Hakon - 2012-08-18

    The changes have been checked in.

     
  • Hakon

    Hakon - 2012-08-18
    • status: open --> closed-accepted
     

Log in to post a comment.