-
Notifications
You must be signed in to change notification settings - Fork 76
/
test_vagrant_ubuntu.sh
executable file
·48 lines (35 loc) · 833 Bytes
/
test_vagrant_ubuntu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
set -e -x
PKGS="fuse3 libfuse3-dev"
CMAKE_CMD="cmake .."
# uncomment this for libfuse2
#PKGS="fuse libfuse-dev"
#CMAKE_CMD="cmake .. -DWITH_LIBFUSE3=FALSE"
trap "vagrant destroy --force; rm -rf Vagrantfile" SIGINT SIGTERM ERR EXIT
rm -rf Vagrantfile
#vagrant init ubuntu/bionic64
#vagrant init --box-version 20220324.0.0 ubuntu/focal64
vagrant init --box-version 20220405.0.0 ubuntu/jammy64
#vagrant box update
vagrant up
echo "
set -e -x
uname -a
sudo apt-get update -y
sudo apt-get install -y gcc make pkg-config cmake ${PKGS}
sudo apt-get install -y python3 python3-pip
sudo pip install pytest
" | vagrant ssh
echo "
set -e -x
cp -av /vagrant /var/tmp/xxx
cd /var/tmp/xxx
rm -rf build
mkdir build
cd build
${CMAKE_CMD}
make
sudo modprobe fuse
python3 ../test_all.py
" | vagrant ssh
#vagrant destroy --force