]> source.dussan.org Git - jgit.git/commit
Fix hardcoded use of target/trash in LocalDiskRepositoryTestCase 68/12668/3
authorShawn Pearce <spearce@spearce.org>
Thu, 9 May 2013 00:34:47 +0000 (17:34 -0700)
committerShawn Pearce <spearce@spearce.org>
Thu, 9 May 2013 00:59:34 +0000 (17:59 -0700)
commit36144e12d80c97c64840e0d744c7f64f7ca624c1
treedd5eb71871d84fc16d56961d1af3bb96c73696ad
parente27993f1f881a0a4aad66679dc10fe0d749f6c83
Fix hardcoded use of target/trash in LocalDiskRepositoryTestCase

`pwd`/target is only valid in Maven Reactor builds where Maven
has moved into the project directory and created a target for
the build output. Most other build systems do not use "target"
and may not even perform a directory change between test suites.

Rewrite LocalDiskRepositoryTestCase's temporary directory code
to use the system specified location and create new unique names.
This prevents fixes between concurrently running tests and allows
the caller to specify the root using java.io.tmpdir.

Update the surefire command lines to use target within each project as
the system temporary directory during unit testing, preventing JGit's
own test suite from writing to /tmp or somewhere like C:\tmp.

Change-Id: I9e8431f6ddfc16fee89f677bcce67c99cfb56782
org.eclipse.jgit.ant.test/pom.xml
org.eclipse.jgit.java7.test/pom.xml
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
org.eclipse.jgit.test/pom.xml
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RepositorySetupWorkDirTest.java