Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify PrepFunctionalTests.sh to work out of the output directories #427

Merged
merged 2 commits into from
Oct 26, 2018
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line removing any old installers that may be present?

Copy link
Member Author

@jrbriggs jrbriggs Oct 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the intent. Since we're copying a versioned installer into a non-versioned directory, I want to ensure that we don't have multiple. The correctness of the installation during PrepFunctionalTests.sh depends on there being exactly the one dmg we want to install in $VFS_OUTPUTDIR/Git


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