aboutsummaryrefslogtreecommitdiffstats
path: root/test/overlay/overlay.sh
blob: 9daf1f5f68fe30f93a8cc8ed194911f12142c312 (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2018 Firejail Authors
# License GPL v2

export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))

echo "TESTING: overlay fs (test/overlay/fs.exp)"
rm -fr ~/_firejail_test_*
./fs.exp
rm -fr ~/_firejail_test_*

echo "TESTING: overlay named fs (test/overlay/fs-named.exp)"
rm -fr ~/_firejail_test_*
./fs-named.exp
rm -fr ~/_firejail_test_*

echo "TESTING: overlay tmpfs fs (test/overlay/fs-tmpfs.exp)"
rm -fr ~/_firejail_test_*
./fs-tmpfs.exp
rm -fr ~/_firejail_test_*

which firefox 2>/dev/null
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlay firefox"
	./firefox.exp
else
	echo "TESTING SKIP: firefox not found"
fi

which firefox 2>/dev/null
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlay firefox x11 xorg"
	./firefox.exp
else
	echo "TESTING SKIP: firefox not found"
fi


# check xpra/xephyr
which xpra 2>/dev/null
if [ "$?" -eq 0 ];
then
        echo "xpra found"
else
        echo "xpra not found"
	which Xephyr 2>/dev/null
	if [ "$?" -eq 0 ];
	then
        	echo "Xephyr found"
	else
        	echo "TESTING SKIP: xpra and/or Xephyr not found"
		exit
	fi
fi

which firefox 2>/dev/null
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlay firefox x11"
	./firefox-x11.exp
else
	echo "TESTING SKIP: firefox not found"
fi