qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing
Date: Mon, 6 Jun 2016 09:50:34 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

On Mon, Jun 06, 2016 at 08:54:23AM -0300, Eduardo Habkost wrote:
> On Mon, Jun 06, 2016 at 08:47:24AM -0300, Eduardo Habkost wrote:
> > On Mon, Jun 06, 2016 at 02:58:24PM +0800, Fam Zheng wrote:
> > > On Fri, 06/03 15:26, Eduardo Habkost wrote:
> > > > On Fri, Jun 03, 2016 at 09:23:28AM +0800, Fam Zheng wrote:
> > > > > On Thu, 06/02 16:13, Eduardo Habkost wrote:
> > > > > > On Wed, Jun 01, 2016 at 05:45:12PM +0800, Fam Zheng wrote:
> > > > > > [...]
> > > > > > > +
> > > > > > > +CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
> > > > > > > +# Makes the definition constant after the first expansion
> > > > > > > +DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := 
> > > > > > > docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
> > > > > > > +
> > > > > > > +$(DOCKER_SRC_COPY):
> > > > > > 
> > > > > > This seems to be confusing make in travis-ci, and I don't
> > > > > > understand why:
> > > > > > https://travis-ci.org/ehabkost/qemu/jobs/134820251#L1266
> > > > > 
> > > > > Indeed, but qemu.git master doesn't have that. Wondering why.
> > > > 
> > > > I have pushed master to a temporary branch on my tree, and the
> > > > issue persists:
> > > > 
> > > > https://travis-ci.org/ehabkost/qemu/builds/135090745
> > > 
> > > I pushed the same commit 6b3532b20b787cbd697a68b383232f5c3b39bd1e to my 
> > > github
> > > repo and the triggered travis build doesn't error at the same location.  
> > > I have
> > > no idea what is happening there.  Wild guesses: do you have any 
> > > non-default
> > > travis per-repo or per-branch settings? Have you tried deleting all 
> > > caches at:
> > > 
> > > https://docs.travis-ci.com/user/caching/
> > > 
> > > ?
> > 
> > No non-default settings, as far as I can see. I have:
> > * Build only if .travis.yml is present: OFF
> > * Limit concurrent jobs: OFF
> > * Build pushes: ON
> > * Build pull requests: ON
> > * Environment variables: none
> > 
> > No .travis.yml changes on any of my branches.
> > 
> > I have just deleted all caches and I will send a new push. I will
> > let you know the results soon.
> 
> Same: https://travis-ci.org/ehabkost/qemu/jobs/135569978
> 
> I will make some changes to test if this really has anything to
> do with the Makefile code, or if there's something wrong on
> Travis side.

I have changed the code to:

  CUR_TIME := $(shell date +%Y.$$$$)
  
  $(shell echo DEBUG: cur_time: $(CUR_TIME) >&2)
  
  # Makes the definition constant after the first expansion
  DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := 
docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
  
  $(shell echo DEBUG: src_copy: $(DOCKER_SRC_COPY) >&2)
  
  $(DOCKER_SRC_COPY):
        @mkdir $@
        $(call make-archive-maybe, $(SRC_PATH), $@/qemu.tgz)

and I still get a failure: https://travis-ci.org/ehabkost/qemu/jobs/135574871

  $ make -j3 && ${TEST_CMD}
  DEBUG: cur_time: 2016.13278
  /home/travis/build/ehabkost/qemu/tests/docker/Makefile.include:37: *** 
unterminated variable reference.  Stop.

I am very confused by that code: using "=" to make a variable
reference itself is not allowed, but in this case no error is
reported because of the $(eval) trick. I have no idea what will
happen the second time the variable is expanded. Isn't $(eval)
going to be expanded again?

Why did you use this trick instead of just relying on ":=" to
expand the shell command only once?

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]