Travis CI - full automation

This commit is contained in:
John Davidson 2018-12-29 20:53:01 +02:00 committed by Ivan Davidov
parent fa9544bf24
commit da06f9d73f
6 changed files with 19 additions and 32 deletions

View File

@ -16,8 +16,5 @@ services:
- docker - docker
script: script:
#- sudo apt-get update - sudo apt-get -qq -y update
- docker run --privileged -v $PWD:/minimal -it ubuntu:18.04 /bin/bash -c 'cd /minimal/travis && ./travis-ci.sh' - cd travis && ./travis-ci.sh
#- sudo chown -R $USER:$USER *
#- cd travis && ./test_qemu.sh

View File

@ -1,8 +1,8 @@
#!/bin sh #!/bin/sh
# This script shuts down the OS after one minute. # This script shuts down the OS after one minute.
sleep 60 && poweroff & sleep 30 && poweroff &
cat << CEOF cat << CEOF
 Minimal Linux Live will shut down in 60 seconds.  Minimal Linux Live will shut down in 30 seconds.
CEOF CEOF

View File

@ -6,7 +6,7 @@ set -e
cd ../src cd ../src
apt-get -qq -y install wget make gawk gcc bc xz-utils bison flex xorriso libelf-dev libssl-dev sudo apt-get -qq -y install wget make gawk gcc bc xz-utils bison flex xorriso libelf-dev libssl-dev
PREFIXES="00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16" PREFIXES="00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16"

View File

@ -6,14 +6,6 @@ set -e
cd ../src cd ../src
apt-get -qq -y install docker.io
#service docker start
dockerd &
sleep 30
docker run hello-world
echo "`date` | *** MLL Docker test - BEGIN ***" echo "`date` | *** MLL Docker test - BEGIN ***"
docker import mll_image.tgz minimal-linux-live:latest docker import mll_image.tgz minimal-linux-live:latest

View File

@ -6,17 +6,16 @@ set -e
cd ../src cd ../src
apt-get -qq -y install qemu sudo apt-get -qq -y install qemu
echo "`date` | *** MLL QEMU test - BEGIN ***" echo "`date` | *** MLL QEMU test - BEGIN ***"
#qemu-system-x86_64 -m 256M -cdrom minimal_linux_live.iso -boot d -localtime -nographic & qemu-system-x86_64 -m 256M -cdrom minimal_linux_live.iso -boot d -localtime -nographic &
qemu-system-x86_64 -m 256M -kernel work/kernel/kernel_installed/kernel -initrd work/rootfs.cpio.xz -append "console=ttyS0 console=tty0" -localtime -console #qemu-system-x86_64 -m 256M -kernel work/kernel/kernel_installed/kernel -initrd work/rootfs.cpio.xz -append "console=ttyS0 console=tty0" -localtime -nographic &
sleep 5 sleep 5
MLL=`ps -ef | grep -i [q]emu` if [ "`ps -ef | grep -i [q]emu-system-x86_64`" = "" ] ; then
if [ "$MLL" = "" ] ; then
echo "`date` | !!! FAILURE !!! Minimal Linux Live is not running in QEMU." echo "`date` | !!! FAILURE !!! Minimal Linux Live is not running in QEMU."
exit 1 exit 1
else else
@ -25,11 +24,11 @@ fi
sleep 120 sleep 120
MLL=`ps -ef | grep -i [q]emu` if [ "`ps -ef | grep -i [q]emu-system-x86_64`" = "" ] ; then
if [ "$MLL" = "" ] ; then
echo "`date` | Minimal Linux Live is not running in QEMU." echo "`date` | Minimal Linux Live is not running in QEMU."
else else
echo "`date` | !!! FAILURE !!! Minimal Linux Live is still running in QEMU." echo "`date` | !!! FAILURE !!! Minimal Linux Live is still running in QEMU."
ps -ef | grep -i [q]emu-system-x86_64
exit 1 exit 1
fi fi

View File

@ -5,18 +5,17 @@
set -e set -e
# Apply Travis specific patches # Apply Travis specific patches
#mkdir -p ../src/minimal_overlay/rootfs/etc/autorun mkdir -p ../src/minimal_overlay/rootfs/etc/autorun
#cp 99_autoshutdown.sh ../src/minimal_overlay/rootfs/etc/autorun cp 99_autoshutdown.sh ../src/minimal_overlay/rootfs/etc/autorun
#cp -f syslinux.cfg ../src/minimal_boot/bios/boot/syslinux/syslinux.cfg cp -f syslinux.cfg ../src/minimal_boot/bios/boot/syslinux/syslinux.cfg
#sed -i "s|OVERLAY_LOCATION.*|OVERLAY_LOCATION=rootfs|" ../src/.config sed -i "s|OVERLAY_LOCATION.*|OVERLAY_LOCATION=rootfs|" ../src/.config
while true; do sleep 300; echo "`date` | >>> Heartbeat <<<"; done & while true; do sleep 300; echo "`date` | >>> Heartbeat <<<"; done &
apt-get -qq update sudo apt-get -qq update
./build_mll.sh ./build_mll.sh
#./test_qemu.sh ./test_docker.sh
#./test_docker.sh ./test_qemu.sh
set +e set +e