forked from unikraft/eurosys21-artifacts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·46 lines (37 loc) · 1.22 KB
/
setup.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
#!/bin/bash
#Initializing the setup for 9pfs latency
CURRENT_FOLDER=$PWD
VM_FOLDER=vm
if [ -d "$VM_FOLDER" ]; then
echo "Directory already exists so skip download process to gain time"
else
echo "Download the VM from remote server (this will take some times...)"
curl -LO http://releases.unikraft.org/.eurosys21/vm.zip
if [ ! -f vm.zip ]; then
echo "Download the VM from remote backup server (this will take some times...)"
curl -LO https://people.montefiore.uliege.be/gain/unikraft/vm.zip
fi
echo "Unzip the VM..."
unzip vm.zip
fi
echo "Go to the VM folder and generate a random file for the reading"
mkdir -p "$VM_FOLDER/test"
cd "$VM_FOLDER"
head -c 1G </dev/urandom > test/randomfile
cd $CURRENT_FOLDER
echo "Download unikraft from git and checkout to specific commit"
git clone [email protected]:unikraft/unikraft.git
cd unikraft
git checkout 7fd6797bd5917acc515ef6ddbfa85621f4aacf5f
echo "Generate random file for the unikraft read"
cd "$CURRENT_FOLDER/apps/lib-readfile/"
mkdir test
head -c 1G </dev/urandom > test/randomfile
echo "Compiling lib-readfile..."
make
echo "Compiling lib-writefile..."
cd "$CURRENT_FOLDER/apps/lib-writefile/"
mkdir test
chmod +x test
make
cd $CURRENT_FOLDER