tests: generate buildscript in vagrant test box

This commit is contained in:
Jerome Charaoui 2021-01-25 09:44:36 -05:00
parent 870811ebd6
commit 39e5f2ef23
2 changed files with 14 additions and 6 deletions

View File

@ -17,13 +17,16 @@ Once the requirements are in place, the test suite may be run in this manner:
git clone git@0xacab.org:liberate/backupninja.git git clone git@0xacab.org:liberate/backupninja.git
cd backupninja cd backupninja
vagrant up vagrant up
vagrant rsync
vagrant ssh -c "sudo /vagrant/test/test.sh" vagrant ssh -c "sudo /vagrant/test/test.sh"
It's possible to only test a specific handler with: It's possible to only test a specific handler with:
vagrant ssh -c "sudo /vagrant/test/test.sh rdiff" vagrant ssh -c "sudo /vagrant/test/test.sh rdiff"
To synchronise changes in the source code and rebuild backupninja:
vagrant rsync local && vagrant ssh -c "build-backupninja.sh"
Please report any problems with the test suite on the issue tracker at: Please report any problems with the test suite on the issue tracker at:
https://0xacab.org/liberate/backupninja/-/issues https://0xacab.org/liberate/backupninja/-/issues

15
Vagrantfile vendored
View File

@ -41,11 +41,16 @@ Vagrant.configure("2") do |config|
locale-gen locale-gen
apt-get update apt-get update
apt-get install -y automake make dialog sshpass apt-get install -y automake make dialog sshpass
cd /vagrant BUILDSCRIPT="/usr/local/bin/build-backupninja.sh"
./autogen.sh echo "#!/bin/sh" >> $BUILDSCRIPT
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --libexecdir=/usr/lib echo "cd /vagrant" >> $BUILDSCRIPT
make echo "make clean" >> $BUILDSCRIPT
make install echo "./autogen.sh" >> $BUILDSCRIPT
echo "./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --libexecdir=/usr/lib" >> $BUILDSCRIPT
echo "make" >> $BUILDSCRIPT
echo "sudo make install" >> $BUILDSCRIPT
chmod +x $BUILDSCRIPT
$BUILDSCRIPT
mkdir -p /root/.ssh mkdir -p /root/.ssh
yes y | ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N '' yes y | ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ''
echo "StrictHostKeyChecking accept-new" >> /root/.ssh/config echo "StrictHostKeyChecking accept-new" >> /root/.ssh/config