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

Create a script to create a build drop to enable running functional tests on boxes that didn't build the product. #466

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

jrbriggs
Copy link
Member

@jrbriggs jrbriggs commented Nov 2, 2018

This will drop the minimal layout to successfully run the functional tests for a build that can be transferred to a box that did not build the product.

. "$(dirname ${BASH_SOURCE[0]})/InitializeEnvironment.sh"

CONFIGURATION=$1
LAYOUT_ROOT=$2
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the meaning of "layout" will become fuzzy very quickly. This script is just creating a build drop that can be published from one build and then consumed from another, right?

How about the name CreateBuildDrop.sh for the script name, and BuildDrop anywhere you use Layout inside the script?

I also didn't find an equivalent script for Windows, how is it being created there?

Copy link
Member Author

Choose a reason for hiding this comment

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

BuildDrop makes sense. I'll retool this.

I'm going to create a similar script for Windows. I kept it out of this PR in the interest of focus, so I don't have to hop between two boxes. It will the new PR I post. :)

@@ -0,0 +1,30 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

We had discussed reorganizing the Windows scripts into dev-oriented and CI-oriented scripts. This one very clearly feels like a script intended for use on the CI/PR builds, and never on a dev box, so we could we stick it in a different location and not mix it in with the dev scripts?

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, I'll move it.

@jrbriggs jrbriggs force-pushed the publish-mac-layout branch 2 times, most recently from 3627a94 to 7a960e4 Compare November 2, 2018 19:57
Copy link
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

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

General questions and one typo otherwise looks good.

# Set up some paths
BUILDDROP_BUILDOUTPUT=$BUILDDROP_ROOT/BuildOutput
BUILDDROP_SRC=$BUILDDROP_ROOT/src
BUILDDROP_PROJFS=$BUILDDROP_SRC/ProfFS.Mac
Copy link
Member

Choose a reason for hiding this comment

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

ProjFS.Mac?

Copy link
Member Author

Choose a reason for hiding this comment

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

(facepalm)

mkdir -p $BUILDDROP_BUILDOUTPUT
mkdir -p $BUILDDROP_SRC
mkdir -p $BUILDDROP_PROJFS
mkdir -p $BUILDDROP_KEXT
Copy link
Member

Choose a reason for hiding this comment

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

There are cases in the build scripts that use sudo. How do we know when we will need to use that vs not?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm making the assumption in this script that the CI agent will have access to wherever it is asked to publish the drop. Also, this caught my clumsiness a few times where I fat fingered /[something] instead of ~/[something].

rsync -avm $VFS_OUTPUTDIR/Git $BUILDDROP_BUILDOUTPUT
rsync -avm $VFS_PUBLISHDIR $BUILDDROP_ROOT
rsync -avm $VFS_SCRIPTDIR $BUILDDROP_SRC/Scripts
rsync -avm $VFS_SRCDIR/ProjFS.Mac/Scripts $BUILDDROP_PROJFS
Copy link
Member

Choose a reason for hiding this comment

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

Should this keep the Scripts folder?

Copy link
Member Author

Choose a reason for hiding this comment

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

It keeps the script folders so that we can keep the logic on how we run functional tests or install/start the kext encoded in the script.

@jrbriggs jrbriggs changed the title Create a script to publish a functional test layout on Mac Create a script to create a build drop to enable running functional tests on boxes that didn't build the product. Nov 2, 2018
@jrbriggs jrbriggs merged commit 2bedc74 into microsoft:master Nov 2, 2018
@jrbriggs jrbriggs deleted the publish-mac-layout branch November 2, 2018 22:20
@jrbriggs jrbriggs added this to the S147 milestone Feb 7, 2019
@jrbriggs jrbriggs added the affects: engineering Keeping the engineering system healthy label Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: engineering Keeping the engineering system healthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants