← Back to team overview

yade-dev team mailing list archive

Faster local testing chroots for everyone :)

 

Hi everyone,

I have prepared the chroots testing suite for you. To make it all
work you need about 100GB free HDD space.

Here's how to use it:

# by default it is in directory /home/extra_nobackup/distros
# you can change this by editing file start_chroot_IN_DIR.sh
mkdir -p /home/extra_nobackup/distros

cd /home/extra_nobackup/distros

# I will try to keep this sevver online, but unfortunately cannot guarentee this
# at least this month it should stay online.
wget http://wilis.pg.gda.pl:55555/tmp/yadeChroots1.tar.bz2

# make sure your downloaded file is OK:
md5sum yadeChroots1.tar.bz2 

# e918acc8e2e099ff1ce6531dc2675fe5  yadeChroots1.tar.bz2

tar -xvjf ./yadeChroots1.tar.bz2

# You can safely copy ./yadeChroots1 to have multiple independent chroot sets,
# but do this when chroot is not running.

# move the start script into /root/bin
mkdir /root/bin
mv ./yadeChroots1/start_chroot_IN_DIR.sh /root/bin

# use the custom ~/.screenrc config. If you have your own screen config already,
# then don't do this step. It is to enable F11/F12 keys to change chroots.

mv ./yadeChroots1/.screenrc /root

# install necessary local packages.
# BTW, I wonder if this can work on Mac-OSX with brew install chroot ??

apt-get install screen zsh

# Now you can start chroot with command:

/root/bin/start_chroot_IN_DIR.sh yadeChroots1 p3 zsh

# Now inside chroots you can test yade

~/bin/test-branch.sh upstream master NODOC

# Press F11, F12 to switch between chroots

# then you can exit the chroots by pressing Ctrl-d
# After you exit, use this command to check if you have other chroots
# running:

cat /etc/mtab


I made a demo video on ubuntu 16.04 https://youtu.be/sZ4zDj1mFdc
in case if you have any problems.

The text file written during the video is in the attachment.

I hope this will speed up yade testing for all of you :)

best regards
Janek Kozicki
# OK, I installed a fresh 16.04 in virtualbox to test if this chroot works. First download it to this dir:
mkdir -p /home/extra_nobackup/distros ; cd /home/extra_nobackup/distros
wget http://wilis.pg.gda.pl:55555/tmp/yadeChroots1.tar.bz2
md5sum yadeChroots1.tar.bz2 
# e918acc8e2e099ff1ce6531dc2675fe5  yadeChroots1.tar.bz2
tar -xvjf ./yadeChroots1.tar.bz2   # unpacking 40GB is going to take some time. Let's skip recording video of unpacking :)
mkdir /root/bin ; mv ./yadeChroots1/start_chroot_IN_DIR.sh /root/bin ; mv ./yadeChroots1/.screenrc /root
apt-get install screen zsh
# is that all? Let's see if this works.
/root/bin/start_chroot_IN_DIR.sh yadeChroots1 p3 zsh
# started! F11, F12 to change tabs.
# ONLY ONCE, to clone first: mkdir -p /home/ytest/yade ; cd /home/ytest/yade ; git clone https://gitlab.com/yade-dev/trunk.git ; cd trunk ; git remote rename origin upstream
# Then start testing:
~/bin/test-branch.sh upstream master NODOC
# heh, compilation will take some time, but let's do this. I will stop recording until they all compile.
# Ouch, I see that F11 isn't working to move to left tab. Try to change this in options.
# Future compilation will be much faster, because these chroots are configured with ccache
# I also noticed that opensuse by default asks to confirm the `git log` nevermind. It is still compiling....
# Now the script continues, will --test first, then --check, then build documentation unless there was NODOC argument
# hm. I never seen this checkMPI.py error before. Perhaps this chroot had a mistake in preparing it.
# Tried to make dir /home/ytest/.ipython ; ok, it worked the second time. So now we can use the script
# And use ccached compile.

~/bin/test-branch.sh upstream master NODOC

# OK, so it all works. We see the result in here. DOC -1 means it was skipped. We can run tests again with commands
# printed at the end:
  ~/yade/install/bin/yade-ci --test
  ~/yade/install/bin/yade-ci --check
# also, in most of the chroots we will have working graphics. First need to make sure the DISPLAY number
# if the number is the same, we need to run command: 'xhost +local:' on the host.
# And now graphics will work!
# hmm.. not always :( In some chroots it was working. Let me check. xterm works at least.
# right, it's not working in 16.04, stretch and opensuse. But should work in others, let's try 18.04
# Nice, all test and check worked. now let's try graphics.
# OK it all works. Now try again - logout from chroot and start it again.
# Use this command to check if you have other chroots running:
cat /etc/mtab
# now start it again as root, to install maybe something.
/root/bin/start_chroot_IN_DIR.sh yadeChroots1 p3 root
# OK, nothing to install, go back to regular user.
/root/bin/start_chroot_IN_DIR.sh yadeChroots1 p3 zsh
# remember about the 'xhost +local:' on the host. for graphics.
#
# OK, it works, ready to announce on yade-dev :)
# End of message.

Follow ups