Skip to content

Commit

Permalink
Merge pull request #427: Modify PrepFunctionalTests.sh to work out of…
Browse files Browse the repository at this point in the history
… the output directories
  • Loading branch information
jrbriggs authored Oct 26, 2018
2 parents b1a1e42 + 583a33b commit d428f1a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Scripts/Mac/BuildGVFSForMac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ echo 'Copying native binaries to Publish directory...'
cp $VFS_OUTPUTDIR/GVFS.Native.Mac/Build/Products/$CONFIGURATION/GVFS.ReadObjectHook $VFS_PUBLISHDIR || exit 1
cp $VFS_OUTPUTDIR/GVFS.Native.Mac/Build/Products/$CONFIGURATION/GVFS.VirtualFileSystemHook $VFS_PUBLISHDIR || exit 1

echo 'Copying Git installer to the output directory...'
$VFS_SCRIPTDIR/PublishGit.sh $GITPATH || exit 1

echo 'Running VFS for Git unit tests...'
$VFS_PUBLISHDIR/GVFS.UnitTests || exit 1
9 changes: 4 additions & 5 deletions Scripts/Mac/PrepFunctionalTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
# Ensure the kext isn't loaded before installing Git
$VFS_SRCDIR/ProjFS.Mac/Scripts/UnloadPrjFSKext.sh

# Install GVFS-aware Git (that was downloaded by the build script)
GITVERSION="$($SCRIPTDIR/GetGitVersionNumber.sh)"
GITDIR=$VFS_PACKAGESDIR/gitformac.gvfs.installer/$GITVERSION/tools
if [[ ! -d $GITDIR ]]; then
# Install GVFS-aware Git (that was published by the build script)
GITPUBLISH=$VFS_OUTPUTDIR/Git
if [[ ! -d $GITPUBLISH ]]; then
echo "GVFS-aware Git package not found. Run BuildGVFSForMac.sh and try again"
exit 1
fi
hdiutil attach $GITDIR/*.dmg || exit 1
hdiutil attach $GITPUBLISH/*.dmg || exit 1
GITPKG="$(find /Volumes/Git* -type f -name *.pkg)" || exit 1
sudo installer -pkg "$GITPKG" -target / || exit 1
hdiutil detach /Volumes/Git*
Expand Down
15 changes: 15 additions & 0 deletions Scripts/Mac/PublishGit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
. "$(dirname ${BASH_SOURCE[0]})/InitializeEnvironment.sh"

GITPATH=$1
INSTALLER=$(basename $GITPATH)

GITPUBLISH=$VFS_OUTPUTDIR/Git
if [[ ! -d $GITPUBLISH ]] ; then
mkdir $GITPUBLISH
fi

find $GITPUBLISH -type f ! -name $INSTALLER -delete

if [[ ! -e $GITPUBLISH/$INSTALLER ]] ; then
cp $GITPATH $GITPUBLISH
fi
6 changes: 0 additions & 6 deletions Scripts/Mac/RunFunctionalTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ if [ -z $CONFIGURATION ]; then
CONFIGURATION=Debug
fi

SCRIPTDIR=$(dirname ${BASH_SOURCE[0]})

SRCDIR=$SCRIPTDIR/../..
ROOTDIR=$SRCDIR/..
PUBLISHDIR=$ROOTDIR/Publish

sudo mkdir /GVFS.FT
sudo chown $USER /GVFS.FT

Expand Down

0 comments on commit d428f1a

Please sign in to comment.