https://gitlab.inria.fr/cado-nfs/cado-nfs
Tip revision: 24d2dc18e53205337a4bb9bc2dd1f9faa17798e3 authored by Lionel Muller on 07 October 2011, 09:58:47 UTC
bugfix check_rels with option -f (not use in cadofactor)
bugfix check_rels with option -f (not use in cadofactor)
Tip revision: 24d2dc1
nightly-test
#!/bin/sh
# Usage: nightly-test <MAKE_ARGS>
# If you use this in your crontab, since cron does not have access to
# ssh-agent, a trick is the following:
# 1) run from your home directory: ssh-keygen -N "" -t rsa -f .ssh/cle_gforge
# This will create a ssh key with empty passphrase in .ssh/cle_gforge,
# with the public key in .ssh/cle_gforge.pub
# 2) add the content of .ssh/cle_gforge.pub in the list of your ssh keys on
# gforge.inria.fr (this will be added in authorized_keys)
# 3) add the following lines in your .ssh/config file:
# Host scm.gforge.inria.fr
# IdentityFile /users/mygroup/mylogin/.ssh/cle_gforge
# 4) you need to add also the lines:
# Host localhost
# StrictHostKeyChecking no
# UserKnownHostsFile /dev/null
# IdentityFile /users/mygroup/mylogin/.ssh/cle_gforge
# in the .ssh/config file on the computer on which you run nightly-test, and
# to add the content of cle_gforge.pub in the authorized_keys on that computer.
set -e
# If the DIR variable is set, then use it as the basename of the temp directory.
if ! [ "$DIR" ] ; then
DIR=`mktemp -d /tmp/cado-nightly.XXXXXXXX`
else
/bin/rm -fr "$DIR"
mkdir "$DIR"
fi
# The following test should be useless, but let's be paranoid.
test ! -h "$DIR"
cd $DIR
# If the USER variable is set, use it instead of the login name for doing
# the checkout.
: ${USER=`whoami`}
if [ "$GIT" ] ; then
git clone --depth 2 $GIT scm
SCM=scm/
else
svn checkout -q svn://scm.gforge.inria.fr/svn/cado-nfs/trunk/ scm
SCM=scm
fi
CADO_DIST_ARCHIVE_NAME=cado-nfs-snapshot-`date +%Y%m%d%H%M`
export CADO_DIST_ARCHIVE_NAME
# first build a tarball
make -C $SCM dist
# now extract the tarball and test it
tar zxf $SCM/$CADO_DIST_ARCHIVE_NAME.tar.gz
# If the cado repository contains a local.sh for this machine, use it.
h=`hostname`
if [ -f "$SCM/local.sh.$h" ] ; then
echo "Using local.sh.$h"
cp -f $SCM/local.sh.$h $CADO_DIST_ARCHIVE_NAME/local.sh
fi
cd $CADO_DIST_ARCHIVE_NAME
echo -n "Starting compilation at: "
date
if [ "$CC" ] ; then
make "$@" CC=$CC
else
make "$@"
fi
echo -n "Starting factorization at: "
date
CADO_COLOR=0 ./factor.sh 71641520761751435455133616475667090434063332228247871795429 -t 4 -ssh expected_factorization=200429218120815554269743635437,357440504101388365610785389017
CADO_COLOR=0 ./factor.sh 90377629292003121684002147101760858109247336549001090677693 -t 2 expected_factorization=260938498861057,588120598053661,760926063870977,773951836515617
rc=$?
if [ "$rc" = 0 ] ; then
echo OK
if ! [ "$CADO_DEBUG" ] ; then
/bin/rm -fr "$DIR"
fi
else
echo "FAILED ; data left in $DIR"
fi