Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Modified build.sh to also run testasroot target #801

Merged

Conversation

ashahi1
Copy link
Contributor

@ashahi1 ashahi1 commented Dec 7, 2016

Fixes #800

@ashahi1
Copy link
Contributor Author

ashahi1 commented Dec 7, 2016

misc/scripts/build.sh is not running make on testasroot target.

Main job of build.shell is to run containers and then do 'make Target' within those containers.

Due to some earlier change in build.sh, we had missed to add condition to also run 'testsasroot' target while running our tests locally.

This issue was not discovered on drone because while running tests on drone, we do not call build.sh

@kerneltime
Copy link
Contributor

What was the testing done?

@@ -122,7 +122,8 @@ then
elif [ "$1" == "pylint" ]
then
$DOCKER run --rm -it -v $PWD/..:$dir -w $dir $pylint_container $MAKE_ESX pylint
elif [ "$1" == "build" ] || [ "$1" == "clean-as-root" ]
elif [ "$1" == "build" ] || [ "$1" == "clean-as-root" ] || [ "$1" == "testasroot" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make this the default condition, unless a special rule exists run make using the $plug_container and the $MAKE cmd. Change this to else instead of elseif

Copy link
Contributor

@kerneltime kerneltime left a comment

Choose a reason for hiding this comment

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

LGTM after addressing

  • Testing done
  • change elsif to else

@ashahi1
Copy link
Contributor Author

ashahi1 commented Dec 7, 2016

Addressed the review comment of just having an else condition which will accept all targets.

Ran the test locally with ESX and two VMs and tests were working fine.

==========================

I could also see in the log that testasroot target is being executed -

../misc/scripts/build.sh testasroot
make: Entering directory `/go/src/github.com/vmware/docker-volume-vsphere/vmdk_plugin'

=> Running target testasroot Wed Dec 7 18:22:29 UTC 2016

GO15VENDOREXPERIMENT=1 go test github.com/vmware/docker-volume-vsphere/vmdk_plugin/vmdkops
ok github.com/vmware/docker-volume-vsphere/vmdk_plugin/vmdkops 1.050s
GO15VENDOREXPERIMENT=1 go test github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/config
ok github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/config 0.005s
make: Leaving directory `/go/src/github.com/vmware/docker-volume-vsphere/vmdk_plugin'

@kerneltime
Copy link
Contributor

LGTM post CI run.

Copy link
Contributor

@msterin msterin left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it !

@kerneltime kerneltime merged commit fdf919f into vmware-archive:master Dec 7, 2016
@ashahi1 ashahi1 deleted the issueFixBuild.shell.ashahi1 branch December 15, 2016 18:43
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants