Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion LibGit2Sharp.Tests/BranchFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ public void CanCreateBranch(string name)
Assert.Equal("refs/heads/" + name, newBranch.CanonicalName);
Assert.NotNull(newBranch.Tip);
Assert.Equal(committish, newBranch.Tip.Sha);
Assert.NotNull(repo.Branches.SingleOrDefault(p => p.Name == name));

// Note the call to String.Normalize(). This is because, on Mac OS X, the filesystem
// decomposes the UTF-8 characters on write, which results in a different set of bytes
// when they're read back:
// - from InlineData: C5-00-6E-00-67-00-73-00-74-00-72-00-F6-00-6D-00
// - from filesystem: 41-00-0A-03-6E-00-67-00-73-00-74-00-72-00-6F-00-08-03-6D-00
Assert.NotNull(repo.Branches.SingleOrDefault(p => p.Name.Normalize() == name));

AssertRefLogEntry(repo, newBranch.CanonicalName,
newBranch.Tip.Id,
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/ConflictFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static IEnumerable<object[]> ConflictData
{
get
{
return new[]
return new List<object[]>
{
new[] { "ancestor-and-ours.txt", "5dee68477001f447f50fa7ee7e6a818370b5c2fb", "dad0664ae617d36e464ec08ed969ff496432b075", null },
new[] { "ancestor-and-theirs.txt", "3aafd4d0bac33cc3c78c4c070f3966fb6e6f641a", null, "7b26cd5ac0ee68483ae4d5e1e00b064547ea8c9b" },
Expand Down
5 changes: 5 additions & 0 deletions LibGit2Sharp.Tests/ShadowCopyFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public void CanProbeForNativeBinariesFromAShadowCopiedAssembly()

// ...but are currently loaded from different locations...
string cachedAssemblyLocation = wrapper.AssemblyLocation;
if (cachedAssemblyLocation.StartsWith("/private"))
{
// On OS X, sometimes you get /private/var/… instead of /var/…, but they map to the same place.
cachedAssemblyLocation = cachedAssemblyLocation.Substring("/private".Length);
}
Assert.NotEqual(sourceAssembly.Location, cachedAssemblyLocation);

// ...that the assembly in the other domain is stored in the shadow copy cache...
Expand Down
31 changes: 16 additions & 15 deletions build.libgit2sharp.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
#!/bin/bash

PREVIOUS_LD=$LD_LIBRARY_PATH

LIBGIT2SHA=`cat ./LibGit2Sharp/libgit2_hash.txt`
SHORTSHA=${LIBGIT2SHA:0:7}

rm -rf cmake-build
mkdir cmake-build && cd cmake-build
rm -rf libgit2/build
mkdir libgit2/build
pushd libgit2/build
export _BINPATH=`pwd`

cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF -DCMAKE_INSTALL_PREFIX=./libgit2-bin -DLIBGIT2_FILENAME=git2-$SHORTSHA ../libgit2
cmake --build . --target install
cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DTHREADSAFE:BOOL=ON \
-DBUILD_CLAR:BOOL=OFF \
-DLIBGIT2_FILENAME=git2-$SHORTSHA \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
..
cmake --build .

LD_LIBRARY_PATH=$PWD/libgit2-bin/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$_BINPATH:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$_BINPATH:$DYLD_LIBRARY_PATH

cd ..
popd

echo $DYLD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
xbuild CI-build.msbuild /t:Deploy

EXIT_CODE=$?

LD_LIBRARY_PATH=$PREVIOUS_LD
export LD_LIBRARY_PATH

exit $EXIT_CODE
exit $?