Revision 1d2f45d681595c9ddf588faa86be317ae87974f6 authored by Pierrick Gaudry on 22 November 2010, 20:54:05 UTC, committed by Pierrick Gaudry on 22 November 2010, 20:54:05 UTC
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/cado-nfs/trunk@423 3eaf19af-ecc0-40f6-b43f-672aa0c71c71
1 parent be5456f
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_VERSION=snapshot-`date +%Y%m%d%H%M`
export CADO_VERSION
# first build a tarball
make -C $SCM dist
# now extract the tarball and test it
tar zxf $SCM/cado-nfs-$CADO_VERSION.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-nfs-$CADO_VERSION/local.sh
fi
cd cado-nfs-$CADO_VERSION
echo -n "Starting compilation at: "
date
make "$@"
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
/bin/rm -fr "$DIR"
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...