Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: tuaris on November 10, 2015, 02:17:13 AM



Title: Disable Tests with Gitian Builder
Post by: tuaris on November 10, 2015, 02:17:13 AM
I've successfully built Linux, Mac, and Windows packages using the Gitian Builder process.  Problem is, even though I was able to follow the directions, understand most of it, and end up with a functional Bitcoin building VM.  I still don't fully understand how it 'really' works.

For my own reasons (exploration, etc..) I want to disable tests.  So I modify gitian-linux.yml for example:

Code:
  ./autogen.sh
  ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` --disable-tests
  make dist

Problem is it still pulls in the Makefile.test.include and Makefile.qttest.include files and builds the sources under the tests folders.
How can I disable that?

Another question where is the target 'dist' being defined?

Note that I am still at a beginner level with Makefiles and Automake.


Title: Re: Disable Tests with Gitian Builder
Post by: achow101 on November 10, 2015, 02:31:08 AM
You should put --disable-tests before the pipe (|).
e.g.
Code:
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}"  --disable-tests | awk '{print $1;}'`

What do you mean by the target 'dist'?


Title: Re: Disable Tests with Gitian Builder
Post by: tuaris on November 10, 2015, 02:48:17 AM
What do you mean by the target 'dist'?

I did some reading on the standard targets generated by Automake.
http://www.gnu.org/software/automake/manual/html_node/Standard-Targets.html#Standard-Targets

I think I found my answer for that question.   :)

You should put --disable-tests before the pipe (|).
e.g.
Code:
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}"  --disable-tests | awk '{print $1;}'`

Appreciate your reply, but won't that end up putting the configure flag inside the substitution?

Now that I read a little more into this, should I also put '--disable-tests' into:

Code:
  # Extract the release tarball into a dir for each host and build
  for i in ${HOSTS}; do
    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
    mkdir -p distsrc-${i}
    cd distsrc-${i}
    INSTALLPATH=`pwd`/installed/${DISTNAME}
    mkdir -p ${INSTALLPATH}
    tar --strip-components=1 -xf ../$SOURCEDIST

    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}


Title: Re: Disable Tests with Gitian Builder
Post by: achow101 on November 10, 2015, 02:54:25 AM
You should put --disable-tests before the pipe (|).
e.g.
Code:
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}"  --disable-tests | awk '{print $1;}'`

Appreciate your reply, but won't that end up putting the configure flag inside the substitution?
Oh, sorry, I missed the single quotes there. You should just put it before the --prefix just to be safe.

Now that I read a little more into this, should I also put '--disable-tests' into:

Code:
  # Extract the release tarball into a dir for each host and build
  for i in ${HOSTS}; do
    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
    mkdir -p distsrc-${i}
    cd distsrc-${i}
    INSTALLPATH=`pwd`/installed/${DISTNAME}
    mkdir -p ${INSTALLPATH}
    tar --strip-components=1 -xf ../$SOURCEDIST

    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
It probably wouldn't hurt.

Edit: Actually, I don't think you need it in the first configure, you need it in the second. The first one just creates the source tarball, the second one is the one that builds it.